← Back to MCPs
Documentation

Context7

Up-to-date, version-specific library documentation and code examples for LLMs. Eliminates hallucinated APIs and outdated code patterns.

Installnpx -y @upstash/context7-mcp
Context7 is the highest-starred MCP server (54K+) in the ecosystem. It fetches up-to-date, version-pinned library documentation and injects it directly into your LLM's context window. This solves the common problem of AI assistants generating code using deprecated or non-existent APIs. ## Capabilities - Resolve library names to Context7-compatible IDs - Query version-specific documentation for any library - Fetch code examples and setup instructions - Supports thousands of libraries (Next.js, React, Supabase, MongoDB, etc.) ## Usage ```json { "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } } ``` ## Remote Server ```json { "mcpServers": { "context7": { "url": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "YOUR_API_KEY" } } } } ``` ## Tips - Include `use context7` in prompts to auto-invoke for library questions - Register at context7.com/dashboard for higher rate limits - Specify library directly: `use library /supabase/supabase for api and docs`