pypi fastmcp 4.2.6
v4.2.6: Turn of Events

3 hours ago

This release adds an experimental CodeModeClient, which wraps a Client or ClientGroup and runs CodeMode on the client side, so an agent gets the search, schema and execute meta-tools over servers that don't run CodeMode themselves, and one execute block can chain tools across servers. Server spans now carry network.transport and, over HTTP, network.protocol.name and network.protocol.version. Fixes cover client callbacks and results, OpenAPI schemas and path parameters, resource links returned by a mounted server's tools (now namespaced like the rest of the mount), and response limiting, which now keeps truncated results within max_size as serialized.

Authlib is no longer installed with fastmcp. The client and server no longer use it, so code that imports authlib directly must declare it as its own dependency.

Experimental events are now their own package, fastmcp-events, with a new API. In 4.2.5 the Events extension lived in fastmcp.experimental.events and each event type was a check function. That module is gone: install the events extra (pip install "fastmcp[events]") and import from fastmcp_events. Each event type is now a Pydantic model: register it with @events.event("name"), then feed it with await events.emit(...) or with a reader registered by @events.reader(Model), so port each check function to a model and a reader. An optional for_subscription method on the model takes the subscription arguments and decides what each subscription receives. Emitted events can be kept in Redis through Docket with DocketEventLog (add fastmcp-events[docket]), so they survive restarts and reach every replica.

Thanks to our 28 contributors, including 12 first-time contributors.

What's Changed

Enhancements ✨

Fixes 🐞

Docs 📚

  • docs: Keycloak and RemoteAuthProvider work with CIMD, not only DCR by @zzstoatzz in #6752

Other Changes 🦾

  • chore(deps): Update github actions by @prefect-renovate[bot] in #6507
  • chore(deps): Update dependency prefect to v3.9.3 by @prefect-renovate[bot] in #6508
  • chore(deps): Update dependency ruff to v0.17.5 by @prefect-renovate[bot] in #6509
  • chore(deps): Update python Docker tag to v3.15 by @prefect-renovate[bot] in #6735

New Contributors

Full Changelog: v4.2.5...v4.2.6

Don't miss a new fastmcp release

NewReleases is sending notifications on new releases.