About Fastapi Mcp
This open source Python library turns an existing FastAPI application into a Model Context Protocol server, so endpoints a team already maintains become tools that AI agents can call. The setup is three lines: import the class, wrap the FastAPI application and mount the server, which then answers at an mcp path on the same base URL. No separate tool definitions, schemas or wrapper service are written by hand.
It is aimed at Python teams who want agent access to an internal or public API without maintaining a parallel integration layer. Rather than converting an OpenAPI document after the fact, it reads the FastAPI application directly, which means request and response model schemas are preserved and endpoint documentation carries across exactly as it appears in Swagger. Authentication reuses the application's existing FastAPI dependencies, so whatever rules already protect the HTTP routes also protect the tool calls, and nothing is exposed that was not already guarded. Deployment is flexible: the server can be mounted on the same application or run as a separate deployment, and it communicates over the ASGI interface for efficient internal calls rather than making network round trips to itself.
The library is free and published under the MIT license, installed from PyPI. There is no pricing page and no paid edition of the library itself.
The documentation points readers who want a managed option to the publisher's commercial site. That site now presents a different product, an assistant that works inside Slack and connects to business tools, so anyone looking for a hosted version of this library should confirm availability with the vendor before planning around it.