Context7
Pulls current, version-specific library documentation and code examples into the agent's context.
Claude Code
claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
Codex
codex mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
Cursor
{"mcpServers":{"context7":{"url":"https://mcp.context7.com/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY"}}}}
Copilot (VS Code)
{"servers":{"context7":{"type":"http","url":"https://mcp.context7.com/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY"}}}}
Commands and configuration as given in the server’s documentation (Documentation). Replace placeholders such as API keys with your own values.
Context7 is Upstash’s MCP server for current, version-specific library documentation.
The Context7 MCP server, maintained by Upstash under the MIT license, pulls current, version-specific library documentation and code examples into an agent’s context so the model stops guessing at APIs. It runs locally over stdio through npx or as a remote HTTP endpoint at mcp.context7.com/mcp. An API key is optional and raises rate limits, and OAuth is also supported. The steps below cover Claude Code, Codex, Cursor and Copilot in VS Code.
It fetches up-to-date docs for thousands of libraries and exposes two tools: resolve-library-id, which maps a library name to a Context7 ID, and query-docs, which returns relevant documentation for that ID.
Questions
What does the Context7 MCP server do?
Do I need an API key for Context7?
Can Context7 run locally?
Which clients does Context7 work with?
Sources
Checked October 2, 2026.
Docs & search
View all- Brave Search MCP ServerGives agents Brave Search results for web, local, image, video and news queries, plus AI summaries.Official
- Exa MCP ServerGives agents Exa web search and clean page fetching, plus optional Exa Agent research runs.Official
- Firecrawl MCP ServerSearches, scrapes, crawls and maps the web into clean markdown or structured data for agents.Official
- Microsoft Learn MCP ServerSearches and fetches official Microsoft and Azure documentation and code samples.Official
