
Context7
Context7 provides an MCP server that delivers up-to-date, version-specific documentation and code examples directly into LLM prompts by fetching current information from source repositories. The server solves the problem of LLMs generating outdated code examples, hallucinated APIs, and generic answers based on old training data by injecting real-time documentation context for libraries and frameworks. It enables developers to request code examples and API information for specific tools (like Next.js, Cloudflare Workers, and Supabase) with the assurance of receiving current, accurate guidance.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 180
- GitHub stars
- 64.7K
- tools
- 2
- auth
- Secret needed
- transport
- STDIO, HTTP
- env var
- 1
- last updated
- Nov 12, 2026
Install
From registry metadata$ npx add-mcp https://mcp.context7.com/mcp --name context7 --header 'Authorization: Bearer ${API_TOKEN}'Run in your terminal. add-mcp asks which agents to add it to, then asks for each value it needs. Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http context7 https://mcp.context7.com/mcp --header 'Authorization: YOUR_AUTHORIZATION'Run in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 2 toolsVerified live against the running server on Nov 13, 2026.
resolve-library-idResolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/o...2 params
Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'Query Documentation' tool to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/o...
libraryName*stringquery*stringquery-docsRetrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explici...3 params
Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'Resolve Context7 Library ID' tool first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explici...
languagestringlibraryId*stringquery*stringSponsors
Configuration
CONTEXT7_API_KEYsecretAPI key for authentication
Readme
Details
- Repository
- github.com/upstash/context7
- Website
- context7.com
- Package
@upstash/context7-mcp- Transport
- STDIO, HTTP
- Auth
- Required
- Registry
- MCP registry, active
- Tools verified
- Nov 13, 2026
