Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors.
50K+
13
2 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors.
Attribute | Details |
---|---|
Docker Image | mcp/context7 |
Author | upstash |
Repository | https://github.com/upstash/context7 |
Dockerfile | https://github.com/upstash/context7/blob/f2f367d8913843bd28b2a96a6ce860f43e3fc3ca/Dockerfile |
Docker Image built by | Docker Inc. |
Docker Scout Health Score | |
Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/context7 --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
Licence | MIT License |
Tools provided by this Server | Short Description |
---|---|
get-library-docs | Fetches up-to-date documentation for a library. |
resolve-library-id | Resolves a package/product name to a Context7-compatible library ID and returns a list of matching libraries. |
get-library-docs
Fetches up-to-date documentation for a library. 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.
Parameters | Type | Description |
---|---|---|
context7CompatibleLibraryID | string | Exact 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 query in the format '/org/project' or '/org/project/version'. |
tokens | number optional | Maximum number of tokens of documentation to retrieve (default: 10000). Higher values provide more context but consume more tokens. |
topic | string optional | Topic to focus documentation on (e.g., 'hooks', 'routing'). |
resolve-library-id
Resolves a package/product name to a Context7-compatible library ID and returns a list of matching libraries.
You MUST call this function before 'get-library-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:
Response Format:
For ambiguous queries, request clarification before proceeding with a best-guess match.
Parameters | Type | Description |
---|---|---|
libraryName | string | Library name to search for and retrieve a Context7-compatible library ID. |
{
"mcpServers": {
"context7": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/context7"
]
}
}
}
Manual installation
You can install the MCP server using:
Installation for