FastMCP 2.9 introduces two important features that push beyond the basic MCP protocol. MCP Middleware brings a flexible middleware system for intercepting and controlling server operations - think authentication, logging, rate limiting, and custom business logic without touching core protocol code. Server-side type conversion solves a major developer pain point: while MCP requires string arguments, your functions can now work with native Python types like lists and dictionaries, with automatic conversion handling the complexity.
These features transform FastMCP from a simple protocol implementation into a powerful framework for building sophisticated MCP applications. Combined with the new File utility for binary data and improvements to authentication and serialization, this release makes FastMCP significantly more flexible and developer-friendly while maintaining full protocol compliance.
What's Changed
New Features π
- Add File utility for wrapping binary data by @gorocode in #843
- Consolidate prefix logic into FastMCP methods by @jlowin in #861
- Add MCP Middleware by @jlowin in #870
- Implement server-side type conversion for prompt arguments by @jlowin in #908
Enhancements π§
- fix tool description indentation issue #844 https://github.com/jlowin⦠by @zfflxx in #845
- Add version parameter to FastMCP constructor by @mkyutani in #842
- Update version to not be positional by @jlowin in #848
- Add key to component by @jlowin in #869
- Add session_id property to Context for data sharing by @jlowin in #881
- Fix CORS documentation example to properly handle preflight requests by @jlowin in #895
- Simplify trailing slash handling for HTTP endpoints by @jlowin in #896
- Openapi recursive components by @owtaylor in #897
- Add httpx.Auth Support to RemoteMCPServer for Custom Authentication methods to multiple MCP Servers by @Jason-CKY in #906
- Add client-side prompt argument serialization by @jlowin in #910
Fixes π
- fix: report_progress missing passing related_request_id causes notifications not working in streaming-http by @alexsee in #838
- Fix JWT issuer validation to support string values per RFC 7519 by @jlowin in #892
- Fix BearerAuthProvider audience type annotations by @jlowin in #894
Docs π
- Add CLAUDE.md development guidelines by @jlowin in #880
- Update context docs for session_id property by @jlowin in #882
- add api ref by @zzstoatzz in #893
- Fix api ref rendering by @zzstoatzz in #900
- Simplify docs nav by @jlowin in #902
- Add fastmcp inspect command by @jlowin in #904
- Update client docs by @jlowin in #912
- Update docs nav by @jlowin in #913
- Update integration documentation for Claude Desktop, ChatGPT, and Claude Code by @jlowin in #915
- Add http as an alias for streamable http by @jlowin in #917
- Clean up parameter documentation by @jlowin in #918
- use new
--excludeflag by @zzstoatzz in #907 - Add middleware examples for timing, logging, rate limiting, and error handling by @jlowin in #919
- ControlFlow -> FastMCP π by @jlowin in #922
Examples & Contrib π‘
- contrib.mcp_mixin: add support for enabled, mcp_tool: annotations, excl. parm, serializer by @rsp2k in #860
- Add ATProto (Bluesky) MCP Server Example by @zzstoatzz in #916
- fix path in atproto example pyproject by @zzstoatzz in #920
- remove uv source in example by @zzstoatzz in #921
New Contributors
- @alexsee made their first contribution in #838
- @zfflxx made their first contribution in #845
- @mkyutani made their first contribution in #842
- @gorocode made their first contribution in #843
- @rsp2k made their first contribution in #860
- @owtaylor made their first contribution in #897
- @Jason-CKY made their first contribution in #906
Full Changelog: v2.8.1...v2.9.0