Context7
VerifiedDelivers up-to-date library docs directly into LLM prompts.
What is the Context7 MCP server?
Context7 solves the problem of stale or hallucinated code suggestions by fetching current documentation for libraries like Next.js, Supabase, and Cloudflare Workers. Users trigger retrieval simply by including 'use context7' or a library ID in their prompt, after which relevant snippets and API references are added to the context window.
The platform works in MCP mode for native tool calls or CLI + Skills mode that guides agents without requiring an MCP connection. An optional API key from context7.com improves rate limits while the core service remains accessible for basic usage.
Install & connect
Add this to your MCP client config. Pick your client below and copy.
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"ctx7"
]
}
}
}Package: ctx7 (npm)
Other ways to install
npx
npx -y ctx7Example prompts
Once connected, try asking your AI client:
Security & permissions
Stdio transport runs locally after ctx7 setup; remote MCP mode at mcp.context7.com requires an optional CONTEXT7_API_KEY header for authentication.
What you can do with Context7
Generate current API usage
Ask for Supabase email/password sign-up code and receive the latest method signatures instead of outdated examples.
Configure modern middleware
Request a Next.js JWT-checking middleware and obtain version-specific patterns that match the installed release.
Cache worker responses
Describe a Cloudflare Worker caching requirement and receive accurate, up-to-date script examples.
How to use Context7
- 1Install Node.js 18 or newer.
- 2Run npx ctx7 setup and follow OAuth prompts.
- 3Choose MCP mode during setup or configure the URL https://mcp.context7.com/mcp manually.
- 4Add 'use context7' or a library ID to prompts when documentation is needed.
- 5Optionally set rules in Cursor or Claude to auto-trigger Context7.
Context7: pros & cons
Pros
- +Always supplies current, source-verified code examples
- +Works across many languages and popular libraries
- +Simple trigger phrase integrates into existing workflows
- +Free tier available with optional paid rate-limit increases
Cons
- –Requires explicit trigger words or rules for best results
- –Library matching step can be skipped only when ID is known
- –Remote usage depends on network availability and rate limits
Frequently asked questions
No, but obtaining a free key from context7.com/dashboard raises rate limits.
User reviews
Verified reviews from the community shape this listing's rating.
Loading reviews…