Context7 MCP
by Upstash
Up-to-date, version-specific code documentation for any library — right in your AI assistant
code Node.js Beginner No API key Verified Featured
⭐ 47.2k stars 📅 Updated: 1mo ago
Description
Context7 is an MCP server by Upstash that provides LLMs with up-to-date, version-specific code documentation for any library. It solves one of the biggest pain points in AI-assisted coding: models generating code based on outdated training data, hallucinating APIs that don't exist, or using deprecated patterns. Instead of relying on stale knowledge, Context7 fetches current documentation directly from source and injects it into the AI's context window. Works with 30+ MCP-compatible clients. Available as both a local stdio server via npx and a remote HTTP endpoint at context7.com — no API key required. Simply add "use context7" to your prompt and the AI will automatically pull the latest docs for the libraries you're working with.
✅ Best for
Any developer using AI coding assistants who wants accurate, current library documentation in every prompt
⏭️ Skip if
You only work with well-established libraries whose APIs rarely change
💡 Use cases
- Getting accurate, current API documentation while coding with AI assistants
- Avoiding hallucinated or deprecated API calls in AI-generated code
- Working with newly released library versions that the AI hasn't been trained on
- Quickly referencing documentation for unfamiliar libraries during development
👍 Pros
- ✓ No API key required — completely free to use
- ✓ Solves the critical problem of outdated AI training data for library APIs
- ✓ Dual deployment — local npx or remote HTTP, both zero-config
- ✓ Supports 30+ MCP clients with massive community adoption (47k+ stars)
👎 Cons
- ✗ Documentation coverage depends on libraries being indexed by Context7
- ✗ Large documentation payloads may consume significant context window space
- ✗ Niche or private libraries may not be available in the index
🔧 Exposed tools (2 tools)
| Tool | Category | Description |
|---|---|---|
| resolve-library-id | discovery | Convert a library name to its Context7-compatible identifier |
| query-docs | documentation | Retrieve up-to-date documentation for a specific library and version |
⚡ Installation
Prerequisites:
- • Node.js v18+
Check Claude Code documentation to configure this MCP server.
💡 Tips & tricks
Add "use context7" to your prompts to automatically trigger documentation lookup. The resolve-library-id tool helps when library names are ambiguous — use it first to confirm you're getting docs for the right package.
🔄 Alternatives
Quick info
- Author
- Upstash
- License
- MIT
- Runtime
- Node.js 18+
- Transport
- stdio
- Category
- code
- Difficulty
- Beginner
- Self-hostable
- ❌
- Auth
- —
- Docker
- —
- Version
- latest
- Updated
- Feb 28, 2026
Client compatibility
- ✅ Claude Code
- ✅ Cursor
- ✅ VS Code Copilot
- ❓ Gemini CLI
- ✅ Windsurf
- ❓ Cline
- ❓ JetBrains AI
- ❓ Warp
Platforms
🍎 macOS 🐧 Linux 🪟 Windows