github PrefectHQ/fastmcp v2.9.0
v2.9.0: Stuck in the Middleware With You

latest releases: v3.0.1, v3.0.0, v3.0.0rc3...
8 months ago

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 πŸ”§

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 πŸ“š

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

Full Changelog: v2.8.1...v2.9.0

Don't miss a new fastmcp release

NewReleases is sending notifications on new releases.