mcpdocs
Static documentation generator for MCP servers — like Swagger UI, but for MCP.
mcpdocs introspects running Model Context Protocol (MCP) servers via SSE and generates a beautiful, searchable static documentation site. It helps developers and users understand the tools, resources, and prompts available in an MCP server.
Features
- 🔍 Auto-Introspection: Connects to any running MCP server via SSE URL to discover its capabilities.
- 🛠️ Full Support: Documents Tools, Resources, Resource Templates, and Prompts.
- 🎨 Beautiful UI: Clean, responsive, and searchable documentation with dark mode support.
- 🚀 FastAPI Integration: Easily mount auto-generated docs on your existing FastAPI application.
- 📦 Static Output: Generates pure HTML/CSS that can be hosted anywhere (GitHub Pages, S3, etc.).
- 🤖 CI/CD Ready: CLI-first design for automated documentation workflows.
Installation
Note: The repository is named
mcpdocs, but the PyPI package is published asmcpdocs-gen.
pip install mcpdocs-gen
To use the FastAPI integration:
pip install "mcpdocs-gen[fastapi]"
Usage
1. Command Line Interface (CLI)
The CLI tool is named mcpdocs. To generate documentation, you provide the SSE URL of your running server.
Basic Example:
mcpdocs generate --url "http://localhost:8000/sse"
Custom Output Directory:
mcpdocs generate --url "http://localhost:8000/sse" --output "./static-docs"
CLI Reference
| Flag | Shortcut | Description |
|---|---|---|
--url |
-u |
(Required) The SSE URL of the running MCP server. |
--output |
-o |
Where to save the HTML (default: ./site). |
--timeout |
-t |
Seconds to wait for server responses (default: 30.0). |
2. FastAPI Integration
You can serve the documentation site directly from your FastAPI application.
from fastapi import FastAPI
from mcpdocs.integrations.fastapi import setup_mcpdocs
app = FastAPI()
setup_mcpdocs(
app,
url="http://localhost:8000/sse",
mount_path="/docs/mcp",
output_dir=".mcpdocs-cache"
)
Python API Reference (setup_mcpdocs)
| Parameter | Type | Description |
|---|---|---|
app |
FastAPI |
Your FastAPI application instance. |
url |
str |
The SSE URL of the running MCP server. |
mount_path |
str |
URL path where docs will be served (default: /mcpdocs). |
output_dir |
str |
Local path to store static files (default: .mcpdocs-static). |
timeout |
float |
Seconds to wait for server responses (default: 30.0). |
auto_regenerate |
bool |
If True, regenerates docs on app startup (default: True). |
3. Inspect (JSON dump)
Dump the raw server spec as JSON — useful for CI or debugging:
mcpdocs inspect --url "http://localhost:8000/sse"
How it works
- Introspection:
mcpdocsconnects to the provided SSE URL. - Connection: It establishes a JSON-RPC connection over the SSE transport.
- Discovery: It queries the server for all available tools, resources, and prompts.
- Rendering: It generates a standalone static website using Jinja2 templates.
Security
Only run mcpdocs against trusted MCP servers. The generated documentation does not include sensitive configuration details of the server.
License
MIT
Metadata
Release files for mcpdocs-gen 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcpdocs_gen-0.1.3.tar.gz | 17.0 kB | With provenance | Details for mcpdocs_gen-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcpdocs_gen-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for mcpdocs_gen-0.1.3-py3-none-any.whl |
Total release size: 41.5 kB
Release files / mcpdocs_gen-0.1.3.tar.gz
| Download URL | mcpdocs_gen-0.1.3.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96ae32bf747e65c253d0642ba16120c4f4d56956c41d6f5cf07330d778461cf4
|
|
BLAKE2b-256 checksum How to use checksums |
a6c0b86429dcb70085926617498347c4f8c0d40918d2a45bde526397ae247b36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logRelease files / mcpdocs_gen-0.1.3-py3-none-any.whl
| Download URL | mcpdocs_gen-0.1.3-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01f6c7ebee98b482629086f2e0ffaf9e96747e1f7d4493a17a45b4b2c8e2f24c
|
|
BLAKE2b-256 checksum How to use checksums |
c8cde3680f7ad0c37af1f7e7756731d73413eb7054dabf1010bcbd0af7ac95ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logSecurity for mcpdocs-gen 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mcpdocs_gen-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.