Next.js DevTools MCP (Model Context Protocol) is a server-side component designed to extend Next.js development environments with AI agent capabilities. It provides a standardized interface for coding agents like Claude or Cursor to interact with and introspect running Next.js applications, enabling advanced features such as runtime diagnostics, code generation, and debugging assistance. The current stable version is `0.3.10`, with frequent patch releases indicating active development and a focus on stability, security, and incremental improvements. Key differentiators include its tight integration with the Next.js ecosystem, leveraging its internal mechanisms for deep introspection, and its adherence to the Model Context Protocol, making it compatible with a growing number of AI developer tools. It acts as a crucial bridge, allowing AI agents to understand the context of a Next.js project and provide highly relevant assistance, offering capabilities like automated upgrades, Cache Component setup, and access to documentation.
npm install next-devtools-mcpVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to set up and run a Next.js 16+ project, and then configure an AI agent to connect to the `next-devtools-mcp` server for enhanced development capabilities and runtime diagnostics.
Upgrade `next-devtools-mcp` to version `0.3.7` or later to include the `@modelcontextprotocol/sdk` update to `1.24.3` (which includes the fix for `1.24.0`). Ensure all MCP-related dependencies are kept up-to-date.
Upgrade `next-devtools-mcp` to version `0.3.7` or later. More critically, ensure your Next.js application is upgraded to Next.js `16.0.7` or a patched version of Next.js 15.x/16.x that addresses CVE-2025-55182. Deploy platform-level WAF rules where applicable.
Upgrade to `next-devtools-mcp v0.3.0` or later. Migrate any client configurations or custom integrations to use the official MCP TypeScript SDK and remove references to experimental MCPs.
Upgrade `next-devtools-mcp` to version `0.3.1` or later to resolve internal CJS/ESM module resolution inconsistencies.
Upgrade `next-devtools-mcp` to version `0.3.3` or later to benefit from improved server discovery, particularly in WSL environments. Ensure your Next.js application is running (`npm run dev`) and correctly configured.
Upgrade `next-devtools-mcp` to version `0.3.8` or later to fix agent idle issues caused by strict reply prohibition.
Increase the `startup_timeout_ms` in your MCP client's configuration. For Codex on Windows, add `env = { SystemRoot="C:\Windows", PROGRAMFILES="C:\Program Files" }` and `startup_timeout_ms = 20_000` to `.codex/config.toml`.Ensure your Next.js project is version 16 or above. Verify that your Next.js development server is actively running (`npm run dev`). Confirm that `next-devtools-mcp` is correctly configured in your `.mcp.json` file or client settings and restart your development server if it was already running before connecting the MCP server.