Context7
MCP server and documentation platform that injects up-to-date, version-specific library docs directly into AI coding assistant prompts to eliminate hallucinated APIs and outdated code examples
Overview
Context7 is an MCP (Model Context Protocol) server that pulls up-to-date, version-specific documentation and code examples from official library sources and injects them directly into your AI coding assistant's prompt. Built by Upstash, it solves a fundamental LLM limitation: coding agents trained on stale data hallucinate APIs that don't exist and generate patterns that have been deprecated. With Context7, you simply add "use context7" to any prompt — the MCP tool fetches current docs from the source and grounds the model's response in verified, version-accurate information. Works with Claude Code, Cursor, Copilot, Gemini CLI, Cline, and most MCP-compatible editors.
The Verdict
Who Should Use Context7?
Best For
- Developers working with fast-moving frameworks (Next.js, React, Tailwind, etc.)
- Teams where hallucinated or outdated API calls are a recurring problem
- AI coding workflows using Claude Code, Cursor, or Copilot via MCP
- Anyone tired of AI generating code for APIs that no longer exist
- Projects targeting specific library versions where accuracy matters
Not Ideal For
- Teams not using MCP-compatible AI editors
- Projects using obscure or private internal libraries (not indexed)
- Heavy private repo documentation needs (requires paid plan)
- Non-coding AI workflows
What's Great
- Eliminates hallucinated APIs by grounding LLMs in current docs
- Version-specific documentation — not just latest, but exactly your version
- Single phrase trigger ("use context7") — zero workflow friction
- MCP-native: integrates with any MCP-compatible AI coding tool
- 2-minute setup via GitHub
- Large, active GitHub community — strong adoption signal
- Free tier covers 1,000 API calls/month for individuals
Watch Out For
- Free plan capped at 1,000 API calls/month — daily limit after that
- Private repo documentation requires paid plan ($25/1M tokens)
- Coverage depends on which libraries are indexed in the directory
- MCP dependency — no standalone CLI or non-MCP integration
Pricing
View all features & details
How It Works
- Add "use context7" to any AI coding prompt
- MCP tool fetches current docs from official library sources
- Version-specific content injected directly into prompt context
- Works alongside your existing AI editor — no workflow changes
- Full docs index at context7.com/docs/llms.txt
Supported Editors
- Claude Code
- Cursor
- GitHub Copilot
- Gemini CLI
- Cline
- Any MCP-compatible AI editor
Enterprise Features
- SOC-2 compliance
- SSO via SAML / OIDC
- Self-hosted deployment option
- Teamspaces up to 50 members (self-serve)
- Dedicated support with SLA
- Usage and billing dashboard
Key Integrations
- MCP (Model Context Protocol) native
- GitHub — for private repo access
- OAuth 2.0 access control
- API access for programmatic use
How It Compares
| Feature | Context7 | Sourcegraph | Serena MCP |
|---|---|---|---|
| Primary Use | Live doc injection | Code search/nav | Code understanding |
| MCP Native | Yes | Partial | Yes |
| Trigger | “use context7” | Manual search | Automatic |
| Private Repos | Paid ($25/1M tokens) | Yes | Yes |
| Version-specific Docs | Yes | No | No |
| GitHub Stars | 57.5K | ~10K | ~3K |
| Pricing | Freemium | Enterprise | Free |
| Built By | Upstash | Sourcegraph | Community |