Simple tool which mounts your fastapi application and exposes an mcp endpoint for AI agents to inspect your fastapi server.
Project description
fastapi-mcp-inspect
Mount an MCP server onto your FastAPI application to let AI agents inspect your routes, endpoints, and schemas at runtime.
Installation
uv add fastapi-mcp-inspect
# or using pip: pip install fastapi-mcp-inspect
Quick Start
from fastapi import FastAPI
from fastapi_mcp_inspect import FastAPIInspect
app = FastAPI()
FastAPIInspect(app, mount_path="/mcp")
Any LLM with MCP support can now connect to your app's /mcp endpoint and
inspect all registered routes.
MCP Tools
show_all_routes()
Lists every registered route with its HTTP methods, summary, description, and total count.
show_endpoint_details(method, endpoint)
Shows detailed information for a specific endpoint, including request/response schemas and any referenced Pydantic models.
search_routes(query, method=None, search_in_summary=False, tags=None)
Searches routes by path (case-insensitive) with optional filters:
method— filter by HTTP method (e.g. GET, POST).search_in_summary— when True, also matches against summaries and descriptions.tags— filter by tag names (OR logic — any match).
list_all_tags()
Lists every unique tag used across API routes with route counts.
get_schema_definition(schema_name)
Returns the full field-level definition of a Pydantic schema used by any endpoint. Lookup is case-insensitive.
Development
git clone https://github.com/inclinedadarsh/fastapi-mcp-inspect.git
cd fastapi-mcp-inspect
uv sync
License
MIT
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
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 fastapi_mcp_inspect-0.2.1.tar.gz.
File metadata
- Download URL: fastapi_mcp_inspect-0.2.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf83dc2f29e8de9fa470ebb58dc96943e69d61781628c047f590305614af7981
|
|
| MD5 |
312113e1440369b8a766064fe4966244
|
|
| BLAKE2b-256 |
1298277ed4c1ff82ed4d15d0917a62eff10faa10db14e08c547c3c5596481bb1
|
Provenance
The following attestation bundles were made for fastapi_mcp_inspect-0.2.1.tar.gz:
Publisher:
ci.yml on inclinedadarsh/fastapi-mcp-inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_mcp_inspect-0.2.1.tar.gz -
Subject digest:
cf83dc2f29e8de9fa470ebb58dc96943e69d61781628c047f590305614af7981 - Sigstore transparency entry: 1952397120
- Sigstore integration time:
-
Permalink:
inclinedadarsh/fastapi-mcp-inspect@e5659d10b41a620caf9b9bc22695c5d712c7ed2f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/inclinedadarsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e5659d10b41a620caf9b9bc22695c5d712c7ed2f -
Trigger Event:
push
-
Statement type:
File details
Details for the file fastapi_mcp_inspect-0.2.1-py3-none-any.whl.
File metadata
- Download URL: fastapi_mcp_inspect-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.2 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 |
12838e3e067a216584a9a6bf11aeec40c9c1a80f8bd64bbc9afb4156b9fab36e
|
|
| MD5 |
61fab792e11f5399e0984fbc200eca0b
|
|
| BLAKE2b-256 |
0526d633e357b0766de15c7f3a55124dc546d695af0041c154ea6b86eedd55c8
|
Provenance
The following attestation bundles were made for fastapi_mcp_inspect-0.2.1-py3-none-any.whl:
Publisher:
ci.yml on inclinedadarsh/fastapi-mcp-inspect
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastapi_mcp_inspect-0.2.1-py3-none-any.whl -
Subject digest:
12838e3e067a216584a9a6bf11aeec40c9c1a80f8bd64bbc9afb4156b9fab36e - Sigstore transparency entry: 1952397352
- Sigstore integration time:
-
Permalink:
inclinedadarsh/fastapi-mcp-inspect@e5659d10b41a620caf9b9bc22695c5d712c7ed2f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/inclinedadarsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e5659d10b41a620caf9b9bc22695c5d712c7ed2f -
Trigger Event:
push
-
Statement type: