Context7
Pulls up-to-date, version-specific documentation and code examples straight from official sources directly into your coding agents.
About this Server
Context7 is an open-source documentation MCP server and platform created by Upstash that pulls up-to-date, version-specific developer documentation and code examples straight from official sources directly into your coding agent. By dynamically resolving library IDs and querying indexed documentation, Context7 eliminates LLM hallucinations, outdated syntax, and deprecated API calls across modern web and cloud development frameworks.
Direct low-latency RPC protocol communication with structured JSON schemas.
Restricted capability bounds to prevent accidental modifications or leakage.
Security & Best Practices
When to Use (and When Not To)
- •Querying the latest, version-specific APIs and SDK documentation that postdate model training cutoffs
- •Retrieving accurate code examples and usage patterns for modern frameworks (e.g., Next.js, Supabase, Tailwind, MongoDB)
- •Eliminating hallucinated function signatures, deprecated options, and breaking API changes
- •Finding verified library IDs across the open-source ecosystem using natural language task queries
- •Local workspace file editing or file system operations (use workspace file editing tools or Repomix instead)
- •Automating live browser sessions or clicking DOM elements (use Playwright or Browser MCP instead)
- •Executing database queries or schema migrations against private databases (use Neon, Supabase, or Postgres MCP instead)
Install & Setup
claude mcp add context7 -- npx -y @upstash/context7-mcpExposed Tools & Endpoints
2 toolsFunctions your AI agent can invoke via this Model Context Protocol server
Resolves a general library name into a Context7-compatible library ID (e.g., /mongodb/docs, /vercel/next.js) ranked by relevance to the query.
Retrieves version-specific documentation, API references, and relevant code examples for a library using its Context7-compatible library ID.