NextJS▌
by vercel
Supercharge your NextJS projects with AI-powered tools for diagnostics, upgrades, and docs. Accelerate development and b
Supercharge your Next.js workflow with powerful, AI-ready development tools. next-devtools-mcp gives coding agents like Claude and Cursor real-time access to runtime diagnostics, automated upgrade utilities, and curated Next.js knowledge for faster, smarter project development. Instantly surface errors, explore app routes, enable new features, and leverage official documentation, all from your preferred coding assistant. Enjoy seamless support for Next.js 16+ projects as well as robust automation and browser testing for any Next.js version. Boost productivity and code quality with guided prompts, on-demand tools, and focused resources for every phase of Next.js development.
best for
- / Next.js developers using AI coding assistants
- / Upgrading legacy Next.js projects
- / Debugging Next.js applications with AI help
capabilities
- / Search and retrieve Next.js official documentation
- / Upgrade Next.js projects to version 16
- / Automate browser testing with Playwright integration
- / Discover running Next.js development servers
- / Enable Cache Components mode for Next.js 16
- / Call MCP tools on running dev servers
what it does
Provides Next.js development tools and utilities for AI coding assistants, including runtime diagnostics, automated upgrades, and access to official documentation.
about
NextJS is an official MCP server published by vercel that provides AI assistants with tools and capabilities via the Model Context Protocol. Supercharge your NextJS projects with AI-powered tools for diagnostics, upgrades, and docs. Accelerate development and b It is categorized under developer tools. This server exposes 7 tools that AI clients can invoke during conversations and coding sessions.
how to install
You can install NextJS in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
NextJS is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
Next.js DevTools MCP
next-devtools-mcp is a Model Context Protocol (MCP) server that provides Next.js development tools and utilities for coding agents like Claude and Cursor.
Getting Started
Requirements
- Node.js v20.19 or a newer latest maintenance LTS version
- npm or pnpm
Install with add-mcp
Install the MCP server for all your coding agents:
npx add-mcp next-devtools-mcp@latest
Add -y to skip the confirmation prompt and install to all detected agents already in use in the project directory. Add -g to install globally across all projects.
Manual installation
Add the following config to your MCP client:
{
"mcpServers": {
"next-devtools": {
"command": "npx",
"args": ["-y", "next-devtools-mcp@latest"]
}
}
}
[!NOTE] Using
next-devtools-mcp@latestensures that your MCP client will always use the latest version of the Next.js DevTools MCP server.
MCP Client Configuration
<details> <summary>Amp</summary>Using Amp CLI:
amp mcp add next-devtools -- npx next-devtools-mcp@latest
Or configure manually:
Follow Amp's MCP documentation and apply the standard configuration shown above.
</details> <details> <summary>Claude Code</summary>Use the Claude Code CLI to add the Next.js DevTools MCP server:
claude mcp add next-devtools npx next-devtools-mcp@latest
Alternatively, manually configure Claude by editing your MCP settings file and adding the configuration shown above.
</details> <details> <summary>Codex</summary>Using Codex CLI:
codex mcp add next-devtools -- npx next-devtools-mcp@latest
Or configure manually:
Follow the MCP setup guide with the standard configuration format:
- Command:
npx - Arguments:
-y, next-devtools-mcp@latest
Windows 11 Special Configuration:
Update .codex/config.toml with environment variables and increased startup timeout:
env = { SystemRoot="C:\Windows", PROGRAMFILES="C:\Program Files" }
startup_timeout_ms = 20_000
</details>
<details>
<summary>Cursor</summary>
Click the button to install:
Or install manually:
Go to Cursor Settings → MCP → New MCP Server. Use the config provided above.
Using Gemini CLI:
Project-wide installation:
gemini mcp add next-devtools npx next-devtools-mcp@latest
Global installation:
gemini mcp add -s user next-devtools npx next-devtools-mcp@latest
Or configure manually:
Follow the MCP setup guide with these parameters:
- Command:
npx - Arguments:
-y, next-devtools-mcp@latest
Configure in MCP config file:
Add this to your Antigravity MCP config file: .gemini/antigravity/mcp_config.json
{
"mcpServers": {
"next-devtools": {
"command": "npx",
"args": ["-y", "next-devtools-mcp@latest"]
}
}
}
See Antigravity MCP docs for more info.
</details> <details> <summary>VS Code / Copilot</summary>Using VS Code CLI:
code --add-mcp '{"name":"next-devtools","command":"npx","args":["-y","next-devtools-mcp@latest"]}'
Or configure manually:
Follow the official VS Code MCP server setup guide and add the Next.js DevTools server through VS Code settings.
</details> <details> <summary>Warp</summary>Using Warp UI:
Navigate to Settings | AI | Manage MCP Servers and select + Add to register a new MCP server with the following configuration:
- Name:
next-devtools - Command:
npx - Arguments:
-y, next-devtools-mcp@latest
Quick Start
For Next.js 16+ Projects (Recommended)
To unlock the full power of runtime diagnostics, start your Next.js dev server:
npm run dev
Next.js 16+ has MCP enabled by default at http://localhost:3000/_next/mcp (or whichever port your dev server uses). The next-devtools-mcp server will automatically discover and connect to it.
⚠️ IMPORTANT: Start every Next.js session by calling the init tool to set up proper context:
Use the init tool to set up Next.js DevTools context
This initializes the MCP context and ensures the AI assistant uses official Next.js documentation for all queries.
After initialization, try these prompts to explore runtime diagnostics:
Next Devtools, what errors are in my Next.js application?
Next Devtools, show me the structure of my routes
Next Devtools, what's in the development server logs?
Your coding agent will use the nextjs_index and nextjs_call tools to query your running application's actual state.
For All Next.js Projects
You can use the development automation and documentation tools regardless of Next.js version:
Next Devtools, help me upgrade my Next.js app to version 16
Next Devtools, enable Cache Components in my Next.js app
Next Devtools, search Next.js docs for generateMetadata
💡 Pro Tip: Auto-Initialize on Every Session
To make your AI assistant automatically call the init tool at the start of every Next.js session without being asked, add this instruction to your agent's configuration file:
Add to ~/.claude/CLAUDE.md (global) or ./.claude/CLAUDE.md (project-specific):
**When starting work on a Next.js project, ALWAYS call the `init` tool from
next-devtools-mcp FIRST to set up proper context and establish documentation
requirements. Do this automatically without being asked.**
</details>
<details>
<summary>Cursor</summary>
Add to .cursorrules in your project root or global Cursor settings:
When working with Next.js, always call the init tool from next-devtools-mcp
at the start of the session to establish proper context and documentation requirements.
</details>
<details>
<summary>Codex / Other AI Coding Assistants</summary>
Add to your agent's configuration file (e.g., .codex/instructions.md, agent.md, or similar):
**Next.js Initialization**: When starting work on a Next.js project, automatically
call the `init` tool from the next-devtools-mcp server FIRST. This establishes
proper context and ensures all Next.js queries use official documentation.
</details>
Why this matters:
- ✅ Ensures consistent context across all Next.js work
- ✅ Automatically establishes the documentation-first requirement
- ✅ No need to manually call init every time
- ✅ Works across all your Next.js projects
MCP Resources
The knowledge base resources are automatically available to your coding agent and are split into focused sections for efficient context management. Current resource URIs:
<details> <summary>📚 Available Knowledge Base Resources (click to expand)</summary>-
Cache Components (12 sections):
cache-components://overviewcache-components://core-mechanicscache-components://public-cachescache-components://private-cachescache-components://runtime-prefetchingcache-components://request-apiscache-components://cache-invalidationcache-components://advanced-patternscache-components://build-behaviorcache-components://error-patternscache-components://test-patternscache-components://reference
-
Next.js 16 migration:
nextjs16://migration/beta-to-stablenextjs16://migration/examples
-
Next.js fundamentals:
nextjs-fundamentals://use-client
Resources are loaded on-demand by your coding agent, providing targeted knowledge without overwhelming the context window.
MCP Prompts
Pre-configured prompts to help with common Next.js development tasks:
<details> <summary>💡 Available Prompts (click to expand)</summary>upgrade-nextjs-16- Guide for upgrading to Next.js 16enable-cache-components- Migrate and enable Cache Components mode for Next.js 16
MCP Tools
<details> <summary><code>init</code></summary>Initialize Next.js DevTools MCP context and establish documentation requirements.
Capabilities:
- Sets up proper context for AI assistants working with Next.js
- Establishes requirement to use
nextjs_docsfor ALL Next.js-related queries - Documents all available MCP tools and their use cases
- Provides best practices for Next.js development with MCP
- Includes example workflows and quick start checklist
When to use:
- At the beginning of a Next.js development session
- To understand available tools and establish proper context
- To ensure documentation-first approach for Next.js development
Input:
project_path(optional) - Path to Next.js project (defaults to current directory)
Output:
- Comprehensive initialization context and guidance for Next.js development with MCP tools
Search and retrieve Next.js official documentation and knowledge base.
Capabilities:
- Two-step process: 1) Search for docs by keyword to get paths, 2) Fetch full markdown content by path
- Uses official Next.js documentation search API
- Provides access to comprehensive Next.js guides, API references, and best practices
- Supports filtering by router type (App Router, Pages Router, or both)
Input:
action(required) - Action to perform:searchto find docs,getto fetch full contentquery(optional) - Required forsearch. Keyword search query (e.g., 'metadata',
FAQ
- What is the NextJS MCP server?
- NextJS is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for NextJS?
- This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Ratings
4.5★★★★★10 reviews- ★★★★★Shikha Mishra· Oct 10, 2024
NextJS is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Piyush G· Sep 9, 2024
We evaluated NextJS against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Chaitanya Patil· Aug 8, 2024
Useful MCP listing: NextJS is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sakshi Patil· Jul 7, 2024
NextJS reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Ganesh Mohane· Jun 6, 2024
I recommend NextJS for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Oshnikdeep· May 5, 2024
Strong directory entry: NextJS surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Dhruvi Jain· Apr 4, 2024
NextJS has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Rahul Santra· Mar 3, 2024
According to our notes, NextJS benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Pratham Ware· Feb 2, 2024
We wired NextJS into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Yash Thakker· Jan 1, 2024
NextJS is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.