fastapi_mcp

FastAPI-MCP is a zero-configuration tool that automatically exposes FastAPI endpoints as Model Context Protocol (MCP) tools, preserving schemas and documentation for seamless integration and extension. FastAPI-MCP is a zero-configuration tool

4,312
40

FastAPI-MCP

FastAPI-MCP is a zero-configuration tool that automatically exposes FastAPI endpoints as Model Context Protocol (MCP) tools. It allows direct integration by mounting an MCP server to your FastAPI app, automatically discovering endpoints and converting them to MCP tools. It preserves schemas of request/response models and endpoint documentation.

Key features include zero configuration, automatic endpoint discovery, schema preservation, and extensibility with custom MCP tools.

Installation is recommended via uv add fastapi-mcp or pip install fastapi-mcp. Basic usage involves mounting the MCP server to your FastAPI app with a specified mount path and name. Advanced usage allows customization, such as describing all responses or including full JSON schemas.

The tool supports connecting to the MCP server using SSE with clients like Cursor, or via mcp-proxy stdio for clients like Claude Desktop.

Developed by Tadata Inc. under the MIT License, it requires Python 3.10+ and uv. Contributions are welcome, see CONTRIBUTING.md. Join the MCParty Slack community for support.

Repository

TA
tadata-org

tadata-org/fastapi_mcp

Created

March 8, 2025

Updated

March 28, 2025

Language

Python

Category

Developer Tools