Skip to main content
Glama
westurner

sphinxcontrib-mcp

by westurner
README.md
# sphinxcontrib-mcp

A FastMCP server that exposes a built Sphinx site's navigation, page context,
metadata, and search tools. It reads the `webmcp.json` manifest emitted by
`sphinxcontrib-webmcp`, so the server and browser-side WebMCP integration share
one public schema.

## Run

```bash
sphinx-mcp --manifest docs/_build/html/webmcp.json
```

The default transport is stdio. Use `--transport http --host 127.0.0.1
--port 8001` for Streamable HTTP.

## Tools

- `sphinx.get_page_context`: return page title, URL, source, headings, and children.
- `sphinx.list_navigation`: return the Sphinx root and resolved children.
- `sphinx.get_documentation_metadata`: return public build, search, and schema metadata.
- `sphinx.search`: search native Sphinx references or configured docindex backends.
- `sphinx.navigate`: resolve a same-site page without performing browser navigation.

`native`, `docindex`, `oxirs`, and `meilisearch` search modes remain distinct.
The server only uses `public_api_key`; administrative Meilisearch keys are not
accepted from the manifest. Search results from OxiRS and Meilisearch are
returned under separate backend entries.