Install
npx add-mcp next-devtools-mcp@latestWho it's for
For people already running a Next.js 16+ development server who want a coding agent (the evidence examples Claude and Cursor) to see live runtime errors, routes, and logs. The evidence states: next-devtools-mcp is a thin connector; it discovers local Next.js 16+ dev servers and proxies their built-in MCP endpoint /_next/mcp.
You must already have Node.js v20.19 or a newer LTS, plus npm or pnpm. nextjs_index / nextjs_call also require the development server to be running. Without a running Next 16+ process, do not expect the runtime tools.
Docs and migration workflows no longer live in this server: docs are at node_modules/next/dist/docs/; upgrade / Cache Components are distributed as agent skills.
First try in 3 minutes
Follow the install command on the page (do not treat the manual JSON as a second main path at the same time):
npx add-mcp next-devtools-mcp@latest
Add -y to skip the prompt and install to all detected agents; add -g to install globally across projects. The equivalent client config is npx -y next-devtools-mcp@latest, for comparison only; the first try follows add-mcp.
Preconditions: you already have a Next.js 16+ project locally, and next dev is already running. This will discover the local development server and read runtime information; it is not a sandbox with no network and no local project.
Where to configure: add-mcp writes into detected MCP clients; or write it manually under the client’s mcpServers.next-devtools.
Low-risk first call: first call nextjs_index to discover running dev servers and list each one’s runtime MCP tools. Do not call nextjs_call first to trigger Server Actions. nextjs_docs and browser_eval are gateways, not workers that do the job.
Success signal: nextjs_index lists at least one running Next.js 16+ server and its runtime tools. If the list is empty, start the dev server first; do not switch to browser automation.
Use cases
Case 1: Confirm whether the agent can see the current dev server. Call nextjs_index. The evidence guarantees it discovers running servers and lists each one’s runtime MCP tools; it does not write a port-scan range or multi-project selection parameters. What you can confirm: you see the servers currently discovered.
Case 2: Read errors, routes, or logs on one already-discovered server. After nextjs_index, call nextjs_call. The evidence states callable runtime capabilities include errors, routes, logs, Server Actions. The first three are observational; Server Actions may change application state. The first time, only take errors/routes/logs; do not invoke Server Actions first. nextjs_docs only points the agent at version-accurate node_modules/next/dist/docs/.
Limits
This is a proxy, not a full Next docs site, and not the browser-automation body. browser_eval only points at the agent-browser CLI. Docs and migration no longer live in this server. Runtime tools depend on Next.js 16+ with a running dev server. The evidence does not write nextjs_call parameter fields, and has no undo path for Server Actions. Do not treat a read-only log query and triggering Server Actions as the same risk.