Retrieves version-specific Python standard-library documentation locally through symbol, section, search, and comparison tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Python Docs MCP Server.
search_docsSearch Python stdlib docs by query. Supports symbol lookup (`asyncio.TaskGroup`), module search (`json`), and free-text search. Returns ranked hits with BM25 scoring and snippet excerpts.
get_docsRetrieve a specific documentation page or section by slug and optional anchor. Returns markdown content with budget-enforced truncation and pagination. Retrieved results are cached on disk by Python docs version and request identity.
lookup_package_docsLook up official PyPI package metadata and return package-declared documentation/homepage/source URLs. This is a controlled PyPI metadata lookup, not generic web search.
list_versionsList all indexed Python versions with metadata.
detect_python_versionDetect the user's local Python version and report whether that version has been indexed.
compare_versionsDiff a Python stdlib symbol between two indexed versions. Returns `change=added
The ayhammouda/python-docs-mcp-server MCP server provides local, read-only access to indexed Python standard-library documentation. It is designed for coding agents that need a specific symbol, module, section, or version comparison without loading an entire documentation page into context.
The corpus is based on official Python documentation. Supported queries include exact symbols such as asyncio.TaskGroup, module names such as json, and general free-text searches. Results include ranked matches, BM25 scores, and excerpts that help the agent select the relevant page or section.
The server also includes a controlled PyPI metadata lookup. lookup_package_docs returns documentation, homepage, and source URLs declared by a package, rather than performing unrestricted web search.
The ayhammouda/python-docs-mcp-server MCP server uses a local SQLite database with FTS5 search. Documentation is indexed separately for the Python versions selected during setup. The initial index build downloads Python objects.inv files, obtains CPython documentation sources, renders them to JSON with Sphinx, and stores the resulting searchable data locally.
A typical symbol lookup uses search_docs first, followed by get_docs with the returned slug and optional anchor. get_docs returns Markdown for a page or section and applies a response budget, truncation, and pagination. Retrieved responses are cached on disk using the Python documentation version and request identity.
Version-related tools report indexed versions, detect the local Python version, and compare one standard-library symbol between two indexed versions. Comparisons can identify additions, removals, changes, deprecations, signature differences, related-section changes, and note differences. Signature deltas are advisory heuristics rather than a replacement for reading the source documentation.
Install or run the package with uvx or install it persistently through pipx. Before querying documentation, build the local corpus for the versions needed by the project. The documented example indexes Python 3.10 through 3.14, and the build may take several minutes because it prepares the source documentation and database.
The MCP configuration uses the published package as a local stdio process. Examples are provided for Claude Desktop, Cursor, Claude Code, and Codex. Claude Desktop requires restarting after its configuration changes. No API key is required. The package targets Python 3.12 or newer, while the indexed documentation versions are selected independently during the build.
The ayhammouda/python-docs-mcp-server MCP server exposes six read-only tools:
search_docs: searches symbols, modules, and free text with ranked snippets.get_docs: retrieves a documentation page or anchored section with truncation and pagination.lookup_package_docs: reads official PyPI metadata for declared project links.list_versions: lists indexed Python versions and metadata.detect_python_version: checks the local Python version and whether it is indexed.compare_versions: reports documented differences for a symbol between two indexed versions.This server is focused on official Python standard-library documentation, not arbitrary web pages or general third-party library research. Its documentation results depend on the versions that have been indexed locally; an installed Python version may be detected but unavailable if it was not included in the build. lookup_package_docs is limited to package-declared PyPI links. Runtime access is read-only, and the server does not provide tools for modifying documentation or package metadata.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ayhammouda-python-docs-mcp-server)<a href="https://allmcps.com/mcp/ayhammouda-python-docs-mcp-server"><img src="https://allmcps.com/api/badge/ayhammouda-python-docs-mcp-server?style=directory" alt="Python Docs MCP Server on AllMCPs" /></a>