Skip to content

What Is Context7 MCP? Up-to-Date Library Docs for Your Coding Assistant: Setup, API Key and Pricing

Coding assistants know libraries as they were when the model was trained. Context7 is an MCP server: once installed, the assistant reads the current, version-specific docs and code examples of the library you use before writing code; you just add "use context7" to the end of your request. This lowers the chance of it suggesting code from an old version or code that doesn't exist. It installs as a remote server, so you don't need Node.js on your computer.

What it does
Brings current library docs to the assistant
Type
MCP server (remote or local)
Where
Claude Code, Claude Desktop, Cursor, VS Code, Codex
API key
Recommended, not required
What leaves
The assistant's search query; your code doesn't
Turkish
Not stated in the official documentation
Cost
Free plan: 1,000 calls per month

What Is Context7 For?

AI coding assistants usually know libraries from their training data, which can lead them to produce code for an old version or functions that don't exist at all. Context7 aims to reduce this problem: before writing code, the assistant pulls the current docs and code examples for the relevant library from Context7. MCP is the standard for connecting AI programs to external tools.

The server provides two tools: one converts a library name into a Context7 ID, the other fetches docs and code examples with that ID. No write or delete tool is listed in the documentation.

Who it helps: developers who write code with Claude Code, Cursor or VS Code and work with frequently updated libraries (for example web frameworks). If you don't write code, it isn't useful to you.

What Does MCP Mean? A Bridge

MCP is a common connection format that lets an assistant connect to a service outside itself. Context7 is the service on the other end of that bridge: the assistant asks it the question, and it sends back the library's docs.

You"Write this. use context7"
AssistantClaude Code, Cursor, VS Code…
Context7Library docs and code examples

What's sent: the search query the assistant builds and the library name. Your code and chat aren't sent.

Without Context7 and With It

Without Context7Illustrative
How do I set up this file in the latest version of Next.js?
It answers with what's in its training data. If the library changed after that date, it may suggest code from an old version.
With Context7Illustrative
How do I set up this file in the latest version of Next.js? use context7
context7 · fetching docsIt first pulls that version's docs and sample code, then writes the answer based on the docs.

How Do You Install Context7?

There are two routes: the remote server hosted by Context7 (no Node.js needed on your computer) or the local package that runs on your computer. The commands are taken verbatim from the official docs; replace YOUR_API_KEY with your own key.

Quick setup (Node.js 22.13 or later)› npx ctx7 setup

The command has you sign in in the browser, generates an API key and installs the right skill; you choose "CLI + Skills" or "MCP" mode. For a specific agent, add --claude, --cursor or --opencode. To undo it, npx ctx7 remove.

You get an API key for free at context7.com/dashboard; the key starts with "ctx7sk" and is shown only once when it's created, so save it right away. Don't write the key into a shared configuration file.

How Do You Use Context7?

After installing, you add "use context7" to the end of your request; the assistant pulls the docs. If you write the library ID (for example /supabase/supabase) or the version, the matching step is skipped and you get the docs for the version you want.

Ask for current docs"How do I set up the proxy file in Next.js 16? Explain with sample code. use context7"
Specify the ID and version"Set up email sign-in with Supabase. use library /supabase/supabase for API and docs"
Query docs from the terminal (without installing MCP)› npx ctx7 library react "how does useEffect work"

If the library you use isn't in the index, you can have its public GitHub repository added at context7.com/add-library; an account is required. Private or internal docs require the Pro or Enterprise plan.

Which Programs Does Context7 Work With?

Claude CodeYesThe Context7 docs have a dedicated section (command, plugin or manual).
Claude DesktopYesA remote custom connector, a local configuration file and a .mcpb desktop extension are described.
claude.ai (web)UnclearThe Context7 docs have no separate web section. Claude's own docs support custom connectors on the web too; the URL and steps are the same as in Claude Desktop.
ChatGPTBetaWith Developer Mode (beta); according to the Context7 docs, on the Pro, Plus, Team, Enterprise and Edu plans.
Codex, Cursor, VS Code, Gemini CLIYesThe docs have setup steps for each.
WindsurfUnclearNot named in the docs; the general MCP instructions may apply, but this is not clear in the official sources.

"Not in the docs" doesn't mean it doesn't work. The list was compiled from the client pages in the Context7 docs.

What Does Context7 Access, and What Data Leaves?

Does it access your files

No tool that reads the files on your computer, your code or your chat history is listed in the docs. There are only two tools, and both fetch docs.

Data that leaves

The search query the assistant builds and the library name, your API key (if any), and the client name and version are sent; on the hosted server, encrypted IP information is also added for rate limiting. It states that your full prompt, source code and chat history aren't sent.

Retention

Context7 doesn't store your source files; it stores docs, code examples and the queries the assistant builds. API logs are kept for 30 days. Queries may be passed to OpenAI, Google Gemini and Anthropic models to rank the docs; on Enterprise, query retention can be turned off.

Docs are community-contributed

The content in the index is community-contributed; the README says it gives no guarantee of accuracy, completeness or security. Context7 offers a "Report" button for suspicious content and says it runs a classifier for prompt injection in the content.

The docs response goes straight into the assistant's context. Reported by users On GitHub in May 2026, it was reported that a non-documentation "system notice" had been added to a response; the developer said it was an official test for sign-in redirection and closed it (issue #2663). Read any install commands the assistant brings back before running them. This isn't a security certification.

Is Context7 Free? Plans and API Key

Yes, there's a free plan. The docs describe the API key as "recommended"; it isn't required. Without a key, the rate limit is lower. Prices are published only in dollars; Turkish lira pricing and tax information aren't on the official page.

Free$0
  • Public repositories
  • 1,000 API calls per month
  • Community support
  • Private repositories
  • Team collaboration
Pro$10 /seat/month
  • Private repositories, team collaboration
  • 2,000 calls per seat per month included
  • Then $5 per 1,000 calls
  • SSO, self-hosting
EnterpriseCustom
  • Everything in Pro
  • SSO, SOC-2, self-hosting
  • Support with an SLA

On the Free plan, calls are blocked when you hit the monthly limit; the page says 20 bonus calls per day are given on blocked days. You can see your usage at context7.com/dashboard › Overview.

Allowed
  • The MCP server's source code is MIT licensed: using, modifying and distributing it are allowed
Not allowed
  • The API backend, parsing and crawling engine are closed source; use of the service is subject to Context7's terms of use

Source: the Context7 Plans page and README. For commercial use, read Context7's official terms of use and privacy policy yourself. This is not legal advice.

Common Problems and Fixes

What's happeningWhat to do
Rate limit error (429, "rate limit")Get a free API key at context7.com/dashboard and add it to the configuration with an Authorization: Bearer header.
401 UnauthorizedCheck that the key starts with "ctx7sk" and that the header is in the form "Authorization: Bearer …" (the --api-key argument on the local server).
The local npx server times out or shows "module not found"Official fixes: switch to the remote server (no Node.js needed), use cmd /c npx on Windows, add @latest to the command; in Codex, set startup_timeout_ms to 40000.
Reported by users The Claude Code plugin returns 401 without a keyThe developer said it was fixed after an older version of the plugin; update the plugin. The plugin doesn't read the key from an environment variable; sign-in happens in the browser via /mcp.
Reported by users npx ctx7 setup shows "couldn't download skill, GitHub API error"Users reported that the GITHUB_TOKEN or GH_TOKEN value in their environment had expired; it worked with a new token.

How Do You Uninstall Context7?

  1. Undo the quick setup: npx ctx7 remove (if you installed it globally, also npm uninstall -g ctx7).
  2. In Claude Code: claude mcp remove context7.
  3. In Claude Desktop: Remove the connector under Customize then Connectors. In ChatGPT, delete the app you created.
  4. Revoke the API key: Delete it from the context7.com/dashboard › API Keys card; the key stops working immediately and this can't be undone.

Frequently asked questions

What is Context7 and what is it for?

An MCP server that brings AI coding assistants the current, version-specific docs and code examples of the library you use. Its goal is to reduce code the assistant writes from outdated knowledge. It's developed by Upstash.

Do I need an API key for Context7?

No. The README describes the key as "recommended for higher rate limits". Without a key, the limits are lower. You get a key for free at context7.com/dashboard.

Is Context7 free, and what's the limit?

There's a free plan: 1,000 API calls per month. When you hit the limit, calls are blocked and 20 bonus calls per day are given. Pro is $10 per seat per month (2,000 calls included).

How do I use Context7 in Claude Code?

After installing, add "use context7" to the end of your request. To install, add the remote server with the claude mcp add command or run npx ctx7 setup --claude.

What data does Context7 send out? Does my code leave?

The search query the assistant builds and the library name are sent. It states that your full prompt, source code and chat history aren't sent. Queries may be passed to OpenAI, Google Gemini and Anthropic models to rank the docs.

Should I install it remotely or locally?

The remote server doesn't require Node.js on your computer and is easy to set up. The local package (npx) requires Node.js 20.18.1 or later, and timeout problems have been reported on Windows and macOS; the docs recommend switching to the remote server if you run into trouble.

Tasks and setup kits that use Context7

Related guides

Sources

Not clear in the official sources: The numeric limit for keyless use (not stated in the official documentation) · the full content of Context7's terms of use and privacy policy · Turkish lira pricing and tax · whether it works in Windsurf · recorded security advisory status. Each is covered in the relevant section along with what you can do.