Context7: up-to-date docs for A.I. editors
Added Updated Copyable prompt below
Published Last verified Released
Our verdict
One of the most useful add-ons for vibe-coders. It reduces outdated or invented API usage when libraries move fast. Setup is one command, and adding a rule means you don't have to type 'use context7' each time. Bear in mind that docs come from Context7's own index of community-contributed libraries, served from Upstash's hosted backend.
- Who it's for
- Anyone using A.I. editors with fast-moving libraries
- Leverage
- Fewer outdated-API bugs
- Effort
- Low
- Date added
What Context7 does
Context7, from Upstash, looks up current documentation and code examples for the library you're using and puts them in your coding agent's context. It works in two modes: CLI plus skills, where an installed skill tells the agent to run ctx7 commands, or MCP, where the agent calls Context7's remote server at mcp.context7.com directly. Two tools do the work: resolve-library-id finds the library, and query-docs fetches the relevant docs for your question.
How builders use Context7
- Run npx ctx7 setup (Node.js 22.13 or newer). It signs you in with OAuth, creates an API key and installs the skill or MCP server; add --cursor, --claude or --opencode to target one agent.
- Name the library ID when you know it, for example 'use library /supabase/supabase', so Context7 skips the matching step.
- Mention the version in your prompt ('How do I set up a Next.js 16 proxy? use context7') to get docs for that version.
- Add a rule in Cursor Settings, Rules or in CLAUDE.md so the agent uses Context7 for any library question without being asked.
CLI plus skills or MCP: which mode
| CLI + skills | MCP | |
|---|---|---|
| How the agent gets docs | Runs ctx7 library and ctx7 docs commands, guided by an installed skill | Calls resolve-library-id and query-docs on Context7's MCP server |
| Needs MCP support in your editor | No | Yes |
| Set up with | npx ctx7 setup | npx ctx7 setup, or the server URL plus an API key header |
Other ways to use it
- A TypeScript SDK (@upstash/context7-sdk) and Vercel A.I. SDK tools (@upstash/context7-tools-ai-sdk) bring the same lookups into your own app.
- query-docs takes an optional language so code examples in your language rank first.
- Library owners can submit their library to the index through Context7's Adding Libraries guide.
- Manual setup instructions cover more than 30 MCP clients.
Context7: limits and gotchas
- Docs come from Context7's index, and the project says listed libraries are community-contributed, so it can't guarantee their accuracy, completeness or security.
- Only the MCP server is open source. The API backend, parsing engine and crawling engine are private, so lookups depend on Upstash's hosted service.
- Your queries go to Context7's servers; keep private code details out of prompts if that matters to you.
- It works without a key, but Context7 recommends a free API key for higher rate limits.
- It helps only with libraries in its index; for internal or unlisted docs, crawl them yourself.
Context7 compared with other tools here
- Crawl docs into agent context: crawl a docs site once, save it as Markdown and point your agent at it. Better for private or unlisted docs.
- Repomix: packs a whole repository into one file for an LLM, useful when the docs you need are the source code.
- Cursor Rules and AGENTS.md: where to put the 'always use Context7' rule so the agent calls it without being asked.
- Serena MCP: gives the agent semantic navigation of your own codebase; Context7 covers third-party libraries.
When to pick Context7
- Pick Context7 if your agent keeps writing code for old versions of public libraries.
- Pick CLI plus skills mode if your editor has no MCP support or you want fewer always-on tools.
- Crawl docs into your own context instead if the library is private or not in Context7's index.
Copy this: Setup + prompts
# Official source: github.com/upstash/context7 (MIT)
npx ctx7 setup # or: npx ctx7 setup --cursor | --claude | --opencode
# Remove later with: npx ctx7 remove
# Manual MCP: server URL https://mcp.context7.com/mcp
# with header Authorization: Bearer YOUR_API_KEY
Prompts:
Create a Next.js proxy that checks for a valid JWT in cookies and redirects unauthenticated users to /login. use context7
Implement basic authentication with Supabase. use library /supabase/supabase for API and docs.Context7 questions
Is Context7 free?
The MCP server code is MIT-licensed, and you can use the service without a key. Context7 recommends a free API key from its dashboard for higher rate limits.
Do I need to type 'use context7' every time?
No. ctx7 setup installs a skill that triggers it for library questions, or you can add a rule in Cursor or CLAUDE.md.
Which editors does Context7 work with?
Setup targets Cursor, Claude Code and OpenCode directly, and the docs list manual MCP setup for more than 30 clients.
Related discoveries
See the newest picks →- ToolVibe-Coding & Prompt-to-App
Astryx: Meta's design system your coding agent can query
Meta's open-source React 19 design system (150+ components, seven themes, page templates) with a CLI and a hosted MCP server that let Claude Code, Cursor or Codex look up real component docs before writing UI.
Effort: MediumPrompt#MCP#Open source
- ToolCreative & Media
Shaders: WebGPU effects your coding agent can install
MIT library of 200+ WebGPU effects as components, with an agent skill and MCP server for coding agents.
Effort: LowPrompt#Image#Plugin / extension
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.