next-devtools-mcp-skill

Diagnose, document, and test Next.js applications through the next-devtools-mcp server.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill next-devtools-mcp-skill-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: next-devtools-mcp-skill
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/next-devtools-mcp-skill
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill next-devtools-mcp-skill-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires next-devtools-mcp.

What problem does it solve? AI coding agents lack live access to Next.js runtime state and official documentation, forcing developers to manually debug errors, search docs, and verify pages by hand. This Skill connects agents to the next-devtools-mcp server so they can query errors, routes, and logs directly from a running Next.js 16+ dev server. ## Core Features & Use Cases - Runtime Diagnostics: Query a running Next.js 16+ dev server for errors, route structure, logs, config, and environment variables via the nextjs_index and nextjs_call tools. - Documentation Search: Search and retrieve official Next.js docs with the nextjs_docs two-step workflow before implementing features like generateMetadata or Cache Components. - Browser Automation: Test and verify pages with Playwright through browser_eval, including navigation, form filling, screenshots, and console message inspection. - Guided Workflows: Run pre-configured prompts to upgrade from Next.js 15 to 16 or enable Cache Components mode. - Use Case: A user reports a blank page in their Next.js app; the agent initializes context, calls nextjs://errors to find a "window is not defined" server component error, searches the docs, and applies the "use client" fix. ## Quick Start Ask the agent to initialize Next.js DevTools context and show what errors are in your running Next.js application.

Frequently Asked Questions about next-devtools-mcp-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug runtime errors in my Next.js app with an AI agent?▼

Install next-devtools-mcp, start your Next.js 16+ dev server, and ask the agent what errors are in your app. The agent calls nextjs_call with the nextjs://errors URI to retrieve runtime errors and warnings directly from the dev server.

How to set up next-devtools-mcp in Claude Code or Cursor?▼

Run npx add-mcp next-devtools-mcp@latest to install for all detected agents, or use claude mcp add next-devtools npx next-devtools-mcp@latest for Claude Code. In Cursor, add a new MCP server in Settings with the npx command.

Does next-devtools-mcp work with Next.js versions below 16?▼

Documentation search and browser automation work regardless of version, but runtime diagnostics via nextjs_index and nextjs_call require Next.js 16 or later. The dev server must be running so the MCP endpoint at /_next/mcp is available.

Why are runtime diagnostics not available in next-devtools-mcp?▼

This happens when Next.js is below version 16, the dev server is not running, or a custom port is used. Verify the version with npm list next, start the server with npm run dev, and check the configured port in next.config.ts.

Can I automate browser testing of Next.js pages with Playwright?▼

Yes, the browser_eval tool starts a Playwright browser, navigates to URLs, clicks elements, fills forms, takes screenshots, and reads console messages. For Next.js 16+ error detection, prefer nextjs_call over browser console messages.

How do I upgrade a Next.js 15 app to version 16 with Cache Components?▼

Invoke the upgrade-nextjs-16 prompt to update dependencies, apply codemods, and adjust configuration, then run the enable-cache-components prompt to add cache components mode to next.config.ts. Verify the result with browser_eval and nextjs://errors.