context7-mcp
v1.0.6MCP server for Context7
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
resolve-library-id
Resolves a package 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. When selecting the best match, consider: - Name similarity to the query - Description relevance - Code Snippet count (documentation coverage) - GitHub Stars (popularity) Return the selected library ID and explain your choice. If there are multiple good matches, mention this but proceed with the most relevant one.
| Parameter | Type | Description |
|---|---|---|
libraryName * | string | Library name to search for and retrieve a Context7-compatible library ID. |
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.
| Parameter | Type | Description |
|---|---|---|
context7CompatibleLibraryID * | string | Exact Context7-compatible library ID (e.g., 'mongodb/docs', 'vercel/nextjs') retrieved from 'resolve-library-id'. |
tokens | number | Maximum number of tokens of documentation to retrieve (default: 10000). Higher values provide more context but consume more tokens. |
topic | string | Topic to focus documentation on (e.g., 'hooks', 'routing'). |