next
Help LLMs to understand your Next apps better
claude mcp add --transport stdio vertile-ai-next-mcp-server node dist/index.js \ --env NODE_ENV="production"
How to use
This MCP server analyzes a Next.js app that uses the App Router and extracts information about every API route, including HTTP methods, paths, parameters, status codes, and request/response schemas. It uses a dedicated command-line workflow to scan your project and exposes the results in a structured format. After building, start the server with the provided node entry point, then connect to the server's SSE endpoint to retrieve route information and use the output as documentation or tooling input. The server focuses on the get-routers-info capability and produces a detailed representation of each route, including signatures, descriptions, and example payloads. The example in the repo shows a cursor-based configuration for accessing the live stream of route data via an SSE URL such as http://localhost:4857/sse.
How to install
Prerequisites:
- Node.js (LTS version) and npm or pnpm
Install the MCP server package:
- npm install next-mcp-server or
- pnpm add next-mcp-server
Build the project to produce the distribution bundle used by node:
- npm run build
Run the MCP server locally:
- node dist/index.js
If you prefer Docker (builds from Dockerfile in the repo):
- docker build -t mcp/next -f Dockerfile .
- docker run mcp/next -d
Optional: if you want to use the cursor-based access as shown in the docs, ensure you have a mcp.json placed at ~/.cursor or [projectDir]/.cursor with the following structure: { "mcpServers": { "next.js": { "url": "http://localhost:4857/sse" } } }
Additional notes
Tips and caveats:
- This MCP supports Next.js App Router projects only.
- It may not work reliably if the project filesystem is inaccessible or mounted remotely (example: networked file systems).
- The mcp.json cursor configuration URL may vary depending on your environment and .env settings within the Next.js project.
- If you’ve customized output or port settings, ensure the server is reachable at the provided SSE endpoint (default example shows /sse).
- If you encounter port conflicts, you can run on a different port by adjusting the environment or startup configuration where applicable.
- For best results, run the build step before starting the MCP server to ensure dist/index.js exists.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud