Skip to main content
MCP server CX Codex

Python Docs MCP Server — Claude Code MCP server

Provides an offline SQLite index of Python stdlib documentation for coding agents. Fetches exact symbols and sections per language version without scraping web pages.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add python-docs-mcp-server -- uvx python-docs-mcp-server
Open on GitHub

What Python Docs MCP Server does

Large web page dumps pollute model context and cause retrieval errors. This MCP server solves that by caching CPython documentation locally using Sphinx JSON output and an SQLite FTS5 database. When an agent requests a module, it inspects Python objects.inv records and returns only the targeted section. Seven read-only tools handle lookups without hitting external APIs at query time.

Documentation targets span Python 3.10 through 3.15. The model receives information tied strictly to the specified language release, preventing confusion over updated syntax like asyncio.TaskGroup. Result payloads enforce safety boundaries: search responses stay under 8000 UTF-8 bytes, and text fetches via get_docs stop at 8000 characters.

Running the tool requires Python 3.12 or later. Queries fail outright until you run the initial build-index step, which clones CPython documentation sources and builds the database locally.

What it helps with

  • locate exact standard library signatures for a specific Python release
  • retrieve targeted documentation sections without loading entire web pages
  • inspect differences across Python versions from 3.10 to 3.15
  • query CPython reference manuals offline without third-party API credentials

Example prompts for the agent

  • Check the signature of asyncio.TaskGroup in Python 3.13.
  • Look up path handling rules for pathlib.Path in Python 3.12.
  • Find standard library changes introduced in Python 3.14.

How to install Python Docs MCP Server

Platform CLI

claude mcp add python-docs-mcp-server -- uvx python-docs-mcp-server

uvx runs the command named after the package; if the README names another one, use uvx --from python-docs-mcp-server <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Python Docs MCP Server

How to install Python Docs MCP Server in Claude Code?

Run claude mcp add python-docs-mcp-server -- uvx python-docs-mcp-server. Next, generate the local documentation index with uvx python-docs-mcp-server build-index --versions 3.10,3.11,3.12,3.13,3.14.

What does Python Docs MCP Server do?

It builds an offline SQLite index of official Python documentation and provides seven read-only tools to retrieve exact standard library symbols and section text by version.

Does Python Docs MCP Server require internet access or API tokens?

No API keys are needed. Network connectivity is only required once during the initial build-index command to fetch Sphinx sources and inventory files.

Similar MCP servers

All MCP servers for Programming languages →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor