What it does
next-devtools-mcp bridges AI coding agents (Claude, Cursor, Copilot, Amp) into Next.js development environments. For Next.js 16+, it connects to the dev server's built-in MCP endpoint to provide real-time visibility into runtime errors, route structure, and development server logs. It also exposes Next.js official documentation and automation tools that help with version upgrades and feature enablement across all Next.js versions. The server uses stdio transport and discovers the dev server automatically when properly initialized.
Who it's for
Next.js developers using MCP-compatible AI coding agents who want their assistant to see the actual state of their running application—errors, route organization, server logs, current configuration—rather than reasoning about code patterns and architecture in isolation. Useful for teams that want AI assistance grounded in live dev server diagnostics.
Common use cases
- Query the running dev server for compilation errors and warnings without switching to the terminal
- Ask Claude to inspect your route structure and middleware stack based on live app state
- Get guided assistance upgrading Next.js versions with awareness of your current configuration
- Search Next.js official documentation in context while building features or troubleshooting
- Auto-initialize MCP context at session start so your agent has persistent dev server visibility
Setup pitfalls
- Requires Node.js v20.19 LTS or newer; older versions fail silently during connection attempts without clear error messages
- For runtime diagnostics on Next.js 16+, the dev server must be running and listening on the expected port; explicit
inittool call is required to establish the MCP binding - Marked
risk_class: highbecause it reads/writes the filesystem and makes network calls to the local dev server—review agent file permissions in untrusted or sandboxed environments - Versions prior to Next.js 16 only support documentation and automation tools; live runtime inspection requires Next.js 16 or later