* Fix upgrade static analysis
Generated with Codex
* Preserve concrete transport return types
Generated with Codex
* Avoid widening transport return types
Generated with Codex
* Model transforming transport return types
Generated with Codex
* Exclude standalone screenshot examples from ty
Generated with Codex
pytest-timeout falls back to its thread method on Windows, which os._exit()s
the process instead of failing the test. A single slow test therefore kills an
xdist worker and fails whichever unrelated test it was running.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Rewrite the v4 What's New page
Teach the headline features with code instead of asserting them, drop the
major-version throat-clearing and SEP list, and correct the elicitation
claim: ctx.elicit() is unchanged and handshake-only, while sampling and
roots are removed outright.
* Fix broken doc links and stale version references
Repoint five dead links and anchors, refresh v3-era version examples on the
v4 docs, and add the missing FastMCP 3 entry to the installation page's
upgrade section.
* Document server extensions
add_extension() shipped in v4 with no documentation page. Covers the
extension interface, request methods, tool-call interception, lifespan
ownership, and the client half.
* Link the FastMCP TypeScript library
* Address Codex review feedback
Gate the extension interceptor on the client's per-request opt-in rather
than claiming negotiation does it; show the v4 beta pin on the install
page instead of a version a reader cannot get; note that UserSession
requires authentication.
* Always emit a tool title, derived from name when unset
Some MCP clients (e.g. ChatGPT) drop tools with no `title` instead of
falling back to `name` for display as the spec allows. Deriving a
default title in Tool.to_mcp_tool() fixes this for every tool built on
top of it, including the search-transform, code-mode, and session
proxy tools that never set one explicitly.
Fixes#4414
* Derive fallback title from the overridden name, document it
Addresses Codex review on #4694.
* Resolve title precedence from effective overrides
* Normalize mapping annotations before deriving the title
* Add v4.0.0b1 changelog and updates entries
* Drop meta note from b1 intro; add #4682 under enhancements
* File #4682 under fixes
* Correct the camelCase rename claim: Python model fields, not the wire
* Baseline the b1 changelog on v3.4.5
* Simplify the beta banner
* Flatten OpenAPI discriminator subtypes into request bodies
* Resolve schema-name discriminator mappings and union conflicting variant fields
* Advertise discriminator values for propertyless variants and document the behavior
* Remove 3.x-era compatibility shims
* Require response_type in ctx.elicit()
* Name the utilities path for the two non-re-exported auth helpers
* Point sampling handler migration at its submodule
* Document the issuer_url identity change for upgraders
Adds an upgrade note covering the one-time re-authorization, fixes the MultiAuth examples that pointed issuer_url at the upstream IdP, and corrects the OCI docstring.
* Address review: valid docstring example, narrower reauth scope
* Scope the reauth checklist item to token-minting providers
* Add require_roles auth check
* Make role docs runnable standalone and fully annotated
* Treat a scalar role claim as one role; correct step-up docs
* Add v4 version badge to require_roles docs
* Use issuer_url for OAuth issuer identity, not base_url
* Apply ruff format to issuer identity tests
* Align ID-JAG audience docstring with issuer_url
* Make InMemoryOAuthProvider keyword-only like its parent
* Keep ID-JAG audience on base_url, out of scope for issuer identity
* Remove stray scratch script
* Make AuthorizationHandler keyword-only
* Bind ID-JAG audience to the issuer identifier
* Fix double slash in issuer_url well-known log hint
* Remove server-initiated sampling and roots from the server API
Deletes fastmcp/server/sampling/, Context.sample/sample_step/list_roots, and
FastMCP(sampling_handler=). The proxy's handshake-era relay now reaches the
front session through the SDK directly.
* Update tests for the removed sampling and roots server API
* Era-gate client.set_logging_level on modern connections
* Document that server-initiated sampling and roots are not in FastMCP 4
* Silence ty deprecation diagnostics and drop stale sampling doc mentions
* Baseline tools-call-sampling; fix removal leftovers flagged by ruff
* Document sampling handlers on both protocol routes; qualify log-level override
* Docs: sampling and roots work on modern via the guard pattern
The imperative ctx.sample()/ctx.list_roots() stay removed, but both
capabilities survive as input-required requests, as tests/conformance
exercises on 2026-07-28. Direct LLM calls remain the recommendation for
generation; roots has no round-trip-budget objection.
* Change register: record the guard route for sampling and roots
* Editorial pass on the sampling and roots docs
* Flag the sampling removal at the top of the page
* Restore the version badge and point sampling users at 3.x
* Keep the sampling conformance scenario live; fix roots example URIs
* Upgrade guide: staying on 3.x is an option for sampling servers
* Elicitation: state the era split once, not twice
Labels are bot-assigned from title/body/code; noting a "suggested" label
in the PR body was a leftover from an unrelated PR (#4392) and doesn't
match how this repo actually labels things.