context7-mcp

v1.0.6
@mseep/context7-mcp Checked 9 hours ago Published 1 year ago

MCP 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.

ParameterTypeDescription
libraryName *stringLibrary 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.

ParameterTypeDescription
context7CompatibleLibraryID *stringExact Context7-compatible library ID (e.g., 'mongodb/docs', 'vercel/nextjs') retrieved from 'resolve-library-id'.
tokensnumberMaximum number of tokens of documentation to retrieve (default: 10000). Higher values provide more context but consume more tokens.
topicstringTopic to focus documentation on (e.g., 'hooks', 'routing').