Python Docs MCP Server

Local, read-only MCP retrieval over official Python standard library docs.

Remote serverstreamable-httpPython

What is the Python Docs MCP server?

Connect Python Docs to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Local, read-only MCP retrieval over official Python standard library docs. The python docs mcp server is what makes that connection.

What the server does

Built for the moment your agent needs asyncio.TaskGroup signatures, pathlib.Path semantics, or what changed in 3.12 — not a web fetch, not a hosted API, not a vector store hallucinating section anchors. Just an indexed slice of docs.python.org, returned by symbol or by query, scoped to the version you actually ship on.

  • asyncio.TaskGroup should resolve to the actual symbol, not a fuzzy page hit
  • Python version matters (3.12 and 3.13 do not always say the same thing)
  • fetching a whole page burns tokens when one section answers the question
  • the official docs are canonical, but they do not ship as an MCP server

Installation

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • search_docs — Search Python stdlib docs by query. Supports symbol lookup (asyncio.TaskGroup), module search (json), and free-text search. Returns ranked hits with
  • get_docs — Retrieve a specific documentation page or section by slug and optional anchor. Returns markdown content with budget-enforced truncation and
  • lookup_package_docs — Look up official PyPI package metadata and return package-declared documentation/homepage/source URLs. This is a controlled PyPI metadata lookup, not
  • list_versions — List all indexed Python versions with metadata
  • detect_python_version — Detect the user's local Python version and report whether that version has been indexed
  • compare_versions — Diff a Python stdlib symbol between two indexed versions. Returns change=added
  • Cursor — Add this to your Cursor MCP settings (.cursor/mcp.json in your project or global settings):
  • Codex — The Codex tool exposed by this server

Worth knowing first

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Among the knowledge and memory options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Python Docs's toolset — search_docs, get_docs, lookup_package_docs and 5 more — is a fair guide to whether it matches your workflow. It is maintained by ayhammouda; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
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 requ
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
CursorAdd this to your Cursor MCP settings (.cursor/mcp.json in your project or global settings):
CodexThe Codex tool exposed by this server.

How to install the Python Docs MCP server

{
  "mcpServers": {
    "python-docs": {
      "command": "C:\\Users\\YOU\\.local\\bin\\uvx.exe",
      "args": ["python-docs-mcp-server"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Python Docs to search docs.
  • Use Python Docs to get docs.
  • Use Python Docs to lookup package docs.

Frequently asked questions

It connects Python Docs to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (search_docs, get_docs, lookup_package_docs, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Python Docs directly.