Dev Servers as Agent-Readable Runtime APIs

articlenextjsmcpaiagent-toolsdeveloper-experiencejoelclaw

maps to joelclaw.com web work because coding agents can query live Next.js errors, routes, page metadata, and logs instead of guessing from files

Next.js added Model Context Protocol support that lets coding agents talk to a running app through the dev server. Not just read files. Not just scrape terminal output. The app exposes live state through /_next/mcp, and next-devtools-mcp connects an agent to it.

That is the useful bit: the development server becomes an agent-readable runtime API. An agent can ask for current errors, logs, page metadata, project metadata, routes, and Server Actions by ID. That is much better than watching an agent hallucinate what the browser is probably doing based on a stack trace from six minutes ago.

For joelclaw, this belongs in the default Next.js agent loop for web work. Agents touching joelclaw.com should be able to ask the app what routes exist, what page is rendering, what errors are live, and where the logs are. Pair it with Playwright MCP, and the loop gets both runtime diagnostics and browser verification. Joel’s Slack note was blunt: “definitely use this”.

Key Ideas