Next.js is transforming how AI agents work with developers through MCP integration and new developer tools
Kawin Suangkaew
Next.js is transforming how AI agents work with developers through the integration of MCP (Model Context Protocol) and new developer tools
Over the past few years, we have seen tremendous growth in AI coding agents like Cursor, Claude Code, and many others. But the fundamental problem every developer faces is that agents cannot see what is happening in the browser
Imagine this: you see an error in the browser, you copy the error details and paste them into an AI editor, then ask to fix the error. But the problem is the agent does not know what error you are talking about because it cannot access the browser runtime.
The Next.js team started by building Vector, an in-browser chat agent that works like smart devtools. Vector allowed developers to select elements on the page, see their source code, and prompt for changes directly.
Vector had Next.js best practices baked in, which helped agents avoid hallucination or generating incorrect code. However, Vector was eventually sunset because it overlapped with general coding agents that developers were already using.
Model Context Protocol (MCP) is Next.js answer. MCP is a protocol that helps agents see the internal state of Next.js, including errors and warnings, routes and segments being rendered, various internal states, and Server Actions being invoked.
MCP also helps agents discover running dev servers and communicate with them effectively through next-devtools-mcp
The most important lesson from this development is thinking from the agent perspective. It is not just about providing information, but asking: What information does the agent need? When does it need it? How does it consume that information?
This mindset led to practical changes. If agents read terminal output during development, then logging Server Action invocations gives them the hints they need. If agents struggle with framework concepts not in their training data, then embedding a compressed docs index (agents.md) provides better context than documentation alone.
The Vercel team has created Next.js Skills, which are background skills that help prevent common mistakes. These include:
The Next.js team is working to make agent support easier to adopt. You can run npx @next/codemod to generate an updated docs index for your project, and they are expanding their eval suite to cover more Next.js 16 APIs.
Long-term, Next.js wants agents to get the right context automatically without any setup through next dev. Debugging is becoming a tight feedback loop between code, runtime, and AI - and Next.js is ready for this future.