Context7
Pulls current, version-matched library documentation into the model's context.
Add it to your client
Officialnpx -y @upstash/context7-mcp
{
"mcpServers": {
"context7-mcp": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
]
}
}
}- Transport
- both
- Runtime
- Node
- Tools
- 2
- License
- MIT
A model writes code against the API it saw in training, which can be several releases behind the library you have installed. Context7 fetches current documentation and code examples for the library you name and adds them to the prompt. Mention a version ("How do I set up Next.js 14 middleware? use context7") and it picks docs for that version. Writing "use context7" in a prompt, or adding a rule to CLAUDE.md or Cursor rules, tells the agent to call it.
Setup
- Hosted:
https://mcp.context7.com/mcpwith anAuthorization: Bearer YOUR_API_KEYheader. OAuth clients can use/mcp/oauthinstead. - Local stdio:
npx -y @upstash/context7-mcp --api-key YOUR_API_KEY. npx ctx7 setupsigns in with OAuth, creates a key and configures Cursor, Claude Code or opencode.
The README recommends a free key from context7.com/dashboard for higher rate limits.
What it exposes
resolve-library-idturns a library name and your question into a Context7 ID such as/vercel/next.js.query-docsreturns documentation for that ID that matches your question.
If you know the ID, put it in the prompt (use library /supabase/supabase) and the lookup step is skipped.
Limits
- Library entries are community-contributed; Upstash does not guarantee their accuracy, completeness or security.
- The API backend, parser and crawler are private, so the local server still depends on Context7's service.
Most useful with fast-moving frameworks, where your installed version and the model's memory disagree.
Similar MCP servers
Grounded Docs MCP Server
MCP serverIndexes library documentation locally so queries answer for the version actually in your lockfile.
JetBrains IDE MCP Server
MCP serverLets an external agent read and edit code inside a running JetBrains IDE.
MCP Zotero
MCP serverOpens a Zotero cloud library to an agent: collections, item details and full-library search.

Comments(0)
Sign in to comment