MCP server Official

Context7 MCP

Upstash's MCP server that injects up-to-date, version-specific library docs and code examples into your prompt.

Author
Upstash
Works with
Any MCP client, Claude Code, Cursor
License
MIT
Documented
Oct 2, 2026

What Context7 MCP is

Context7 pulls current documentation and code examples straight from the source into the model's context, to avoid outdated or hallucinated APIs. It works as CLI plus skills, or as an MCP server.

What it does

How Context7 MCP plugs in: which agents run it and what it addsRUNS INYour agentAny MCP clientClaude CodeCursor3 hosts documentedMCP SERVER · OFFICIALContext7 MCPConnect the agent to tools, data…5 install steps1 permission notelicense: MITWHAT IT ADDSWhat it doesResolve a library name to a Conte…Fetch docs for a library ID and q…Match a specific library version…Accept direct library IDs like /v…agent → extension → new capability · from the official repository or docs
Where Context7 MCP runs and what it adds, from its documentation
  • Resolve a library name to a Context7 library ID (resolve-library-id)
  • Fetch docs for a library ID and question (query-docs)
  • Match a specific library version mentioned in the prompt
  • Accept direct library IDs like /vercel/next.js in prompts
  • Set up with one command: npx ctx7 setup

When to use it

Good fit

  • Coding against fast-changing libraries and frameworks
  • Avoiding hallucinated or outdated API usage

Not for

  • Questions that do not involve library documentation
  • Heavy use without an API key: README recommends one for higher rate limits

How to install Context7 MCP

You need: Node.js 18+ for the ctx7 CLI; Free API key recommended from context7.com/dashboard

  1. Install Node.js 18 or newer
  2. Run npx ctx7 setup (use --cursor, --claude or --opencode to target an agent)
  3. Choose CLI + Skills or MCP mode
  4. Or manually point your client at https://mcp.context7.com/mcp with an Authorization: Bearer API key header
  5. Optionally add a rule telling the agent to use Context7
Configuration example (from the official docs)
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Permissions and security

What it can access

  • Sends your query and library name to the Context7 service

Security notes from the maintainers

  • Queries go to the hosted Context7 service; README does not detail data handling

Review the source before granting an agent access to credentials or production systems. We document what the maintainers state; we do not audit code.

Limitations

  • Rate limits are higher with an API key

Tools it extends

Frequently asked questions

How do I install Context7 for Claude Code or Cursor?

Run npx ctx7 setup with --claude or --cursor. source

What tools does Context7 MCP expose?

resolve-library-id and query-docs. source

Do I need an API key for Context7?

It is recommended for higher rate limits; a free key is available at context7.com/dashboard. source

Related guides

Sources and gaps

Not stated by the maintainers: Tool permission scope beyond doc retrieval not described; last_release date not visible in the checked README.

More extensions to look at