
fastapi_mcp
Python library that turns FastAPI endpoints into MCP tools for AI clients, with auth reuse
- Pricing
- Open source
- Platforms
- API, self-hosted
- GitHub stars
- 12K
- Last commit
- 1 year ago
- Language
- Python
- License
- MIT
Similar MCP servers
About fastapi_mcp
fastapi_mcp is an open-source MCP server for ai models and llm tooling. It is available on API and self-hosted.
The library reads an existing FastAPI application and exposes its routes as Model Context Protocol tools, so an AI client can call them without a separate API layer. The README says setup is a few lines: wrap your app in FastApiMCP and mount the server, after which the generated MCP endpoint is served from your app's base URL.
Authentication works through the FastAPI dependencies you already use, so access to MCP tools can follow the same rules as your regular endpoints. Request and response schemas and the endpoint documentation carry over from the OpenAPI definitions. The MCP server can be mounted on the same app or deployed separately.
It suits Python teams that already run FastAPI services and want to give AI assistants access to them without rewriting endpoints. A managed hosted option is mentioned separately by the vendor, Tadata.
What it does
- Built-in endpoint authentication
- Secures MCP tools with the FastAPI dependencies already defined in your application.
- Automatic tool generation
- Converts existing FastAPI routes into MCP tools with minimal configuration.
- Schema preservation
- Keeps request and response model schemas intact for AI clients.
- Swagger-style documentation
- Carries over endpoint documentation as it appears in your API docs.
- Flexible deployment
- Mount the MCP server in the same app or deploy it separately.
- In-process ASGI transport
- Calls the FastAPI app directly through ASGI rather than making extra HTTP requests.
Good for
- Letting an AI assistant call an internal FastAPI service through MCP
- Adding authenticated AI tool access to an existing Python backend
- Exposing a FastAPI product API to MCP-compatible clients
- Testing MCP tool behaviour against routes already covered by OpenAPI docs
Pricing
Open source
Free MIT-licensed library; a managed hosted solution is offered separately by Tadata.
Prices change. Check fastapi-mcp.tadata.com before you buy.
fastapi_mcp FAQ
What does it need to run?
The README lists Python 3.10 or newer, with 3.12 recommended, and installation via uv or pip.
How is it installed?
The README gives uv add fastapi-mcp as the recommended command, with pip install fastapi-mcp as an alternative.
What license is it under?
The README states the MIT License, copyright Tadata Inc. (2025).
Is there a hosted version?
The README points to tadata.com for a managed hosted solution.
Is fastapi_mcp free?
Yes. fastapi_mcp is open source, so you can use and self-host it for free.
What are the best alternatives to fastapi_mcp?
The closest alternatives to fastapi_mcp are MCP Foundry — Build, Test & Publish MCP Servers, MCP-Bridge, Apollo MCP Server, python-sdk and awesome-mcp-servers.
Where this comes from
- Description: written from the project's README and the project's website.

