Skip to main content
Glama
Next.js Docs MCP

Next.js Docs MCP

by nanameru

Next.js Docs MCP

A Model Context Protocol (MCP) server that provides all Next.js documentation URLs to AI agents like Claude for intelligent document selection. This server contains a comprehensive static database of Next.js documentation pages and enables AI agents to analyze and select the most relevant documentation based on user queries.

Key Features

  • AI Agent Integration: Provides all documentation URLs for Claude and other AI agents to analyze and select relevant docs

  • Comprehensive Static Database: Contains 200+ Next.js documentation URLs across all categories

  • No External Dependencies: Pure static URL database with no API calls or crawling required

  • Claude-Optimized: Specifically designed for Claude to intelligently select relevant documentation

  • npx-Ready: No local installation needed - run via npx from any MCP client

Related MCP server: Next.js DevTools MCP

Requirements

  • Node.js 18 or newer

  • VS Code, Cursor, Windsurf, Claude Desktop, Goose, LM Studio, or any other MCP client

Getting Started

Installation

Standard config works in most tools:

{
  "mcpServers": {
    "nextjs-docs-mcp": {
      "command": "npx",
      "args": ["@taiyokimura/nextjs-docs-mcp@latest"]
    }
  }
}

Install in VS Code Install in VS Code Insiders

Client-Specific Setup

Use the Claude Code CLI to add the MCP server:

claude mcp add nextjs-docs-mcp -- npx @taiyokimura/nextjs-docs-mcp@latest

Remove if needed:

claude mcp remove nextjs-docs-mcp

Follow the MCP install guide and use the standard config above.

Go to Cursor Settings → MCP → Add new MCP Server.

Use the following:

  • Name: nextjs-docs-mcp

  • Type: command

  • Command: npx

  • Args: @taiyokimura/nextjs-docs-mcp@latest

  • Auto start: on (optional)

Add via CLI:

code --add-mcp '{"name":"nextjs-docs-mcp","command":"npx","args":["@taiyokimura/nextjs-docs-mcp@latest"]}'

Or use the install links above.

Add MCP Server with:

  • Command: npx

  • Args: ["@taiyokimura/nextjs-docs-mcp@latest"]

Advanced settings → Extensions → Add custom extension:

  • Type: STDIO

  • Command: npx

  • Args: @taiyokimura/nextjs-docs-mcp@latest

  • Enabled: true

Example ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "nextjs-docs-mcp": {
      "type": "local",
      "command": [
        "npx",
        "@taiyokimura/nextjs-docs-mcp@latest"
      ],
      "enabled": true
    }
  }
}

Open Qodo Gen → Connect more tools → + Add new MCP → Paste the standard config above → Save.

Follow Windsurf MCP documentation and use the standard config above.

Available Tools

1. get_all_docs

Get all Next.js documentation URLs for AI agents to analyze and select relevant ones.

Parameters:

  • None required

Description: This tool returns a comprehensive list of all Next.js documentation URLs organized by categories. AI agents like Claude can use this list to analyze user queries and select the most relevant documentation pages. The tool provides structured data including titles, URLs, descriptions, and categories for intelligent document selection.

Response Format: The tool returns a formatted list containing:

  • Document titles

  • Direct URLs to Next.js documentation

  • Brief descriptions

  • Category classifications

  • Total count of available documents

Usage Examples

Get all Next.js documentation URLs:

{
  "tool": "get_all_docs"
}

Claude Integration Example:

  1. User asks: "Next.jsのエラーを解消したいです"

  2. Claude calls: get_all_docs

  3. MCP server returns: All 200+ Next.js documentation URLs with titles, descriptions, and categories

  4. Claude analyzes the list and selects relevant documents:

    • "Getting Started: Error Handling"

    • "Routing: Error Handling"

    • "API Routes Error Handling"

  5. Claude provides targeted documentation links to the user

Integration with Claude Code:

# Claude Code内で使用
claude mcp add nextjs-docs-mcp -- npx @taiyokimura/nextjs-docs-mcp@latest

Then Claude can automatically call the tool when users ask Next.js-related questions.

Development

Building the Package

npm run build

Publishing to npm

  1. Update the package name in package.json to your scope (e.g., @taiyokimura/nextjs-docs-mcp)

  2. Build the project: npm run build

  3. Publish: npm publish

Updating Documentation URLs

The server uses a static database of Next.js documentation URLs. To update or add new documentation URLs, modify the NEXTJS_DOCS_DATABASE object in src/index.ts. The database is organized by categories and contains 200+ documentation pages covering:

  • Getting Started guides

  • Routing (App Router & Pages Router)

  • Data Fetching patterns

  • API Routes

  • Deployment guides

  • Performance optimization

  • Guides and best practices

The static approach ensures fast response times and no external dependencies.

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for any improvements.

Available Tools

1 tool
get_all_docsA

Provide all Next.js documentation URLs for AI agents.

Auto-trigger guidance (for clients):

  • Run when the user asks about 'Next.js', 'Nextjs', 'Next', or mentions topics like 'App Router', 'Pages Router', 'Route Handlers', 'data fetching', 'deployment', 'turbopack', 'Vercel'.

  • Run when the user reports errors containing keywords like 'Next.js error', 'build error', 'routing error', 'hydration error', 'module not found', 'next.config.js', 'middleware', 'Image', 'Link', 'Route Handler'.

  • Run when an active file path suggests a Next.js app, e.g. 'next.config.js', 'app/', 'pages/', 'middleware.ts/js', or imports starting with 'next/'.

Post-call agent instructions (MUST DO):

  • After receiving the list, FETCH the content of the top relevant URLs (at least the first 3–5) to ground answers in the actual docs.

  • Use standard HTTP GET with a 10s timeout, follow redirects, and limit concurrency to 3 to be polite.

  • Prefer pages whose title/URL matches the user's query or error message; summarize only after fetching.

  • If fetching fails, try the next candidate URL and report which ones were fetched. This tool returns a comprehensive list so the agent can pick and fetch the most relevant docs.

Inputs: status (required), context, filePath.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of confusion or overlap between tools. The tool 'get_all_docs' has a single, clear purpose: to provide all Next.js documentation URLs for AI agents. This eliminates any ambiguity in tool selection.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'get_all_docs' follows a clear verb_noun pattern (get + all_docs), which is straightforward and descriptive, leaving no room for inconsistency.

    Tool Count2/5

    A single tool for a documentation server is too few for the apparent scope, as it only provides URLs without direct operations like searching, filtering, or fetching specific content. This forces agents to handle all complexity externally, making the tool surface thin and limiting functionality.

    Completeness2/5

    The tool surface is severely incomplete for a documentation server. It lacks essential operations such as searching documentation, fetching content directly, or accessing specific sections. While it provides URLs, agents must implement additional steps to retrieve and process content, creating gaps that could lead to inefficiencies or failures.

    Related MCP Connectors

    Related MCP Servers