fastapi_mcp
FastAPI-MCP exposes the endpoints of an existing FastAPI application as Model Context Protocol tools, with authentication. Instead of writing a separate MCP server, you point it at your FastAPI app and it generates tools from your routes, preserving request and response schemas and the documentation you already wrote for Swagger.
It suits teams that already have a FastAPI backend and want AI assistants or agents to call it. Because it is FastAPI-native rather than a generic OpenAPI-to-MCP converter, it reuses your existing FastAPI dependencies for authentication and talks to the app directly through the ASGI interface, which is efficient and avoids an extra HTTP hop. You can mount the MCP server on the same app or deploy it separately. The authors also offer a hosted solution.
Getting started: `uv add fastapi-mcp` (or pip), create a `FastApiMCP` object from your app, and mount it. Then review which endpoints are exposed before connecting a client.
Features
Why choose it
Trade-offs
Maintenance check
- Last commit
- 2025-08-10
- Commits, last 90 days
- 0
- Releases, last 90 days
- 0
- Latest release
- v0.4.0 (2025-07-28)
- Open issues
- 174
- Recent issues with at least one comment
- 5/15
Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.
Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.
Most discussed open issues
- #189 [BUG] MCP session 404 in multi worker production environment9 comments · 2025-07-02
- #208 [VOTE] Support Stateful Sessions in a Multi-Worker Environment, Using a Shared Session Store7 comments · 2025-07-29
- #18 Issues integrating with Cline7 comments · 2025-03-22
- #154 Support POST requests on main route6 comments · 2025-05-29
- #72 [BUG] Cant get the server communicating to Claude correctly6 comments · 2025-04-16
Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.
Who it fits
- You already have a FastAPI application and want to expose its endpoints as MCP tools while reusing your existing FastAPI authentication dependencies and Swagger schemas.
- You want to mount the MCP server directly onto your ASGI app or deploy it separately under an MIT license.
- You are building a standalone MCP server from scratch rather than wrapping a FastAPI app; use FastMCP or the official MCP Python SDK.
- You need an actively updated repository (last push was November 2025).
How it differs
FastAPI-MCP automatically converts existing FastAPI web endpoints into MCP tools; FastMCP is an actively maintained general framework for writing purpose-built MCP servers and clients.
Compatibility
Quick start
Use cases
Alternatives
Featured in these lists
Comments
No comments yet. Be the first!