Skip to main content
Glama
nanameru

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: Documentation MCP Server

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 SettingsMCPAdd 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoOptional user query, error message, or code snippet used by the client to decide invocation
filePathNoOptional current file path used by the client to decide invocation
statusYesCosmetic flag to ensure clients log arguments/header (e.g., 'executing')executing

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses behavioral traits such as returning a list of URLs, requiring agents to fetch content post-call with specific constraints (10s timeout, concurrency limit of 3, follow redirects), and handling failures by trying next URLs. However, it doesn't mention rate limits, authentication needs, or potential errors from the tool itself, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for auto-trigger guidance, post-call instructions, and tool purpose. It's appropriately sized for its complexity, but some sentences could be more concise (e.g., the post-call instructions are detailed but slightly verbose). Overall, it's front-loaded with purpose and efficient in conveying necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (no annotations, no output schema, but rich behavioral guidance), the description is complete. It covers purpose, usage guidelines, behavioral traits, and post-processing steps thoroughly. The absence of an output schema is compensated by explaining the return type (list of URLs) and how to handle it, making it sufficient for an AI agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds context by explaining how 'context' and 'filePath' are used by clients for invocation decisions, but it doesn't provide additional syntax or format details beyond what the schema states. With high schema coverage, a baseline score of 3 is appropriate as the description adds minimal extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Provide all Next.js documentation URLs for AI agents.' It specifies the exact resource (Next.js documentation URLs) and the action (provide all of them). The description distinguishes this tool by emphasizing it returns a 'comprehensive list' for agents to fetch from, which is specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool, including auto-trigger conditions based on user queries, error keywords, and file paths. It also includes post-call instructions for how agents should handle the output, specifying actions like fetching top URLs and fallback strategies. This covers both invocation timing and post-processing steps comprehensively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool update
    • First observedget_all_docs

TDQS

A4.1/5.0
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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nanameru/Next.js-Docs-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server