|
| 1 | +# Context7 MCP Server |
| 2 | + |
| 3 | +Context7 MCP Server -- Up-to-date documentation for LLMs and AI code editors |
| 4 | + |
| 5 | +[What is an MCP Server?](https://www.anthropic.com/news/model-context-protocol) |
| 6 | + |
| 7 | +## Characteristics |
| 8 | +Attribute|Details| |
| 9 | +|-|-| |
| 10 | +**Image Source**|Official Image |
| 11 | +|**Author**|[upstash](https://github.com/upstash) |
| 12 | +**Repository**|https://github.com/upstash/context7 |
| 13 | +**Dockerfile**|https://github.com/upstash/context7/blob/master/Dockerfile |
| 14 | +**Docker Image built by**|Docker Inc. |
| 15 | +**Docker Scout Health Score**|  |
| 16 | +**Licence**|MIT License |
| 17 | + |
| 18 | +## Available Tools |
| 19 | +Tools provided by this Server|Short Description |
| 20 | +-|- |
| 21 | +`get-library-docs`|Fetches up-to-date documentation for a library.| |
| 22 | +`resolve-library-id`|Required first step: Resolves a general package name into a Context7-compatible library ID.| |
| 23 | + |
| 24 | +--- |
| 25 | +## Tools Details |
| 26 | + |
| 27 | +#### Tool: **`get-library-docs`** |
| 28 | +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. |
| 29 | +Parameters|Type|Description |
| 30 | +-|-|- |
| 31 | +`context7CompatibleLibraryID`|`string`|Exact Context7-compatible library ID (e.g., 'mongodb/docs', 'vercel/nextjs') retrieved from 'resolve-library-id'. |
| 32 | +`tokens`|`number` *optional*|Maximum number of tokens of documentation to retrieve (default: 5000). Higher values provide more context but consume more tokens. |
| 33 | +`topic`|`string` *optional*|Topic to focus documentation on (e.g., 'hooks', 'routing'). |
| 34 | + |
| 35 | +--- |
| 36 | +#### Tool: **`resolve-library-id`** |
| 37 | +Required first step: Resolves a general package name into a Context7-compatible library ID. Must be called before using 'get-library-docs' to retrieve a valid Context7-compatible library ID. |
| 38 | +Parameters|Type|Description |
| 39 | +-|-|- |
| 40 | +`libraryName`|`string`|Library name to search for and retrieve a Context7-compatible library ID. |
| 41 | + |
| 42 | +--- |
| 43 | +## Use this MCP Server |
| 44 | + |
| 45 | +```json |
| 46 | +{ |
| 47 | + "mcpServers": { |
| 48 | + "context7": { |
| 49 | + "command": "docker", |
| 50 | + "args": [ |
| 51 | + "run", |
| 52 | + "-i", |
| 53 | + "--rm", |
| 54 | + "mcp/context7" |
| 55 | + ] |
| 56 | + } |
| 57 | + } |
| 58 | +} |
| 59 | +``` |
| 60 | + |
| 61 | +[Why is it safer to run MCP Servers with Docker?](https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/) |
0 commit comments