Context7
Lets your AI agent fetch up-to-date, version-specific library documentation and code examples while coding.
64k stars on GitHubby UpstashLicense MITUpdated 18 days ago
How to install
This MCP has two ways to run: local or remote.
Pick one below. Local runs on your computer; remote runs in the cloud and needs nothing installed.
Paste in the terminal:
claude mcp add context7 -- npx -y @upstash/context7-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
CONTEXT7_API_KEY | API key for authentication | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Create a Next.js proxy that checks for a valid JWT in cookies and redirects unauthenticated users to /login. use context7
Show me the Supabase auth API for email and password sign-up.
What it is
Context7 pulls current documentation and code examples for libraries straight from the source into your agent. This avoids outdated code and invented APIs. It works either as an MCP server or as a CLI with a skill.
What it can do
resolve-library-id: turn a library name into a Context7 library IDquery-docs: get documentation for a library ID and questionctx7 library: CLI search for a libraryctx7 docs: CLI documentation lookup
When to use
- βΊWhen you write code with a library whose API changes often.
- βΊWhen your agent keeps inventing functions that do not exist.
- βΊWhen you need docs for one specific version of a package.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
context7-docsLets your agent fetch up-to-date docs and code examples for any library, framework, SDK, or cloud service before it answers.context7-mcpHelps your agent look up current documentation for libraries and frameworks, so its code examples match the latest versions.context7-auto-researchLets your agent fetch up-to-date library and framework documentation automatically through the Context7 service while you work in Claude Code.Frequently asked questions
Is it free?
A free API key is available for higher rate limits. The MCP server code is MIT licensed.
How do I install it?
Run npx ctx7 setup. It signs you in with OAuth, creates an API key and installs a skill or MCP config.
What is the MCP server URL?
https://mcp.context7.com/mcp, with your API key in an Authorization: Bearer header.
Can I ask for a specific version?
Yes. Mention the version in your prompt, for example Next.js 16.
How do I skip library matching?
Put the library ID in your prompt, such as /supabase/supabase.
Is all documentation checked?
No. The README says projects are community-contributed and accuracy is not guaranteed.
If it does not work
- βΊCheck that Node.js is 22.13 or newer for the ctx7 CLI.
- βΊCheck that your API key is correct and sent as an Authorization Bearer header.
- βΊRun npx ctx7 remove and then setup again if the generated setup is broken.
5 new skills a week. 1 minute to read.