next-devtools-mcp  by vercel

Next.js development server for AI coding agents

Created 3 weeks ago

New!

285 stars

Top 91.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

next-devtools-mcp provides a Model Context Protocol (MCP) server tailored for Next.js development, enabling AI coding assistants like Claude and Cursor to automate tasks, access internal project state, and leverage comprehensive documentation. It bridges the gap between AI agents and running Next.js applications, offering developers enhanced productivity through intelligent automation and debugging capabilities.

How It Works

This project implements an MCP server that exposes Next.js development utilities as callable tools. It integrates directly with AI coding assistants by providing a standardized interface to interact with running Next.js dev servers. The server facilitates direct communication, allowing agents to query internal state, diagnostics, and errors, and to execute automated tasks such as application upgrades or component setup, leveraging the Next.js runtime and documentation context.

Quick Start & Requirements

Requires Node.js v20.19 or a newer LTS version, along with npm or pnpm. Installation involves configuring your MCP client with the provided JSON snippet, specifying npx next-devtools-mcp@latest as the command. Various AI clients (Amp, Claude Code, Codex, Cursor, Gemini, VS Code, Warp) offer specific CLI commands or UI integrations for simplified setup. For Next.js internal state access, Next.js v16 or later with MCP enabled is recommended.

Highlighted Details

  • MCP Tools: Offers automated codemods for upgrade-nextjs-16 and enable-cache-components setup.
  • Next.js Documentation: The nextjs_docs tool provides access to an extensive Next.js 16 knowledge base and official documentation, searchable by query and category.
  • Browser Testing: Integrates Playwright via the browser_eval tool for automated browser testing, navigation, interaction, screenshots, and console error capture.
  • Internal State Access: The nextjs_runtime tool allows querying running Next.js instances for errors, build status, routes, and diagnostics.
  • Knowledge Base: On-demand loading of Next.js 16 resources (overview, core mechanics, caching, APIs, errors, testing) for AI context.

Maintenance & Community

The provided README does not contain specific details regarding maintainers, community channels (like Discord/Slack), or project roadmaps.

Licensing & Compatibility

The project is released under the permissive MIT License, allowing for broad compatibility with commercial and closed-source applications.

Limitations & Caveats

Features like internal state access via nextjs_runtime necessitate Next.js v16 or later. The upgrade_nextjs_16 codemod requires a clean Git repository state for execution. The browser_eval tool's console message functionality is noted as a fallback, with nextjs_runtime being the preferred method for Next.js projects.

Health Check
Last Commit

22 hours ago

Responsiveness

Inactive

Pull Requests (30d)
69
Issues (30d)
7
Star History
292 stars in the last 22 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Taranjeet Singh Taranjeet Singh(Cofounder of Mem0), and
6 more.

fragments by e2b-dev

0.2%
6k
Next.js template for AI-generated apps
Created 1 year ago
Updated 5 days ago
Feedback? Help us improve.