Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Context7 MCP retrieves library documentation and examples for a coding assistant. It helps when a question depends on a particular framework or package version, such as configuring an API that changed between releases.
The documented workflow starts with resolve-library-id, then uses query-docs for a specific question. Include the installed version and the behavior you want to implement. Compare the returned example with your project’s dependencies before editing code; a retrieved document is useful evidence, but it does not show that an example has run in your application.
Upstash provides the @upstash/context7-mcp npm package and the hosted endpoint https://mcp.context7.com/mcp. The local package requires Node.js 18 or later. The current setup guide explains API keys and client-specific authentication, including the setup flow that creates a key. Some older guides mention different tool names, so use the current two-tool reference.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| resolve-library-id | Find the Context7 identifier for a library. |
| query-docs | Retrieve documentation for a library and question. |
{
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp"
],
"env": {
"CONTEXT7_API_KEY": "YOUR_CONTEXT7_API_KEY"
}
}
}
}Replace the placeholder with your Context7 API key. Hosted client instructions are linked in the README.
Node.js 18 or later for the local npm server. Follow Context7’s current setup flow for an API key.
| Variable | Description | Required |
|---|---|---|
| CONTEXT7_API_KEY | Context7 API key from the provider’s setup flow. | Yes |
Retrieve public web pages as readable Markdown with the reference Fetch MCP server, including pagination for longer responses.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Google Docs MCP server with full tab support, markdown extraction, and batch updates.
Or as a container, reaching your machines over SSH — docs/docker.md: docker run -v ~/.config/homebutler:/config -v ~/.ssh:/root/.ssh:ro ghcr.io/higangssh/homebutler
Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and
Extended Google Docs for Claude via gogcli — auth + full Docs and comments support