Next.js
Enables AI assistants to automate Next.js development including project scaffolding, React component generation, API route creation, and full-stack application workflows with TypeScript and Tailwind CSS support.
What is Next.js?
Next.js is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to automate next.js development including project scaffolding, react component generation, api route creation, and full-stack application workflows with typescript and tailwind c...
Enables AI assistants to automate Next.js development including project scaffolding, React component generation, API route creation, and full-stack application workflows with TypeScript and Tailwind CSS support.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables AI assistants to automate Next.js development includ
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx next-js-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Next.js
The Next.js MCP Server is a developer tool that analyzes Next.js App Router projects and exposes their API route structure to AI assistants. Its primary tool, get-routers-info, scans the app directory, extracts every route file, and returns a structured map of HTTP methods, paths, request parameters, status codes, and request/response schemas — information that AI assistants can then use to generate accurate API clients, write tests, or scaffold new routes without guessing at the shape of your API.
Prerequisites
- Node.js 18 or later
- A Next.js project using the App Router (not Pages Router)
- The MCP server must run on the same machine as your Next.js project (filesystem access required)
- An MCP-compatible client such as Claude Desktop or Cursor
Install the package
Install next-mcp-server as a dependency in your Next.js project, or globally. The server needs filesystem access to your app directory.
npm install next-mcp-serverBuild the server
If running from source or after a local install, build the TypeScript project to produce the runnable dist/index.js.
npm run buildConfigure your MCP client
Add the server to your MCP client configuration. The server runs as a local process and needs to be pointed at your Next.js project root via the working directory or arguments.
{
"mcpServers": {
"next.js": {
"command": "node",
"args": ["node_modules/next-mcp-server/dist/index.js"]
}
}
}Alternative: run via Docker with SSE transport
For Cursor users, build and run the Docker image, then configure Cursor to connect to the SSE endpoint. This keeps the server isolated from your project's node_modules.
docker build -t mcp/next -f Dockerfile .
docker run -p 4857:4857 mcp/nextVerify the route analysis tool
Ask your AI assistant to invoke get-routers-info. It will scan your app directory and return a JSON array describing every API route, its HTTP methods, parameters, and status codes.
Next.js Examples
Client configuration
Claude Desktop configuration running next-mcp-server from local node_modules in a Next.js project.
{
"mcpServers": {
"next.js": {
"command": "node",
"args": ["/path/to/your/nextjs-app/node_modules/next-mcp-server/dist/index.js"]
}
}
}Prompts to try
Prompts that use the route analysis output to generate tests, clients, and documentation.
- "Analyze all API routes in this Next.js project and give me a summary"
- "Generate a TypeScript API client for all the routes in my app directory"
- "Write Jest tests for the POST /api/users route"
- "Which routes accept a request body and what schema do they expect?"
- "List all routes that return a 404 status code"Troubleshooting Next.js
get-routers-info returns empty results or cannot find routes
This tool only supports Next.js App Router projects. Ensure your routes are in an 'app' directory (not 'pages'). The server process must run with its working directory set to the Next.js project root so it can locate the app folder.
Cannot connect via SSE/Docker in Cursor
Confirm the Docker container is running and port 4857 is exposed. The Cursor mcp.json should use 'url': 'http://localhost:4857/sse'. The port can vary based on the .env settings in the project — check the server's .env file for the configured port.
Module not found error when running node dist/index.js
Run 'npm run build' first to compile TypeScript to dist/. If installing from node_modules, the dist folder should already be included in the published package — verify with 'ls node_modules/next-mcp-server/dist/'.
Frequently Asked Questions about Next.js
What is Next.js?
Next.js is a Model Context Protocol (MCP) server that enables ai assistants to automate next.js development including project scaffolding, react component generation, api route creation, and full-stack application workflows with typescript and tailwind css support. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Next.js?
Follow the installation instructions on the Next.js GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Next.js?
Next.js works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Next.js free to use?
Yes, Next.js is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Next.js Alternatives — Similar Coding Agents Servers
Looking for alternatives to Next.js? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Next.js in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Next.js?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.