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

RouteAuthenticationLocal setupBest fit
Claude Code pluginBrowser sign-in through Context7’s hosted MCP serverNo local Node.js, npm, npx, or API key requiredA local Claude Code setup where you want to install the integration as a plugin
Context7 CLIOAuth device flow; the setup generates an API key and installs a skillRun npx ctx7 setup --claudeRemote, headless, or SSH environments, or when you want the skill to trigger for library questions
Manual MCP configurationDirect MCP configuration, including an API-key workflowConfigure the MCP connection for your setupWhen 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

Shinzo Labs’ screencast shows a Context7 setup and a claude mcp list connection check.

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

  1. In Claude Code, add the Context7 marketplace: /plugin marketplace add upstash/context7.
  2. Install the plugin: /plugin install context7@context7-marketplace.
  3. Restart Claude Code, open /mcp, select Context7, and complete sign-in in your browser.

Use the CLI

  1. Run npx ctx7 setup --claude in the environment where you use Claude Code.
  2. 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.
  3. Open Claude Code’s /mcp interface 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:

PlanDisplayed price and billing periodIncluded API callsAdditional usage
Free$01,000 per monthWhen blocked, 20 bonus calls per day until the monthly reset
Pro$10 per seat per month2,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.