
Context7 MCP, current library docs for your coding assistant
Gives Claude, Cursor and other coding assistants the current docs for the library you are using, so they stop writing code for old versions.
This is Upstash's official docs lookup for coding assistants. Name a library in your prompt, and it fetches the matching current docs and code examples for your assistant to use. It works without an account at low limits, and the free plan caps at 1,000 calls a month. It only reads documentation, so it cannot change your files or accounts.
Good for
- Developers whose assistant keeps using outdated or invented library APIs
- Teams on fast-moving frameworks like Next.js, Prisma or Supabase
- Claude Code, Cursor, Codex or VS Code users who want answers from current docs, not memory
- Anyone who wants to avoid pasting docs pages into the chat
Works in
11 supported · 1 with issues · 2 should work
Tap an app to see how to set it up and any known problems.
Context7's docs cover it: add the hosted server with claude mcp add, or install the plugin and sign in through /mcp.
Context7's docs cover it: add a custom connector with the hosted URL, or use the local server in the config file. context7.com
Context7's docs cover it: one-click install, the hosted URL in mcp.json, or the ctx7 setup command.
Known problems
- Fixed
Marketplace plugin connected without signing in, so paid users still hit the free monthly quota
Workaround: Update or reinstall the Context7 plugin from the marketplace and sign in when Cursor asks.
Reported Oct 2026 · GitHub
Context7's docs cover it: install the Context7 extension (VS Code 1.101 or newer) or add the server to .vscode/mcp.json.
Context7's docs cover it: add it with codex mcp add, use the Codex plugin, or run the ctx7 setup command.
Known problems
- Fixed
Server showed as enabled but its tools never appeared in Codex tasks
Workaround: Rerun npx ctx7@latest setup so the config sends the key as an Authorization header.
Reported Jul 2026 · GitHub
Context7's docs cover it: add the hosted URL to ~/.gemini/settings.json with the key and Accept headers. context7.com
Context7's docs cover it: install the plugin from the upstash/context7 marketplace or edit the MCP config file.
Known problems
- Fixed
Context7 plugin could not be installed from the Copilot CLI plugin marketplace
Reported Apr 2026 · GitHub
Context7's docs cover it on ChatGPT web: add a custom MCP server with the sign-in URL. Workspace settings can block it. context7.com
Context7's docs cover it: install from the Cline MCP Marketplace or add the hosted URL under Remote Servers. context7.com
Context7's docs cover it: install the Context7 Zed extension or add it under context_servers in settings. context7.com
Context7's docs cover JetBrains AI Assistant: add it under Settings, Tools, AI Assistant, Model Context Protocol. context7.com
Context7's docs cover it, but the setup command currently writes the entry in the wrong place on OpenCode 2.
Known problems
- Open
On OpenCode 2, ctx7 setup writes the Context7 entry in the wrong place, so OpenCode rejects it
Workaround: Move the context7 entry inside mcp.servers in opencode.json by hand, or use the Context7 OpenCode plugin.
Since Oct 2026 · GitHub
- Fixed
Setup failed on opencode.jsonc files that have trailing commas
Workaround: Run npx ctx7@latest setup again.
Reported Sep 2026 · GitHub
Supports local MCP servers.
Supports hosted MCP servers.
Install Context7 MCP
Claude Code
- 1
Copy this prompt.
Add the Context7 MCP server to Claude Code. Run this command: claude mcp add --transport http context7 https://mcp.context7.com/mcp Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
The server works without a key. A free key from context7.com/dashboard gives higher rate limits. npx ctx7 setup signs you in, creates a key and lets you pick MCP or CLI plus skills mode.
Built from the package data we hold. Not yet tested by us.
Tools
Pulls current docs and code examples for a library, straight from its source
Fetches version-specific documentation and code examples for the library you name, so the assistant can answer from current docs instead of older training data. An optional language setting ranks code examples in that language first.
Try: “How do I set up a Next.js 16 proxy? Use Context7.”
Network ·
query-docsUsed by the assistant behind the scenes
Finds the right library ID for a name like Next.js before fetching its docs
Matches a library name, such as Next.js or Supabase, to the ID used to fetch its docs. It is skipped when the prompt already includes a library ID.
Try: “Which library is Supabase in Context7?”
Network ·
resolve-library-id
Read from the source code
Pros and cons
Good
- Gives your assistant current, version-specific docs and code examples instead of stale training data.
- Works with no account, and a free key or sign-in raises your limits.
- Official Upstash server with a hosted URL, so there is nothing to run on your machine.
- Supports 40+ clients, including Claude Code, Cursor, Codex, VS Code and ChatGPT.
- Read-only by design: it looks up docs and cannot change your files.
- Name a library ID or version in your prompt to get exactly the docs you want.
- Upstash's own benchmark found about 37% fewer tokens than web search, though it did not measure answer quality.
Watch out
- Free plan stops at 1,000 calls a month, with 20 bonus calls a day after that.
- Docs come from community-submitted libraries, so accuracy and safety are not guaranteed.
- Pre-indexed snippets can miss the detail your agent needs.
- Your agent's search queries go to Upstash, and are stored anonymously except on Enterprise.
- Private repos need Pro, and the backend is closed source.
- OAuth sign-in works only with the hosted server, not the local one.
- Self-hosting is offered only on Enterprise.
Permissions
low risk · 5 things to watch
Low risk
It only reads documentation, but that text comes from community-submitted libraries, so a bad page could try to steer your agent.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
Docs come from community-submitted libraries
Anyone can add a library, so returned text could carry instructions aimed at your agent. Context7 runs injection classifiers and trust scores, and teams can restrict libraries. upstash.com
Poisoned library rules were passed to agents (fixed)
Noma Security showed in Feb 2026 that a library's custom rules could tell an agent to leak .env files. Upstash added sanitizing within days; no abuse was seen. noma.security
Vendor once injected a sign-up prompt into answers
In May 2026 doc answers carried text asking the agent to run npx ctx7 setup for anonymous users. Upstash called it a test and turned it off. github.com
Agent-written queries go to Upstash
Each lookup sends the agent's search query, library name, client name and, on the hosted server, your IP. Queries are reranked by LLMs and stored anonymously for benchmarking (not for Enterprise). context7.com
Keep the API key out of shared config
The key sits in your client config or env. Use a normal key, not one with Management access, and keep it in user settings rather than committed project files. context7.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Turning on read-only | Both tools only look up public or team documentation; the server cannot change files or accounts. Nothing to switch off. |
|---|---|
| Talks to | mcp.context7.com (Upstash): search query, library name, client name, and your IP on the hosted server |
| Sign-in and keys | Optional API key (ctx7sk-...) kept in your client config or environment, or a sign-in through OAuth on the hosted server. |
| Data retention | Queries are stored anonymously for benchmarking, except on Enterprise. |
| Scopes |
|
Alternatives
Use Context7 for current library docs unless you want queries to stay on your machine. Docs MCP Server indexes docs locally, and DeepWiki is the pick when you need answers about a whole GitHub repo.
| Server | Official | Runs | Sign-in | Tools | GitHub stars |
|---|---|---|---|---|---|
| For Context7 | |||||
| Context7This page | Official | HostedLocal | Optional key | 2 | 64K |
| Other tools for the same job | |||||
| Ref | Community | Hosted | – | – | 1.2K |
| ExaFor Exa | Official | Hosted | – | – | – |
| DeepWiki | Community | Hosted | – | – | – |
| Docs MCP Server | Community | Local | – | – | 1.8K |
What people say
People like how little setup it takes and how it keeps agents on current APIs, and they dislike the free-plan limits and the gaps in some libraries' docs.
What people like
- Easy to set up, including in Codex and Claude Code
- Pulls in only the relevant docs, so agents do not load whole docs sites
- Users pair it with CLAUDE.md rules to cut outdated-API mistakes
Common complaints
- Answers come from pre-indexed snippets that can miss the exact detail needed
- One tester saw only a small drop in wrong answers
- Free plan is capped at 1,000 calls a month and anonymous use is rate-limited
- Built-in instructions push the agent to fetch docs even when it already has the answer
- Some libraries return old versions; users filed about 300 missing or wrong-docs reports in a year
In their words
“Context7 is a good MCP. If one were to point an agent to a docs website, the amount of tokens consumed would use up too much of the context window to be able to do a meaningfully complex task with it.”nvdnadj92Hacker NewsJun 2026
“I can think of one MCP server I find valuable (context7) and one plugin that i've installed, but continuously think about uninstalling (obra/superpowers). Both were trivial to set up with codex.”nostreboredHacker NewsMay 2026
“I've been making use of things like LSPs, Context7 and CLAUDE.md (global and per-repo) and it just stops doing the dumb LLM things that I hate.”AussieWog93Hacker NewsJan 2026
“I have it installed as official Claude Code plugin so it is always on now. No downsides detected so far. Haven't had much issues with library version mismatches lately, but can't be sure it is due to Context 7.”kledru
3 more quotesFewer quotes
“Context7 is great but ultimately it’s just a pre-generated static summarization that might not include the specific answers the agent needs.”instalabsaiHacker NewsMay 2026
“i added context7 mcp but hallucaniton rate decreased only a small bit.”ErenayDevBlogMar 2026
“No evidence of exploitation in the wild was observed.”Eli Ainhorn
Questions
Is Context7 free?
Yes, with limits. The free plan gives 1,000 API calls a month, then 20 bonus calls a day until the month resets. Pro costs $10 per seat a month with 2,000 calls per seat and $5 per extra 1,000.
Do I need an API key?
No. The hosted server answers without a key at low rate limits. A free key from the Context7 dashboard, or signing in with OAuth, gives you your plan's limits.
What is the Context7 MCP server URL?
The hosted server is https://mcp.context7.com/mcp. For sign-in instead of a key, use https://mcp.context7.com/mcp/oauth.
How do I sign in instead of pasting a key?
Use the sign-in URL as the server address, then authenticate in your app. In Claude Code, run /mcp, pick Context7 and choose Authenticate. This works only with the hosted server, not the local one.
Does Context7 see my code or prompts?
Its docs say no. It receives the search query your agent writes, the library name, your key, the client name, and your IP on the hosted server. Queries are stored anonymously for benchmarking except on Enterprise.
Is Context7 safe?
Mostly. It only reads docs and cannot change your files. The docs come from community-submitted libraries, which Upstash screens, so still review what your agent does with them.
How do I make my agent use it without typing "use context7"?
Run the ctx7 setup command, which installs a skill that triggers on library questions. You can also add a rule in CLAUDE.md or Cursor Rules telling the agent to use Context7 for library docs.
Can I pin a library or version?
Yes. Put the library ID in the prompt, such as /vercel/next.js, to skip the lookup step. Mention the version you use to get version-specific docs.
Can it read my private repositories?
Yes, on Pro and Enterprise. Private repo parsing costs $5 per 1M tokens when you add or refresh a repo. The free plan covers public sources only.
The local server times out on start. What do I do?
Switch to the hosted URL, which needs no Node.js. Otherwise use Node 20 or newer and point the command at the full node path, or on Codex raise startup_timeout_sec to 40.
Examples
Set up a framework feature from current docs
use context7 to show me how to set up a proxy in Next.js 16
SourceGet ORM query examples
use context7 for Prisma query examples with relations
SourceLook up database security syntax
use context7 for the Supabase syntax for row-level security
SourceSkip library matching with a known ID
use context7 with /supabase/supabase for authentication docs
SourceApp router setup for a pinned library
use context7 with /vercel/next.js for app router setup
Source
Information
updated Nov 2, 2026
- Publisher
- Upstash (official)
- Package
@upstash/context7-mcp- Registry
- npm
- Endpoint
https://mcp.context7.com/mcp- Transport
- stdio, Streamable HTTP
- Auth
- API key
- Version
- 4.4.4
- License
- MIT
- Last commit
- Oct 30, 2026
- Open issues
- 16
- Listed in
- Official MCP registry, Docker MCP Catalog
WebsiteDocsGitHubnpmOfficial MCP RegistryInstall guideChangelogPricingPrivacy policy
Other Context7 MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 27Hide
- Context7 supported clients · context7.com
- Context7 README · github.com
- Context7 plans · context7.com
- upstash.com · upstash.com
- noma.security · noma.security
- github.com · github.com
- context7.com · context7.com
- context7.com · context7.com
- context7.com · context7.com
- context7.com · context7.com
- context7.com · context7.com
- context7.com · context7.com
- Context7 plugins and extensions · context7.com
- news.ycombinator.com · news.ycombinator.com
- news.ycombinator.com · news.ycombinator.com
- news.ycombinator.com · news.ycombinator.com
- news.ycombinator.com · news.ycombinator.com
- news.ycombinator.com · news.ycombinator.com
- github.com · github.com
- github.com · github.com
- Context7 Claude Code docs · context7.com
- Ref · github.com
- Exa · news.ycombinator.com
- DeepWiki · mcp.deepwiki.com
- Docs MCP Server · github.com
- Docfork · mcp.docfork.com
- Context7 vs web search benchmark · upstash.com