Skip to main content
Glama

Next.js Docs MCP

by nanameru

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
get_all_docs

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.

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