Skip to main content

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 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)

Searches routes by path (case-insensitive) and optionally filters by HTTP method.

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

fastapi_mcp_inspect-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

fastapi_mcp_inspect-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_mcp_inspect-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi_mcp_inspect-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_mcp_inspect-0.1.0.tar.gz
Algorithm Hash digest
SHA256 547fb71ec25ec76cd699dd52fb00d56ce2ee044fe297836dc84d6f8f73a3a262
MD5 d7f7121a93704ca256ec7eb3d3c6e97d
BLAKE2b-256 702a254b81b3f812deaa3e9f60454d95c551ab4b70fbeb400986eba581dfa008

See more details on using hashes here.

File details

Details for the file fastapi_mcp_inspect-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fastapi_mcp_inspect-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_mcp_inspect-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 381b402c74a7c87d235ccebc11f7d54240eec95a25363bc0fcab13c166dded67
MD5 74ee1e0395da8ca1f9cdef986c06dcfa
BLAKE2b-256 bec3b324f7552683ca8abc95040c6f02e247b55ee76a552315975b57520c9df4

See more details on using hashes here.

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