OfficialDocs & searchlocal stdio / remote HTTP

Context7

Pulls current, version-specific library documentation and code examples into the agent's context.

Install

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?
It pulls current, version-specific library documentation and code examples into the agent’s context through two tools, resolve-library-id and query-docs.
Do I need an API key for Context7?
No, the key is optional. It raises rate limits, and OAuth is also supported.
Can Context7 run locally?
Yes. It runs locally through npx with the @upstash/context7-mcp package, or you can connect to the hosted endpoint at mcp.context7.com/mcp.
Which clients does Context7 work with?
The install steps here cover Claude Code, Codex, Cursor and Copilot in VS Code.

Sources

Checked October 2, 2026.

Docs & search

View all
Aftergradient

What are you looking for?

Search commands, errors, tools