# next-devtools-mcp

Wires your coding agent into a running Next.js dev server so it reads real errors, routes and logs.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 832
- Author: vercel
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/vercel/next-devtools-mcp
- Updated: 2026-09-15
- HTML: https://affpapa.org/en/nevibecode/mcp/next-devtools-mcp

## What it does

This is a thin connector, not a toolbox. It finds Next.js 16+ dev servers on your machine and proxies the built-in MCP endpoint at `/_next/mcp`, so the agent queries the app's actual state instead of guessing from source files.

Four tools ship with it. `nextjs_index` scans ports and returns every server it finds along with that server's runtime tools; `nextjs_call` invokes one of those tools on a given port. The other two are gateways: `nextjs_docs` points the agent at the docs bundled with your installed Next.js under `node_modules/next/dist/docs/`, and `browser_eval` tells it how to install and run the `agent-browser` CLI. Gateways hand off instructions — the agent does the work itself.

Node.js v20.19 or a newer LTS release is required, plus npm or pnpm. The runtime tools need a live Next.js 16+ dev server; without one there is nothing to discover. Upstream calls, response-body reads included, are cut off after 60 seconds, so this is not the path for long-running operations.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add next-devtools-mcp -- npx -y next-devtools-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add next-devtools-mcp -- npx -y next-devtools-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "next-devtools-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "next-devtools-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "next-devtools-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "next-devtools-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add next-devtools-mcp npx -y next-devtools-mcp
```

## When to use it
- check which build, runtime and type errors the app currently has
- list routes and page metadata from the live dev server
- locate the dev log file for browser console and server output
- resolve a Server Action ID back to its source file
- read docs that match the installed Next.js version

## Example prompts
- What errors is my Next.js app throwing right now?
- List the routes the running dev server exposes
- Show me what landed in the dev server logs

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
