All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
🚀 FastAPI-MCP now supports Streamable HTTP transport.
HTTP transport is now the recommended approach, following the specification that positions HTTP as the standard while maintaining SSE for backwards compatibility.
mount()method is deprecated and will be removed in a future version. Usemount_http()for HTTP transport (recommended) ormount_sse()for SSE transport.
- 🎉 Streamable HTTP Transport Support - New
mount_http()method implementing the MCP Streamable HTTP specification - 🎉 Stateful Session Management - For both HTTP and SSE transports
- 🐛 Fix a bug with OAuth default_scope (#123)
Skipped 0.3.5 due to a broken release attempt.
- 🚀 Add configurable HTTP header forwarding (#181)
- 🐛 Fix a bug with handling FastAPI
root_pathparameter (#163)
- 🐛 Update the
mcpdependency to1.8.1. Fixes Issue #134 that was caused after a breaking change in mcp sdk 1.8.0.
Fixes the broken release from 0.3.2.
- 🐛 Fix critical bug in openapi conversion (missing
param_descdefinition) (#107, #99) - 🐛 Fix non-ascii support (#66)
This is a broken release and should not be used.
- 🐛 Fix a bug preventing simple setup of basic token passthrough
🚀 FastApiMCP now supports MCP Authorization!
You can now add MCP-compliant OAuth configuration in a FastAPI-native way, using your existing FastAPI Depends() that we all know and love.
- 🎉 Support for Authentication / Authorization compliant to MCP 2025-03-26 Specification, using OAuth 2.1. (#10)
- 🎉 Support passing http headers to tool calls (#82)
🚀 FastApiMCP now works with ASGI-transport by default.
This means the base_url argument is redundant, and thus has been removed.
You can still set up an explicit base URL using the http_client argument, and injecting your own httpx.AsyncClient if necessary.
⚠️ Breaking Change: Removedbase_urlargument since it's not used anymore by the MCP transport.
- 🐛 Fix short timeout issue (#71), increasing the default timeout to 10
- Complete refactor from function-based API to a new class-based API with
FastApiMCP - Explicit separation between MCP instance creation and mounting with
mcp = FastApiMCP(app)followed bymcp.mount() - FastAPI-native approach for transport providing more flexible routing options
- Updated minimum MCP dependency to v1.6.0
- Support for deploying MCP servers separately from API service
- Support for "refreshing" with
setup_server()when dynamically adding FastAPI routes. Fixes Issue #19 - Endpoint filtering capabilities through new parameters:
include_operations: Expose only specific operations by their operation IDsexclude_operations: Expose all operations except those with specified operation IDsinclude_tags: Expose only operations with specific tagsexclude_tags: Expose all operations except those with specific tags
- FastAPI-native approach for transport. Fixes Issue #28
- Numerous bugs in OpenAPI schema to tool conversion, addressing Issue #40 and Issue #45
- Function-based API (
add_mcp_server,create_mcp_server, etc.) - Custom tool support via
@mcp.tool()decorator
- Remove unneeded dependency.
- Issue #34: Fix syntax error.
- Issue #23: Hide handle_mcp_connection tool.
- Issue #25: Dynamically creating tools function so tools are useable.
- Issue #8: Converted tools unuseable due to wrong passing of arguments.
- Dependency resolution issue with
mcppackage andpydantic-settings
- Complete refactor: transformed from a code generator to a direct integration library
- Replaced the CLI-based approach with a direct API for adding MCP servers to FastAPI applications
- Integrated MCP servers now mount directly to FastAPI apps at runtime instead of generating separate code
- Simplified the API with a single
add_mcp_serverfunction for quick integration - Removed code generation entirely in favor of runtime integration
- Main
add_mcp_serverfunction for simple MCP server integration - Support for adding custom MCP tools alongside API-derived tools
- Improved test suite
- Manage with uv
- CLI interface and all associated commands (generate, run, install, etc.)
- Code generation functionality
- Added support for PEP 604 union type syntax (e.g.,
str | None) in FastAPI endpoints - Improved type handling in model field generation for newer Python versions (3.10+)
- Fixed compatibility issues with modern type annotations in path parameters, query parameters, and Pydantic models
- Initial release of FastAPI-MCP
- Core functionality for converting FastAPI applications to MCP servers
- CLI tool for generating, running, and installing MCP servers
- Automatic discovery of FastAPI endpoints
- Type-safe conversion from FastAPI endpoints to MCP tools
- Documentation preservation from FastAPI to MCP
- Claude integration for easy installation and use
- API integration that automatically makes HTTP requests to FastAPI endpoints
- Examples directory with sample FastAPI application
- Basic test suite