Connect Context7 to Claude Code through its plugin, CLI setup, or manual Model Context Protocol (MCP) configuration. The plugin uses browser sign-in and needs no local Node.js, npm, or npx; the CLI uses an OAuth device flow that Context7 says works on remote, headless, and SSH hosts. Choose the route that matches how you authenticate and where Claude Code runs.
Choose the plugin for browser sign-in without a local Node.js setup; use the CLI or manual MCP configuration when your workflow needs API-key access.
Choose a setup route
| Route | Authentication | Local setup | Best fit |
| Claude Code plugin | Browser sign-in through Context7’s hosted MCP server | No local Node.js, npm, npx, or API key required | A local Claude Code setup where you want to install the integration as a plugin |
| Context7 CLI | OAuth device flow; the setup generates an API key and installs a skill | Run npx ctx7 setup --claude | Remote, headless, or SSH environments, or when you want the skill to trigger for library questions |
| Manual MCP configuration | Direct MCP configuration, including an API-key workflow | Configure the MCP connection for your setup | When you need direct configuration or API-key access |
Context7’s Claude Code setup guide documents the plugin’s hosted endpoint as https://mcp.context7.com/mcp. The plugin does not read CONTEXT7_API_KEY; setting that variable will not authenticate the plugin. If you need to use an API key from a headless, SSH, or CI environment, Context7 points to the CLI or manual MCP configuration instead.
Install Context7 and verify the connection
You need Claude Code and the authentication method required by your chosen route. Follow the matching steps; the plugin and CLI use different sign-in flows.
Install the plugin
- In Claude Code, add the Context7 marketplace:
/plugin marketplace add upstash/context7. - Install the plugin:
/plugin install context7@context7-marketplace. - Restart Claude Code, open
/mcp, select Context7, and complete sign-in in your browser.
Use the CLI
- Run
npx ctx7 setup --claudein the environment where you use Claude Code. - Complete the OAuth device flow. Context7 says this flow supports remote, headless, and SSH hosts; the setup generates an API key and installs the appropriate skill.
- Open Claude Code’s
/mcpinterface and check for Context7. For a documentation lookup, ask Claude Code to use Context7; if you already know the library ID, include it to skip library resolution.
Configure MCP manually
Use manual MCP configuration when you need direct configuration or an API-key workflow that the plugin does not support. Context7’s setup guide covers this route alongside its plugin and CLI instructions.
Austin’s Shinzo Labs screencast shows a Context7 setup and a connection check using claude mcp list, followed by a documentation query.
What Context7 says it receives and retains
Context7 says that a documentation lookup sends its API a formulated query and the library name or ID—not the original prompt, source code, or conversation history. Its privacy policy also lists associated metadata, including a supplied API key, client and server information, session ID, transport type, and, for hosted HTTP deployments, a short-lived IP assertion.
Context7 says it uses formulated queries for documentation reranking and anonymous benchmarking. It says Enterprise teamspace queries are not stored for benchmarking. Its policy states that API logs are retained for 30 days; user data follows account status, and data deleted on request is permanently removed within 30 days of that request.
Context7’s published usage limits and charges
Context7’s plans page lists these amounts in USD. The page states the plan billing periods and call allowances as follows:
| Plan | Displayed price and billing period | Included API calls | Additional usage |
| Free | $0 | 1,000 per month | When blocked, 20 bonus calls per day until the monthly reset |
| Pro | $10 per seat per month | 2,000 per seat per month | $5 per 1,000 additional calls |
Context7 separately lists private-repository parsing at $5 per 1 million tokens when adding a repository or refreshing an existing one. See Context7’s plans for its published terms.