FastAPI-MCP is developed by tadata-org, with the goal of exposing FastAPI endpoints directly as Model Context Protocol (MCP) tools, with built-in authentication capabilities. According to the repository description, it uses your existing FastAPI dependencies to implement built-in authentication, adopting a FastAPI-native approach rather than being another OpenAPI-to-MCP converter.
Main capabilities:
- Zero configuration or minimal configuration: it only needs to point to a FastAPI application to work.
- Preserves the schemas of request models and response models.
- Preserves the documentation for all endpoints, consistent with Swagger.
- Flexible deployment: the MCP server can be mounted on the same application or deployed separately.
- Uses ASGI transport, directly using FastAPI's ASGI interface for efficient communication.
Usage: The simplest usage is to add the MCP server directly to a FastAPI application. According to the repository description, after setup is complete, the automatically generated MCP server is available at https://app.base.url/mcp For installation, uv (a fast Python package installer) is recommended, and pip can also be used. For specific code examples and advanced usage, refer to its documentation and examples directory.
Design philosophy (FastAPI-first):
- Native dependencies: use the familiar FastAPI Depends() to protect MCP endpoints and implement authentication and authorization.
- ASGI transport: communicate directly through the FastAPI application's ASGI interface, avoiding HTTP calls from MCP to the API.
- Unified infrastructure: the FastAPI application does not have to run separately from the MCP server (separate deployment is also supported).
Applicable scenarios:
- You already have a FastAPI service and want to add MCP capabilities to it with minimal changes.
- You need to reuse existing FastAPI dependencies for authentication in MCP endpoints.
- You want to preserve the request/response schemas and Swagger documentation of existing endpoints.
Limitations and environment:
- Requires Python 3.10+, with 3.12 recommended.
- The license is the MIT License, Copyright (c) 2025 Tadata Inc.
- Regarding hosting options, the repository mentions that if you prefer a hosted service, you can check tadata.com; specific fees and pricing are not currently provided.
- Installation commands, more detailed documentation, examples, and advanced usage are not currently provided in detail.