Next.js DevTools MCP
About
next-devtools-mcp is a MCP server that provides Next.js development tools and utilities for AI coding assistants like Claude and Cursor.
Details
- Author
- vercel
- Categories
- Developer Tools, Other, AI
Jump to
Setup
Install Next.js DevTools MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/vercel/next-devtools-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
next-devtools-mcp is a MCP server that provides Next.js development tools and utilities for AI coding assistants like Claude and Cursor.
What can you do with Next Js DevTools MCP?
- Discover running Next.js dev servers— Usenextjs_indexto find active Next.js 16+ servers and see which runtime tools each exposes.
- Query live runtime errors and logs— Callnextjs_callwithget_errorsorget_logson a discovered port to retrieve current build, runtime, and type errors or dev server logs.
- Inspect routes and page metadata— Usenextjs_callwithget_page_metadatato list all routes, pages, and component metadata from the running app.
- Resolve Server Action IDs to source files— Callnextjs_callwithget_server_action_by_idto map a Server Action ID back to its implementation file.
- Get version-accurate Next.js docs— Usenextjs_docsto locate the bundled docs innode_modules/next/dist/docs/that match your installed Next.js version.
- Set up browser automation— Usebrowser_evalto detect or install theagent-browserCLI so the agent can drive a browser directly.
next-devtools-mcpis a Model Context Protocol (MCP) server that connects coding agents like Claude and Cursor to your running Next.js dev server.
It is athin connector. It discovers running Next.js 16+ dev servers and proxies their built-in MCP endpoint (/_next/mcp) so agents get live runtime errors, routes, and logs. It also ships twogatewaysthat point agents at tools they run directly: version-accurate docs and theagent-browserCLI.
[!NOTE] Docs and migration workflows no longer live in this server. Next.js bundles its own docs atnode_modules/next/dist/docs/, and upgrade / Cache Components workflows are distributed as agent skills. SeeMigrating from 0.3.x.
- Node.jsv20.19 or a newerLTSversion
- npmorpnpm
- Next.js 16+ with a running dev server (fornextjs_index/nextjs_call)
Install for all your coding agents withadd-mcp:
Add-yto skip the prompt and install to all detected agents. Add-gto install globally across all projects.
Or add the config to your MCP client manually:
{ "mcpServers": { "next-devtools": { "command": "npx", "args": ["-y", "next-devtools-mcp@latest"] } } }
[!NOTE]next-devtools-mcp@latestkeeps your client on the latest version.
amp mcp add next-devtools -- npx next-devtools-mcp@latest
Or followAmp's MCP docswith the config above.
claude mcp add next-devtools npx next-devtools-mcp@latest
Or edit your MCP settings file with the config above.
codex mcp add next-devtools -- npx next-devtools-mcp@latest
Windows 11:add environment variables and a longer startup timeout to.codex/config.toml:
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" } startup_timeout_ms = 20_000
Or go toCursor Settings→MCP→New MCP Serverand use the config above.
# Project gemini mcp add next-devtools npx next-devtools-mcp@latest # Global gemini mcp add -s user next-devtools npx next-devtools-mcp@latest
Add to.gemini/antigravity/mcp_config.json:
{ "mcpServers": { "next-devtools": { "command": "npx", "args": ["-y", "next-devtools-mcp@latest"] } } }
code --add-mcp '{"name":"next-devtools","command":"npx","args":["-y","next-devtools-mcp@latest"]}'
Or follow the official VS Code MCP setup guide.
Settings | AI | Manage MCP Servers→+ Add:
- Name:next-devtools
- Command:npx
- Arguments:-y, next-devtools-mcp@latest
Next.js 16+ enables its MCP endpoint by default athttp://localhost:3000/_next/mcp.next-devtools-mcpdiscovers and connects to it automatically — no config needed.
Then ask your agent about the running app:
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?
The agent callsnextjs_indexto discover servers, thennextjs_callto query their real state.
The gateways do not do the work themselves — they tell the agent where the docs are or how to install/run the CLI, and the agent runs it directly (faster than proxying through MCP).
Scans common ports for running Next.js 16+ dev servers and lists each server's built-in runtime tools at/_next/mcp. No parameters.
Runtime tools exposed by Next.js (varies by version):
- get_errors— current build, runtime, and type errors
- get_logs— path to the dev log file (browser console + server output)
- get_page_metadata— routes, pages, component metadata
- get_project_metadata— project structure, config, dev server URL
- get_server_action_by_id— resolve a Server Action ID to its source file
Output: JSON listing discovered servers (port, PID, URL) and their tools.
Calls one runtime tool on a discovered server. Runnextjs_indexfirst to find the port and tool name.
- port(required) — dev server port
- toolName(required) — runtime tool to invoke
- args(optional) — arguments object, only if the tool requires them
{ "port": 3000, "toolName": "get_errors" }
Output: JSON with the tool's result.
Doesnotfetch docs. Next.js 16+ ships its full docs (markdown, matching your installed version) atnode_modules/next/dist/docs/. This tool returns that path and how to read it, so the agent uses version-accurate docs instead of training-data guesses. On older Next.js, it recommendsnpx @next/codemod@latest upgrade latest.
Input:topic(optional),project_path(optional, defaults to cwd).
Doesnotdrive the browser. It detects whetheragent-browseris installed and returns either the entry point (agent-browser skills get core --full) or the install steps (npm install -g agent-browser, thenagent-browser install), so the agent runs the CLI directly.
Input:task(optional) — used only to tailor the guidance.
Starting in 0.4.0,next-devtools-mcpis a thin connector.
- nextjs_docsno longer fetches docs over the network. It points the agent at the docs Next.js bundles atnode_modules/next/dist/docs/(or recommends upgrading). Thenextjs-docs://llms-indexresource is removed.
- inittool — it only enforced the old docs-fetch workflow.
- upgrade_nextjs_16andenable_cache_componentstools and their prompts — now distributed as agent skills.
- Allcache-components://,nextjs16://, andnextjs-fundamentals://resources — superseded by the bundled docs.
What remains:nextjs_index,nextjs_call,nextjs_docs, andbrowser_eval.
next-devtools-mcpcollects anonymous usage telemetry to improve the tool:
- Tool usage— which MCP tools are invoked (e.g.nextjs_index,nextjs_call)
- Error events— anonymous error messages when tools fail
- Session metadata— session ID, timestamps, basic environment (OS, Node.js version)
Not collected:your code, file contents or paths, personal data, credentials, or tool arguments (only tool names).
Local files live under~/.next-devtools-mcp/(anonymoustelemetry-id,telemetry-salt, and a debug logmcp.log).
Opt outby setting the environment variable (add it to~/.zshrc/~/.bashrcto persist):
ERR_MODULE_NOT_FOUNDreferencingnext-devtools-mcp/dist— clear your npx cache and restart your MCP client. The server reinstalls fresh.
[error] No server info found—nextjs_index/nextjs_callneed a running Next.js 16+ dev server:
- Start it:npm run dev
- Confirm Next.js 16+ (the/_next/mcpendpoint only exists there)
- Verify it started without errors
browser_evalandnextjs_docswork without a dev server.
git clone https://github.com/vercel/next-devtools-mcp.git cd next-devtools-mcp pnpm install pnpm build
Point your MCP client at the local build:
{ "mcpServers": { "next-devtools": { "command": "node", "args": ["/absolute/path/to/next-devtools-mcp/dist/index.js"] } } }
codex mcp add next-devtools-local -- node dist/index.js
See theNext.js MCP documentationfor how MCP works with Next.js and coding agents.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
A demonstration server for ActionKit, providing access to Slack actions via Claude Desktop.
MCP server that lets Claude Code agents delegate tasks to agents in other project directories, with parallel dispatch, sessions, and async jobs.
Anchor Browser (https://anchorbrowser.io) is secure infrastructure for computer-use agents — stealth cloud browsers, authentication, captcha bypass, and a hosted MCP server for Cursor, Claude, and Windsurf.
Open-source Claude Code plugin replacing Read/Grep/Edit/Bash with token-efficient versions. Independently benchmarked at 57% token reduction on real codebases. 40 MCP tools.
Connects Blender to Claude AI via the Model Context Protocol (MCP), enabling direct interaction and control for prompt-assisted 3D modeling, scene creation, and manipulation.
Context-optimized security plugin for Claude Code that builds architecture maps and redacts secrets.
Charon gives AI clients scoped, auditable access to Lethe memory. connect to Chatgpt or Claude to store memories locally.
Score CLAUDE.md/AGENTS.md, validate clarx-manifest.json, generate CI workflows, and pull repo scan findings into Cursor, Claude, or Grok.
Retrieve and analyze Claude Code conversation history from local files.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





