Next.js MCP Server
@jazelly
About Next.js MCP Server
Help LLMs to understand your Next apps better
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"next-mcp-server": {
"command": "node",
"args": [
"dist/index.js"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Next.js MCP Server?
It scans your Next.js App Router project directory and extracts detailed information about all API routes, including paths, HTTP methods, parameters, status codes, and request/response schemas. This server outputs structured JSON representations for use with MCP‑compatible tools like Cursor.
How to use Next.js MCP Server?
Install via npm install next-mcp-server or pnpm add next-mcp-server, then build and run node dist/index.js. For Cursor IDE, configure a mcp.json file (in ~/.cursor or project .cursor) pointing to the server’s SSE endpoint (default http://localhost:4857/sse). Docker deployment is also supported.
Key features of Next.js MCP Server
- Extracts API route paths, HTTP methods, and parameters from App Router projects.
- Retrieves request and response schemas directly from route files.
- Identifies status codes and function signatures for each handler.
- Outputs structured JSON for integration with MCP clients.
- Supports local CLI execution and Docker deployment.
- Scans filesystem directory – no network or external dependencies needed.
Use cases of Next.js MCP Server
- Developers exploring API routes in a Next.js project via an AI assistant.
- Automatically generating API documentation from existing route files.
- Providing structured route information to MCP‑enabled IDEs like Cursor for code generation.
FAQ from Next.js MCP Server
What does the server do?
It analyzes your Next.js app directory and returns structured details about all API routes, including methods, paths, parameters, status codes, and schemas.
How do I install and run it?
Install via npm or pnpm, then build and run dist/index.js. Alternatively, use the provided Dockerfile to run it in a container.
Does it work over a network?
No. The server accesses the filesystem by directory path and only works locally. It will not function if hosted over a network.
Which Next.js router does it support?
Only the App Router. Pages Router projects are not supported.
How do I connect it to Cursor?
Create a mcp.json file under ~/.cursor or your project’s .cursor directory with the server’s URL (by default http://localhost:4857/sse). The exact URL may vary based on environment variables.
More Other MCP servers
Codelf
unbugA search tool helps dev to solve the naming things problem.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Comments