fastmcp/docs/development/v4-notes
Jeremiah Lowin 3213776b25
Run FastMCP middleware for every inbound message (#4553)
* Make the SDK seam the root of FastMCP middleware dispatch (D3)

Notifications, cancellations, and malformed/unroutable messages now reach
on_message/on_request/on_notification at the SDK seam. Component methods keep
their interior dispatch (typed hooks, tool-exception visibility) unchanged; the
seam covers only messages the interior never dispatches, so each hook fires once.

* Document the middleware seam coverage and suspend semantics (D3)

* Align seam docs and ask-visibility test with the result-cycle MRTR model

An InputRequiredResult is the full result of a complete request->response
cycle, not a suspension: component hooks observe an asking round's
InputRequiredToolResult as an ordinary return value.

* Replace 'seam' language with plain dispatch terminology

* Keep the raw middleware __call__ signature; forward middleware message edits

* Cover fires-once across an MRTR continuation round

* Align cherry-picked coverage test with renamed recorder

* Rewrite only the message, never the dispatch destination
2026-07-19 20:29:08 -04:00
..
change-register.mdx Run FastMCP middleware for every inbound message (#4553) 2026-07-19 20:29:08 -04:00
feature-program.mdx Add guard-mode multi-round-trip tools (SEP-2322) (#4544) 2026-07-19 16:42:06 -04:00
index.mdx Add server-side identity assertion (SEP-990 ID-JAG) (#4483) 2026-07-18 19:52:15 -04:00
known-gaps.mdx Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
protocol-2026.mdx Add guard-mode multi-round-trip tools (SEP-2322) (#4544) 2026-07-19 16:42:06 -04:00