MCP ServerOfficialHTTP

Context7 MCP Server

Context7 is an official MCP server from Upstash that pulls current, version-specific documentation for any library straight into your agent's context. It exists to solve one problem: models trained a year ago confidently inventing APIs that no longer exist. Hosted at mcp.context7.com, no install required.

Hosted URL

https://mcp.context7.com/mcp

Suggested model

Claude Sonnet 4.5

Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side and balance quality vs. cost.

Auth

No token required

What the Context7 MCP server does

How models use it and what it is built for.

Context7 indexes documentation for thousands of open-source libraries and serves it to a model on demand, pinned to the version you name. The flow is two steps: the agent resolves a plain library name to a Context7 ID, then fetches focused documentation for that ID, optionally narrowed to a topic like "routing" or "migrations". Because the docs are fetched at request time rather than recalled from training data, the model sees the API as it exists today. That is the difference between a working code suggestion and a plausible-looking call to a function that was removed two releases ago.

Tools the Context7 MCP server exposes

Typical tools an AI model can call. Exact names vary by version.

  • resolve-library-id — turn a plain library name into a Context7 library ID
  • get-library-docs — fetch current documentation for a resolved library ID
  • topic filtering — narrow the returned docs to a specific subject area
  • token budgeting — cap how much documentation is pulled into context
  • version pinning — request docs for a specific release rather than latest

Example prompts to try

Copy any of these into MCP Agent Studio after connecting.

  • Using the latest Next.js docs, show me how to set up a route handler with streaming.

  • What is the current API for Drizzle ORM migrations? Use Context7.

  • Pull the Supabase auth docs and write a sign-in flow that matches the current SDK.

  • Has the Zod API changed for schema refinement? Check the current docs.

Models on MCP Playground

This is not a single-model product: you get the same MCP connection with 60+ models (Claude, GPT, Gemini, DeepSeek, open-weight, and more), you can switch mid-conversation, and you can open Compare mode to run the same prompt against multiple models at once. The card above is a suggested starting point for this server — not the only choice.

Default pick for Context7

Claude Sonnet 4.5

Sonnet 4.5 handles the resolve-then-fetch two-step reliably and uses long documentation payloads well without losing the original coding task.

Check an AI agent can actually use the Context7 MCP server

Listing tools proves the server is reachable, not that a model can work with it. Evals go further: they read every tool on the server, write a test suite from its real schemas, and run it — code decides pass/fail on the responses (schema conformance, error codes, pagination, result caps) while a scoring model grades plain-English tasks driven through the tools.

Get a pass/fail report per tool with the evidence behind each verdict — and replay the same suite after every schema change. Destructive tools are excluded from the run.

Run evals

Try the Context7 MCP server in your browser

Open MCP Agent Studio with the connection pre-filled. Add your token, pick any of 60+ models, and start chatting — no install required.

Open Agent Studio

Context7 MCP server — FAQ

Common questions about connecting, scoping and using it safely.

What problem does the Context7 MCP server actually solve?

Model training cutoffs. An agent asked to use a fast-moving library will confidently write code against the API it learned during training, which may be several releases out of date. Context7 fetches the current documentation at request time so the model writes against what actually ships today.

Do I need an API key for Context7 MCP?

No. The hosted server works without one for basic use. A free key from context7.com/dashboard raises your rate limits and is passed as a CONTEXT7_API_KEY header on each request. The remote server also supports OAuth 2.0 for automated token management.

Why does Context7 need two tool calls to answer one question?

Library names are ambiguous — several projects share a name, and versions matter. resolve-library-id maps a plain name to a specific Context7 ID first, then get-library-docs fetches the documentation for exactly that ID. Splitting the steps is what makes version pinning possible.

Does Context7 cover private or internal libraries?

The public index covers open-source libraries. Internal packages are not in it, so Context7 complements rather than replaces a docs server pointed at your own repositories.

How do I test Context7 MCP before adding it to my editor?

Paste https://mcp.context7.com/mcp into the MCP Server Tester to see the tools it exposes, or into MCP Agent Studio to watch a real model resolve a library and pull its docs live — every tool call and response visible, with no install.

Other MCP servers

More on MCP Playground

Context7 MCP Server — Up-to-Date Docs for AI Coding Agents