Context7
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
Last verified:
What is Context7?
Context7 is a tool that brings up-to-date, version-specific documentation and code examples directly into AI coding assistants like Cursor, Claude Code, and Windsurf. It pulls accurate documentation directly from source repositories, eliminating outdated code examples and hallucinated APIs that LLMs often generate from their training data.
Key features include MCP server integration for native tool calling in AI assistants, CLI commands for terminal-based documentation lookup, version-specific documentation matching, support for both public and private repositories, and a simple
Context7 pricing
Pricing model: Freemium
Free plan: $0 for individuals, includes 1,000 API calls/month, public repositories, access control, OAuth 2.0. When blocked after limit, get 20 bonus API calls daily. Pro plan: $10 per seat/month, includes 5,000 API calls/seat/month, private repositories, team collaboration, unlimited API calls ($10 per 1,000 additional calls), private repo parsing ($25 per 1M tokens). Enterprise plan: Custom pricing starting at $30/user/month for small teamspaces, as low as $2.50/user/month for larger organizations, includes Pro features plus SOC-2 compliance, SSO (SAML/OIDC), self-hosted deployment option, up to 5,000 members per teamspace, up to 100 teamspaces, dedicated support with SLA. All plans include GDPR Compliance.
Context7 pros
- Up-to-date, version-specific documentation from source
- Eliminates hallucinated APIs that don't exist
- No outdated code generation from old training data
- Free tier available for personal use
- Simple integration - just add 'use context7' to prompts
- Works with Cursor, Claude Code, Windsurf, and 30+ MCP clients
- No tab-switching needed to find documentation
- Concise, relevant information without filler content
- Supports private repositories on Pro plan
- CLI commands for terminal-based documentation lookup
- MCP server for native tool calling in AI assistants
- Automatic version matching when you specify library version
- Direct library ID syntax for faster lookups
- 20 bonus API calls daily when free tier limit reached
- Built by Upstash team with enterprise security practices
Context7 cons
- Free tier limited to 1,000 API calls per month
- Free users blocked after reaching monthly limit
- Private repositories only available on Pro/Enterprise plans
- Pro plan costs $10 per seat per month
- Additional API calls billed at $10 per 1,000 calls
- Private repo parsing costs $25 per 1M tokens
- Context7 projects are community-contributed with no accuracy guarantee
- Unused API call allocation doesn't carry over between seats
Frequently asked questions about Context7
Is Context7 free to use?
Yes, Context7 is free for personal use. The Free plan includes 1,000 API calls per month, access to public repositories, basic access control, and OAuth 2.0. It's perfect for individual developers who don't need private repositories or team collaboration. Free users are blocked after reaching the monthly limit but receive 20 bonus API calls each day while blocked until the month resets.
How do I install Context7?
Set up Context7 with a single command: npx ctx7 setup. This authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI + Skills mode or MCP mode. Use --cursor, --claude, or --opencode to target a specific agent. For manual installation, use the Context7 server URL https://mcp.context7.com/mcp with your MCP client and pass your API key via the CONTEXT7_API_KEY header.
What AI coding tools does Context7 work with?
Context7 works with Cursor, Claude Code, Windsurf, and 30+ other MCP clients. It supports both CLI + Skills mode (installs a skill that guides your agent to fetch docs using ctx7 CLI commands) and MCP mode (registers a Context7 MCP server so your agent can call documentation tools natively).
How do I use Context7 in my prompts?
Simply add 'use context7' to your prompt in your AI coding assistant. For example: 'Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to /login. use context7'. You can also use the direct library ID syntax: 'use library /supabase/supabase for API and docs' to skip the library-matching step.
Can I use Context7 with private repositories?
No, private repositories are only available on Pro and Enterprise plans. You'll need to upgrade to a paid plan to work with private repositories and collaborate with your teamspace. Parsing private repositories is charged at $25 per 1M tokens, which applies when adding a new private repository or refreshing an existing one.
What happens when I exceed my API call limit?
Free users are blocked after reaching 1,000 API calls per month but receive 20 bonus API calls each day while blocked until the month resets. Pro users are never blocked - once you exceed your included 5,000 API calls per seat, additional usage is billed at $10 per 1,000 calls. You can monitor usage and billing in the dashboard.
Is my code sent to Context7 servers?
No. When you use Context7, only the documentation lookup query (e.g., 'how to use useState in React') and library name are sent to their servers—not your code, conversation history, or sensitive data. The LLM is instructed to never include private information like API keys, passwords, or proprietary code in these lookups. Your actual codebase and full prompts remain with your LLM provider.
Can I downgrade from Pro to Free?
Yes, you can downgrade to the Free plan at any time. You will be charged a pro-rated amount for the days of your current billing period. To downgrade, you must first delete any teamspaces you own and all private repositories in your personal project. Once done, you can switch to the Free plan on the plans page.
How do I add my library to Context7?
You can add your library using two methods: Option 1 (Recommended) - Head to context7.com/add-library and add your library via the simple web interface. Option 2 - Create a JSON file with your library details and submit a Pull Request to their repository. Once approved and merged, your library will be indexed and available.
Does Enterprise offer self-hosted deployment?
Yes. Contact the Context7 team at [email protected] to discuss self-hosted deployment options for your organization. Enterprise includes everything in Pro plus SOC-2 compliance, SSO (SAML/OIDC), volume-based pricing, up to 5,000 members per teamspace, up to 100 teamspaces, dedicated support with SLA, and self-hosted deployment option.