Connect Next.js DevTools MCP to VS Code
Vercel's MCP server for Next.js. It connects to your running dev server so agents can read build and runtime errors, routes and logs, and search the Next.js docs.
MCP serverOfficialChecked 2026-11-16
Before you start
- VS Code installed (see its MCP documentation (opens in a new tab)).
- Next.js DevTools MCP is available on macOS, Windows and Linux.
- Needs Next.js 16 or later. Start the dev server (
npm run dev) before the agent connects; it serves the endpoint the MCP server talks to. Error and page tools read from pages open in a browser.
Step 1: Add Next.js DevTools MCP to VS Code
Add it from the terminal
Adds the server to your VS Code profile, so it works in every workspace.
Terminal code --add-mcp '{"name":"next-devtools","type":"stdio","command":"npx","args":["-y","next-devtools-mcp@latest"]}'Or add it to the workspace
Add this to
.vscode/mcp.jsonand commit it to share it with your team..vscode/mcp.json { "servers": { "next-devtools": { "type": "stdio", "command": "npx", "args": [ "-y", "next-devtools-mcp@latest" ] } } }Step 2: Check it's connected
Run MCP: List Servers from the Command Palette, then open Copilot Chat in Agent mode and check the tools picker.
Step 3: Try a first request
Ask VS Code something that only works with Next.js DevTools MCP connected:
Say to VS Code Check my running Next.js dev server for build or runtime errors and explain how to fix the first one.
If it doesn't work
- VS Code asks you to trust a server the first time it starts. Accept it, or the tools stay hidden.
code --add-mcpwrites to your user profile, so the server works in every workspace.- Use MCP: List Servers → Show Output to see startup errors.





