MCP server for FastAPI apps
Top 7.7% on sourcepulse
This library exposes FastAPI endpoints as Model Context Protocol (MCP) tools, enabling seamless integration with systems that consume MCP. It targets developers building microservices with FastAPI who need to expose their functionality via the MCP standard, offering built-in authentication and minimal configuration.
How It Works
FastAPI-MCP leverages FastAPI's native ASGI interface to directly access and expose endpoints as MCP tools. It preserves the original request/response schemas and endpoint documentation from FastAPI. Authentication is handled via FastAPI's Depends()
mechanism, allowing reuse of existing authentication logic. This direct ASGI transport avoids inter-process communication overhead.
Quick Start & Requirements
uv add fastapi-mcp
or pip install fastapi-mcp
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is actively maintained, with no explicit limitations or caveats mentioned in the README.
5 days ago
1 day