If you want an AI setup for Next.js that is small and reliable, this is the stack that solves problems and don't get in your way.
Agent: OpenCode
My AI agent of choice. It is open source, well documented, and ships new features quickly. The ability to switch models at any time matters to me, and it beats vendor-locked solutions. Check it out.
MCP
You can add dozens of MCPs, but if you only pick one, make it the official Next.js MCP Server. It is the only one I would call a must-have.
Instructions for adding it are in the project README.
Once integrated, your agent can check logs and even connect to the browser. It tightens the feedback loop and enables fixes without human intervention.
Docs
Next.js has its own tricks and quirks, so referencing docs for best practices is a must (maybe another confusing cache strategy landed yesterday; you never know). When the dust settled after introducing Skills, Vercel quickly found out they were not as amazing as advertised.
AGENTS.md was the answer all along. Use this one-liner to add current docs to your agent context:
npx @next/codemod@canary agents-md