Skip to main content

MCP server for reading Sphinx documentation

Project description

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

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysphinx_mcp-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysphinx_mcp-0.2.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file pysphinx_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: pysphinx_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysphinx_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bbf070232d3de02af611bd31b3c52c5fdb417a9e75530764cfb974eb48c5962e
MD5 63a25ba3b7aeee2a2273450b9c706a26
BLAKE2b-256 4130bb4bc65715ba85caf493a4ebbd52ad6c080dfd7d88305ae84966a112ae91

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysphinx_mcp-0.2.0.tar.gz:

Publisher: release.yml on vmphase/pysphinx_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysphinx_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pysphinx_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysphinx_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2ca05d13ab4580bbd198766fe19535d70a05042d6b9fc48f8167c3db86b822
MD5 e1ba48b91ea7bbcdd0f64d2dc378a286
BLAKE2b-256 a6550d4c32538c533ca95f46fa8273c8d7f34d5e6599dc13668a094367fef759

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysphinx_mcp-0.2.0-py3-none-any.whl:

Publisher: release.yml on vmphase/pysphinx_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page