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.
https://mcp.context7.com/mcp
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.
No token required
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.
Typical tools an AI model can call. Exact names vary by version.
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.
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.
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 evalsOpen MCP Agent Studio with the connection pre-filled. Add your token, pick any of 60+ models, and start chatting — no install required.
Open Agent StudioCommon questions about connecting, scoping and using it safely.
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.
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.
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.
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.
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.
GitHub
Drive GitHub repos, PRs and issues with an AI agent.
Vercel
List deployments, read logs, manage env keys and roll back from natural language.
Cloudflare
Drive Workers, DNS, R2, D1 and the rest of the Cloudflare API with AI.
Perplexity
Get cited, web-grounded answers from an AI agent via Perplexity Sonar.