Next.js Enhances Agent Integration with MCP and Structured Visibility
Key Points
- MCP integration exposes Next.js runtime state to agents
- Vector in-browser agent experiment sunset after learning overlap with existing tools
- Agent-first design philosophy drives framework visibility improvements
Summary
Next.js has spent the past year improving agent experience by addressing the core problem that agents couldn't see browser runtime state. After experimenting with an in-browser agent called Vector and implementing MCP integration, the team learned that treating agents as first-class users is key to better framework support.
Key Points
- Browser Visibility Problem: Agents couldn't see runtime errors, client-side warnings, or rendered components, making debugging requests like "fix the error" ineffective
- Vector Experiment: Built an in-browser chat agent with UI selection and Next.js best practices, but sunset it due to overlap with existing coding agents like Cursor and Claude
- MCP Integration: Implemented Model Context Protocol to expose internal Next.js state (errors, routes, rendered segments) and enable agent discovery of dev servers via
next-devtools-mcp - Agent-First Design: Adopted mindset of treating agents as first-class users, leading to better terminal logging, compressed docs index (
agents.md), and structured workflows - Future Plans: Working on
npx @next/codemodfor project-specific docs generation and expanding eval suite, with goal of building agent context directly intonext dev