Sphinx extension for documenting FastMCP tools (cards, badges, cross-refs)
Project description
sphinx-autodoc-fastmcp
Sphinx extension that documents FastMCP tools with card-style section
entries built from the shared api-* layout regions, plus safety badges,
parameter tables, and cross-reference roles.
The shipped output intentionally keeps a section wrapper for stable ToC labels
and :tool: / :toolref: behavior, but the inner card, badges, and type
rendering now come from sphinx_ux_autodoc_layout, sphinx_ux_badges, and
sphinx_autodoc_typehints_gp.
Features
fastmcp-tool: Renders a tool entry as a section card with sharedapi-header/api-contentregions plus a section target for ToC and{ref}labels.fastmcp-tool-input: Parameter table for a tool (place after prose in MyST).fastmcp-tool-summary: Summary tables grouped by safety tier.- Roles:
:tool:,:toolref:,:toolicon/:tooliconl/:tooliconr/:tooliconil/:tooliconir:,:badge:
Configuration
In conf.py after sphinx_autodoc_fastmcp is listed in extensions:
fastmcp_tool_modules = [
"myproject.tools.server_tools",
"myproject.tools.session_tools",
]
fastmcp_area_map = {
"server_tools": "sessions",
"session_tools": "sessions",
}
fastmcp_model_module = "myproject.models"
fastmcp_model_classes = {"SessionInfo", "WindowInfo"}
fastmcp_section_badge_map = {"Inspect": "readonly", "Act": "mutating", "Destroy": "destructive"}
fastmcp_section_badge_pages = {"tools/index", "index"}
fastmcp_collector_mode = "register" # or "introspect"
See the package docstrings and sphinx_autodoc_fastmcp.setup() for defaults.
Dependencies
- Python 3.10+
- Sphinx 8.1+
sphinx-ux-badges,sphinx-ux-autodoc-layout, andsphinx-autodoc-typehints-gpare declared dependencies and installed automatically with this package.
sphinx_autodoc_fastmcp automatically registers sphinx_ux_badges,
sphinx_ux_autodoc_layout, and sphinx_autodoc_typehints_gp via app.setup_extension().
You do not need to add them separately to your extensions list.
Documentation
See the full documentation for directive options, role reference, and live tool card demos.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_autodoc_fastmcp-0.0.1a8.tar.gz.
File metadata
- Download URL: sphinx_autodoc_fastmcp-0.0.1a8.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b24a593616a2a97a40bab99e9050dbb4a76587185c21bdc487d1544f331558a4
|
|
| MD5 |
8dd613811508691ab854af37a3a831f0
|
|
| BLAKE2b-256 |
6b5718659b65bc478173eec92c901527a82ebb401d20945f47fdcef514fe048d
|
Provenance
The following attestation bundles were made for sphinx_autodoc_fastmcp-0.0.1a8.tar.gz:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_fastmcp-0.0.1a8.tar.gz -
Subject digest:
b24a593616a2a97a40bab99e9050dbb4a76587185c21bdc487d1544f331558a4 - Sigstore transparency entry: 1281037229
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@46e3d7a384ea8d6d073a2b69c79d5aee3066c78d -
Branch / Tag:
refs/tags/v0.0.1a8 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46e3d7a384ea8d6d073a2b69c79d5aee3066c78d -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_autodoc_fastmcp-0.0.1a8-py3-none-any.whl.
File metadata
- Download URL: sphinx_autodoc_fastmcp-0.0.1a8-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4499ae8b2e009bd6260def5ba6ff2900bf9708c78293bcb5f9872de6717c072e
|
|
| MD5 |
359bb8bffcb5fd3fe19fcb359d8cdf9e
|
|
| BLAKE2b-256 |
1a42664e753e593dd21115f59980e4a4f4db0ca6550f761076d388cf0a88b291
|
Provenance
The following attestation bundles were made for sphinx_autodoc_fastmcp-0.0.1a8-py3-none-any.whl:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_fastmcp-0.0.1a8-py3-none-any.whl -
Subject digest:
4499ae8b2e009bd6260def5ba6ff2900bf9708c78293bcb5f9872de6717c072e - Sigstore transparency entry: 1281028234
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@46e3d7a384ea8d6d073a2b69c79d5aee3066c78d -
Branch / Tag:
refs/tags/v0.0.1a8 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46e3d7a384ea8d6d073a2b69c79d5aee3066c78d -
Trigger Event:
push
-
Statement type: