Context7 · upstash — Claude Code MCP server: version-aware library documentation
Context7 brings current, version-aware library docs and code examples into an AI coding agent. Use it when generated answers rely on stale or invented APIs.
MIT 5,563 installs ★ 65,245 updated 2026-10-29
claude mcp add --transport http context7-mcp https://context7-mcp--upstash.run.toolsWhat Context7 does
Context7 supplies documentation matched to a library version, along with code examples for the task at hand. Its MCP tools are resolve-library-id and query-docs: one identifies the library, while the other retrieves relevant documentation.
The server connects over HTTP and is listed for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and other supported clients. Add use context7 to a request when you want the agent to consult the documentation. An API key is recommended for higher rate limits; the separate CLI + Skills mode requires Node.js 22.13 or newer.
What it helps with
- look up documentation for a library version
- check whether an API exists
- bring current code examples into an agent prompt
- avoid code based on stale package knowledge
Example prompts for the agent
- Build a Next.js proxy that checks JWT cookies and redirects unauthenticated users; consult
Context7for the current API. - Show the current email/password sign-up API for
Supabase, and useuse context7before answering. - Configure a Cloudflare Worker to cache JSON responses and ask
Context7for the relevant documentation.
How to install Context7
Platform CLI: remote server
claude mcp add --transport http context7-mcp https://context7-mcp--upstash.run.toolsPlatform CLI: remote server
codex mcp add context7 --url https://context7-mcp--upstash.run.toolsConfig file
{
"mcpServers": {
"context7": {
"url": "https://context7-mcp--upstash.run.tools"
}
}
}Config file
{
"servers": {
"context7": {
"type": "http",
"url": "https://context7-mcp--upstash.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http context7 https://context7-mcp--upstash.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Context7
How do I install Context7 in Claude Code?
Run claude mcp add --transport http context7-mcp https://context7-mcp--upstash.run.tools, then run claude mcp add --transport http context7 https://context7-mcp--upstash.run.tools.
What does Context7 do?
It places version-aware library documentation and code examples in the agent context. The server exposes resolve-library-id and query-docs for that lookup.
Do I need an API key to use Context7?
An API key is recommended for higher rate limits. The separate CLI + Skills mode requires Node.js 22.13 or newer.
Similar MCP servers
MCP servers catalog →Context7 by other authors comes first.