I'm exploring the new MCP (Model Context Protocol) server introduced in Next.js 16, and I’d like to understand how to properly enable and use it in a development environment.
What I’ve done so far:
- Installed Next.js 16 via create-next-app
- Added experimental.mcp: true to next.config.js
- Started the dev server, but I'm not sure where or how to access the MCP endpoint
My questions:
- Where is the built-in MCP server exposed?
Is it available at a default route like /mcp, or do I need to define a custom route handler? - How do I use or query the MCP server manually or via an agent?
Is there a way to inspect component trees, Server Actions, or logs directly? - How do I configure next-devtools-mcp?
I’ve seen references to this package but couldn’t find clear setup instructions. ◦ What does it add on top of the built-in MCP server? ◦ How do I install and integrate it into my Next.js app?
Any guidance, examples, or links to documentation would be greatly appreciated!