Overview of Next.js MCP Server capabilities
Next.js provides two MCP (Model Context Protocol) servers to allow AI coding agents to interact with applications via a standardized interface. For the best experience, it is recommended to use both:
- Built-in Next.js MCP Server (Next.js 16+): Runs within the dev server. It provides access to real-time application state, runtime information, page metadata, routes, rendering details, build/runtime errors, development logs, Server Actions, and component hierarchies.
- Next DevTools MCP (External Package): A separate package (
next-devtools-mcp) providing a Next.js Knowledge Base for best practices, migration/upgrade tools (including codemod helpers for Next.js 16), Cache Components guidance, and Playwright MCP integration for browser testing. It can automatically detect and communicate with a running Next.js dev server.