fastapi_mcp
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Exposing an existing FastAPI app as MCP tools while keeping its auth.
Your API is not FastAPI — it is FastAPI-native, not a generic OpenAPI converter.
About fastapi_mcp
The simplest way to use FastAPI-MCP is to add an MCP server directly to your FastAPI application:
FastAPI-MCP provides comprehensive documentation. Additionaly, check out the examples directory for code samples demonstrating these features in action.
FastAPI-MCP is designed as a native extension of FastAPI, not just a converter that generates MCP tools from your API. This approach offers several key advantages:
fastapi_mcp is an open-source project written primarily in Python, with 12k stars on GitHub. It was last updated in November 2025.
uv add fastapi-mcpfastapi_mcp vs. the alternatives
All 27 alternatives →| Record | Stars | Pricing | ||
|---|---|---|---|---|
| fastapi_mcpthis listing | 12k | Python | MIT | Open source |
| context7 | 61k | TypeScript | MIT | Open source |
| chrome-devtools-mcp | 49k | TypeScript | Apache-2.0 | Open source |
| github-mcp-server | 32k | Go | MIT | Open source |
| serena | 28k | Python | MIT | Open source |
| fastmcp | 27k | Python | Apache-2.0 | Open source |
