帮助 LLM 更好地理解您的 Next 应用
get-routers-info
The Router Analyzer scans your Next.js app directory structure and extracts information about all API routes, including:
npm install next-mcp-serverOr if you're using pnpm:
pnpm add next-mcp-serverYou can run the mcp server directly:
npm run build
node dist/index.jsdocker build -t mcp/next -f Dockerfile .
docker run mcp/next -dFor cursor usage, define a mcp.json under ~/.cursor or [projectDir]/.cursor
{
"mcpServers": {
"next.js": {
"url": "http://localhost:4857/sse"
}
}
}The url here could vary based on your .env settings within the project.
The tool generates detailed information about each route:
…To run tests:
npm run testTo run the mcp server locally:
npm run build
node dist/index.js To run it from node_modules after npm i:
node node_modules/next-mcp-server/dist/index.jsTo run the playground:
pnpm --filter playground devThe tool:
MIT
暂无开放 Issues,或尚未同步最近议题。