Skip to content

Next.js MCP server: install, tools and limits

Better Design

Direct answer

The Next.js MCP server, next-devtools-mcp, connects a coding agent to your running Next.js dev server. It runs over local stdio, connected to the dev server at http://localhost:3000/_next/mcp, needs no sign-in, and exposes 4 tools.

A hand-drawn terminal that connects a coding agent to Next.js MCP server, with the server's name and tool count written beside it.

What Next.js MCP server does

The Next.js MCP server, next-devtools-mcp, connects a coding agent to your running Next.js dev server. From Next.js 16 the dev server exposes an MCP endpoint at /_next/mcp, so the agent can read errors, routes and page metadata while it edits.

Vercel maintains it. The latest release on npm is next-devtools-mcp 0.4.0, published June 24, 2026. It is licensed under MIT.

How a coding agent uses Next.js MCP server

The agent asks, Next.js MCP server acts, and the result comes back into the session.

A hand-drawn three-step flow from the coding agent to Next.js MCP server and back: Why does this page throw a hydration error?, Reads errors and page metadata from the dev server, The error, the route and the files that render it.
  1. The agent asks: Why does this page throw a hydration error?
  2. Next.js MCP server acts: Reads errors and page metadata from the dev server
  3. The result comes back: The error, the route and the files that render it

Install Next.js MCP server in Claude Code

terminal
claude mcp add next-devtools npx next-devtools-mcp@latest

Install Next.js MCP server in Cursor

Cursor MCP settings (mcp.json)
{
  "mcpServers": {
    "next-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "next-devtools-mcp@latest"
      ]
    }
  }
}

Install Next.js MCP server in VS Code

terminal
code --add-mcp '{"name":"next-devtools","command":"npx","args":["-y","next-devtools-mcp@latest"]}'

Install Next.js MCP server in Codex

terminal
codex mcp add next-devtools -- npx next-devtools-mcp@latest

The 4 tools Next.js MCP server gives your agent

Next.js MCP server lists these names in its own documentation, read on November 12, 2026. Your agent sees each one as a tool it can call.

  • nextjs_index
  • nextjs_call
  • nextjs_docs
  • browser_eval
  • Runtime tools from the dev server, called through nextjs_call: get_errors, get_logs, get_page_metadata, get_project_metadata, get_routes, get_server_action_by_id, get_compilation_issues, compile_route, get_request_insights

Settings worth knowing in Next.js MCP server

experimental.mcpServer (next.config)
What it changes

The endpoint is enabled by default. To disable it, set experimental.mcpServer to false in next.config.

Server

Next.js MCP server

experimental.requestInsights (next.config)
What it changes

Required by get_request_insights.

Server

Next.js MCP server

NEXT_TELEMETRY_DISABLED=1
What it changes

Opt out of next-devtools-mcp anonymous usage telemetry.

Server

Next.js MCP server

Sign-in, limits and caveats for Next.js MCP server

Sign-in: None. It talks to your local Next.js dev server.

Limits and price: The package is open source under MIT and free to run. Its documentation states no usage limit.

  • nextjs_index and nextjs_call need a running Next.js 16+ dev server; the /_next/mcp endpoint only exists there.
  • Requires Node.js v20.19 or a newer LTS version.
  • get_errors and get_page_metadata read from active browser sessions, so the page must be open in a browser; get_compilation_issues and compile_route are Turbopack only.

Use Next.js MCP server for interface work

While an agent edits pages, it can call get_errors to catch hydration and runtime errors, get_routes and get_page_metadata to see what renders a page, and compile_route to check a route compiles without running next build.

Steal this workflow

Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.

Read the guide "Next.js MCP server: install, tools and limits" at https://better-design.com/blog/nextjs-mcp-server and help me apply it to my project.

The Next.js MCP server, next-devtools-mcp, connects a coding agent to your running Next.js dev server. It runs over local stdio, connected to the dev server at http://localhost:3000/_next/mcp, needs no sign-in, and exposes 4 tools.

Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.

Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.

Questions

What does Next.js MCP server do?

The Next.js MCP server, next-devtools-mcp, connects a coding agent to your running Next.js dev server. From Next.js 16 the dev server exposes an MCP endpoint at /_next/mcp, so the agent can read errors, routes and page metadata while it edits.

Does Next.js MCP server need an API key or sign-in?

None. It talks to your local Next.js dev server.

Is Next.js MCP server free?

The package is open source under MIT and free to run. Its documentation states no usage limit.

Which coding agents can use Next.js MCP server?

Its documentation shows a setup for Claude Code, Cursor, VS Code, Codex. Any client that speaks MCP over local stdio, connected to the dev server at http://localhost:3000/_next/mcp can connect.

Where these Next.js MCP server facts come from

Each fact on this page comes from Next.js MCP server's own repository, documentation or package registry, read on November 12, 2026.

Add design rules next to it

Next.js MCP server gives the agent its tools. It does not tell the agent what a good screen looks like. Better Design adds that part: a design system, interface principles and review rules that the agent calls while it builds.