Hosted MCP server · #99 most used on Smithery · ✓ verified

Context7

upstash/context7-mcp

Fetch up-to-date, version-specific documentation and code examples directly into your prompts. Enhance your coding experience by eliminating outdated information and hallucinated APIs. Simply add `use context7` to your questions for accurate and relevant answers.

Uses
5.6k
Tools
2
Runs
Hosted
Listed
1.6y ago

Get started

Add it to your agent

npx -y @smithery/cli@latest install upstash/context7-mcp --client claude

Swap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.

What it can do

2 tools

resolve-library-id2 paramsResolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'q…

Resolves a package/product name to a Context7-compatible library ID and returns matching libraries. You MUST call this function before 'query-docs' to obtain a valid Context7-compatible library ID UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. Selection Process: 1. Analyze the query to understand what library/package the user is looking for 2. Return the most relevant match based on: - Name similarity to the query (exact ma

ParameterTypeDescription
querystringThe user's original question or task. This is used to rank library results by relevance to what the user is trying to accomplish. IMPORTANT: Do not include any sensitive or confidential information su
libraryNamestringLibrary name to search for and retrieve a Context7-compatible library ID.
query-docs2 paramsRetrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'r…

Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework. You must call 'resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query. IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best information yo

ParameterTypeDescription
querystringThe question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'aut
libraryIdstringExact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user que