Skip to main content
Glama

pysphinx_mcp

MCP server for browsing, searching, and reading Sphinx documentation sites.

PyPI Python License

Tools

  • list_pages(base_url): all pages on a docs site

  • read_page(base_url, page_path): page content as clean text

  • search_docs(base_url, query): full-text search via Sphinx search index

  • list_sections(base_url, page_path): heading structure (h1-h4) of a page

  • get_api_signature(base_url, object_path): signature, parameters, and docstring for a class or function

Related MCP server: MCP AI Docs

Install

pip install -U pysphinx_mcp

Usage

As an MCP server

Register with any MCP host:

{
    "mcpServers": {
        "sphinx-docs": {
            "command": "python",
            "args": ["-m", "pysphinx_mcp"]
        }
    }
}

As a library

Each tool is an async function, import and call from your own code:

from pysphinx_mcp import search_docs, read_page, get_api_signature

async def main():
    results = await search_docs(
        "https://docs.python.org/3/",
        "async await",
    )

    content = await read_page(
        "https://docs.python.org/3/",
        "library/asyncio.html",
    )

    signature = await get_api_signature(
        "https://docs.python.org/3/",
        "asyncio.gather",
    )

Composing with other servers

Import the FastMCP instance for mounting or wrapping:

from pysphinx_mcp import mcp

parent_server.mount(mcp)

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that provides indexed, searchable access to Anthropic Claude and Google Gemini documentation, with full-text search, page fetching, and section listing capabilities.
    4
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for documentation search that automatically indexes web documentation sites and provides semantic, full-text, or hybrid search capabilities.
    2 npm
    MIT