unstale

pypi / fastmcp

fastmcp

What changed in fastmcp 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

97 breaking42 security9 deprecations55 new APIs and options5 performance17 behavior and defaults154 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

fastmcp 4167 changes

Breaking changes 25

  • Certifi-backed server dependencies and optional SDK integrations now require certifi 2026.10.19 or later following the eMudhra CA compromise.

    3.4.11, 4.1.3release notesrelease notes

  • FastMCP 4 uses system trust by default; developers may need to update operating-system, container, custom, and installer trust stores because upgrading FastMCP alone is insufficient.

    4.1.3release notes

  • Search rejects patterns over 1,000 characters and stops after about a second.

    4.1.1release notes

  • Non-Bearer Authorization schemes are treated as missing authentication.

    4.1.0release notes

  • Sessions now expire after the MCP SDK's 30-minute idle default instead of never.

    4.1.0release notes

  • CodeMode requires Monty 1.1, which renames max_duration_secs to max_feed_duration_secs.

    4.1.0release notes

  • Client IDs are now qualified by source, creating new ownership scopes for existing MultiAuth sessions and tasks. Finish pending tasks before upgrading.

    4.1.0release notes

  • Path parameters reject . and .. segments to prevent dot-segment issues.

    3.4.9, 4.1.0release notesrelease notes

  • Missing required OpenAPI path parameters now raise an error.

    4.1.0release notes

  • Prompts and resource templates now reject positional-only parameters.

    4.1.0release notes

  • Skill files must resolve inside their configured directories.

    4.1.0release notes

  • Missing and unexpected arguments are rejected at task submission.

    4.1.0release notes

  • Results returned after timeout deadlines are rejected.

    4.1.0release notes

  • The preview now requires a startup-URL session.

    3.4.8, 4.0.11release notesrelease notes

  • OAuthProxy revokes the upstream refresh token instead of sending its own token upstream.

    4.0.8release notes

  • OAuthProxy rejects self-contained ID-JAG tokens unless identity assertion is configured.

    4.0.4release notes

  • Unconstrained sequences no longer have an output schema inferred, preventing tools from sending images twice.

    4.0.3release notes

  • Proxies exclude Cookie from forwarded HTTP headers.

    4.0.0release notes

  • Elicitation works on handshake-era connections but raises on 2026-07-28 connections, which have no back-channel for server-initiated requests.

    3.0.0, 4.0.0upgrade guiderelease notes

  • FastMCP 3's deprecated APIs are gone.

    4.0.0release notes

  • on_message, on_request, and on_notification now observe every inbound message, including notifications and requests that fail before reaching a handler.

    3.0.0, 4.0.0upgrade guiderelease notes

  • Tool parameters that are positional-only are rejected.

    4.0.0release notes

  • Templated resource parameters are screened for path traversal by default.

    4.0.0release notes

  • Server-initiated roots are removed because no live connection exists for callbacks mid-request.

    4.0.0release notes

  • Server-initiated sampling is removed because no live connection exists for callbacks mid-request.

    4.0.0release notes

Security 18

  • Authorization now applies after component transforms, so transformed components are authorized before use.

    3.4.10, 4.1.2release notesrelease notes

  • OAuth client credentials can be bound to a configured issuer across fresh and cached-token flows. Users of ClientCredentialsOAuthProvider or PrivateKeyJWTOAuthProvider must set issuer to enable this protection.

    4.1.2release notes

  • Denied or disabled resources can no longer be served through matching templates.

    4.1.2release notes

  • CLI OAuth tokens are now persisted encrypted.

    4.1.0release notes

  • Client schema types are built with create_model and use bounded caches.

    3.4.8, 4.0.11release notesrelease notes

  • Component manager routes now use the server's auth provider.

    3.4.8, 4.0.11release notesrelease notes

  • Hashed tool lookups now apply transforms, enabled state, and auth.

    3.4.8, 4.0.11release notesrelease notes

  • Injected tools are now resolved through the server's tool lookup.

    3.4.8, 4.0.11release notesrelease notes

  • OpenAPI components send only declared arguments and retain configured headers.

    3.4.8, 4.0.11release notesrelease notes

  • $ref pointers are kept when inlining would produce an oversized schema.

    3.4.8, 4.0.11release notesrelease notes

  • Schema nesting is bounded before client type conversion.

    4.0.11release notes

  • Host/Origin protection settings now apply to the SSE transport.

    3.4.8, 4.0.11release notesrelease notes

  • Client CLI arguments are now passed literally to Windows .cmd wrappers.

    3.4.8, 4.0.11release notesrelease notes

  • Completion returns to its 4.0.5 behavior; the list-based visibility check is reverted because middleware simulation could let response caches serve hidden prompts to other clients.

    4.0.8release notes

  • Completion responses no longer include references the caller cannot list.

    4.0.6release notes

  • Google access tokens are kept out of request URLs.

    4.0.6release notes

  • GoogleTokenVerifier adds audience pinning.

    4.0.0release notes

  • Adds a provider-neutral role check for authorization.

    4.0.0release notes

Deprecations 4

  • A burst_capacity below 1 is deprecated.

    4.0.11release notes

  • Inferring stdio transport from a string is deprecated; pass a pathlib.Path for a script or build a StdioTransport.

    3.0.0, 4.0.0upgrade guiderelease notes

  • Use Path instead of a bare string when passing a local server file to Client.

    4.0.0release notes

  • MCP model fields are snake_case; old names have a warning compatibility bridge.

    4.0.0release notes

New APIs and options 27

  • Adds a foundation for the SEP-2640 Skills extension.

    4.1.2release notes

  • Adds experimental Skills discovery to SkillsDirectoryProvider.

    4.1.2release notes

  • Proxy HTTP header forwarding can be configured.

    4.1.0release notes

  • HTTP header forwarding by proxies is now configurable.

    4.1.0release notes

  • Token introspection audiences can now be configured.

    4.1.0release notes

  • GoogleTokenVerifier and GoogleProvider now support TokenCache.

    4.1.0release notes

  • Upload retention in memory can now be configured.

    4.1.0release notes

  • An experimental JevSearchTransform is added.

    4.0.6release notes

  • Support is added for anthropic 1.x alongside 0.x.

    4.0.4release notes

  • ClientGroup is importable from the package root, so integrations no longer need to couple to FastMCP's internal module layout.

    4.0.2release notes

  • AccessToken initialization now accepts a subject field.

    4.0.0release notes

  • Register extensions that provide a negotiated capability, additive request methods, tool-call interception, and a lifespan.

    4.0.0release notes

  • Prompt and resource-template inputs support argument completion, with already-supplied arguments visible to the handler.

    4.0.0release notes

  • Dependency injection can bind a dependency to an argument of the call it serves while keeping that argument out of the tool schema.

    4.0.0release notes

  • Adds machine-to-machine client authentication for agents and services.

    4.0.0release notes

  • Manages one client per server with collision-checked namespacing; each member negotiates its own protocol version.

    4.0.0release notes

  • Background tasks are shipped in the optional fastmcp-tasks package.

    4.0.0release notes

  • Adds identity assertion for agents and services; SEP-990 identity assertion is beta.

    4.0.0release notes

  • Tools can request input such as approval or a missing field, then rerun with the client's answers available on the context.

    4.0.0release notes

  • Adds a key-value store for distributed client response caching.

    4.0.0release notes

  • Adds a routable transport header so gateways can route without parsing JSON-RPC.

    4.0.0release notes

  • Servers can provide cache hints.

    4.0.0release notes

  • Client exposes era-neutral server metadata.

    4.0.0release notes

  • Set task=True on @mcp.tool to run a tool outside the request path using the tasks extension.

    4.0.0release notes

  • Adds a telemetry interoperability mode for FastMCP.

    4.0.0release notes

  • Adds a switch to turn telemetry off.

    4.0.0release notes

  • Adds a valid_scopes parameter to OIDC proxy valid scopes.

    4.0.0release notes

Performance 5

  • JWT verifiers share JWKS refreshes instead of fetching on every unknown key ID.

    3.4.9, 4.1.0release notesrelease notes

  • Each template retains its compiled URI pattern while the shared cache is bounded, preventing dynamic proxies from growing process memory without restoring the 4,096-template performance cliff.

    4.0.9release notes

  • Compiled resource template patterns are cached without a size limit, so servers with thousands of templates read fast again.

    4.0.8release notes

  • Compiled URI template patterns are cached, making template reads faster than in 4.0.5.

    4.0.7release notes

  • HTTP server startup is faster.

    4.0.0release notes

Behavior and default changes 10

  • The upstream token auth method now defaults to none when there is no client secret, fixing public-client OAuth authentication.

    4.1.3release notes

  • Tool search uses Pydantic's regex engine, which does not support lookarounds or backreferences.

    4.1.0release notes

  • Nested fields in detailed CodeMode schemas are named.

    4.0.6release notes

  • Discovery failures are exposed to callers.

    4.0.6release notes

  • Client(url) negotiates the best protocol version with the server.

    4.0.0release notes

  • The SDK session manager drives the FastMCP lifespan.

    4.0.0release notes

  • Authorization challenges can name missing scopes and support incremental authorization.

    4.0.0release notes

  • JWTVerifier supports EdDSA verification.

    4.0.0release notes

  • A single server now handles sessionless 2026-07-28 and earlier session-based protocol eras through SDK negotiation.

    3.0.0, 4.0.0upgrade guiderelease notes

  • Modern requests are self-contained, so any replica behind an ordinary load balancer can answer them.

    4.0.0release notes

Fixes and other changes 78

  • Ordinary requests now honor timeout settings in per-server MCP configuration.

    4.1.3release notes

  • Empty session visibility selections are now preserved.

    4.1.3release notes

  • A TimeoutError raised by a tool body's own code is no longer classified as the tool timeout.

    4.1.3release notes

  • Generator results from transform_fn are now materialized when run, fixing handling of generator transforms.

    4.1.3release notes

  • Preserves public metadata in built-in read contents.

    4.1.2release notes

  • Accepts ES256 and other RSA/EC algorithms for CIMD private_key_jwt assertions.

    4.1.2release notes

  • Uses the client timeout when resolving claimed results if no other timeout applies.

    4.1.2release notes

  • Fixes ctx.log() when extra contains names that are attributes of LogRecord.

    4.1.2release notes

  • The MCP-format inspect output follows pagination and escapes server metadata in its text summary.

    4.1.2release notes

  • Keeps fastmcp.json resolvable when deployment.cwd changes the working directory.

    4.1.2release notes

  • Data-backed File resources are named consistently with their MIME subtype.

    4.1.2release notes

  • Respects an explicit is_binary=False value.

    4.1.2release notes

  • FileUpload and session visibility are scoped to a stable client on MCP 2026-07-28.

    4.1.2release notes

  • Adds discovery of Goose Streamable HTTP extensions.

    4.1.2release notes

  • Reports an unbindable OAuth callback port instead of raising SystemExit.

    4.1.2release notes

  • The OAuth callback server no longer requires websockets.

    4.1.2release notes

  • Accepts private_key_jwt without a form client_id.

    4.1.2release notes

  • Python stdio child processes now run in UTF-8 mode.

    4.1.2release notes

  • Synchronous resource templates now run in the threadpool.

    4.1.2release notes

  • Preserves component metadata for list[ResourceContent] returns.

    4.1.2release notes

  • Valid schema defaults are hydrated while invalid defaults are preserved.

    4.1.2release notes

  • Preserves shared dependency scopes without optional task dependencies.

    4.1.2release notes

  • Treats non-string skill frontmatter descriptions as absent.

    4.1.2release notes

  • Raises ToolError when a tool with an output schema returns an unserializable value.

    4.1.2release notes

  • Preserves icons on transformed tools.

    4.1.2release notes

  • The CLI now honors an explicitly specified URL transport.

    4.1.2release notes

  • An unparseable proxy setting no longer aborts the update check.

    4.1.1release notes

  • Discovers linked skill folders again, including links outside the skills root; a skill's own files must still resolve inside the folder it links to.

    4.1.1release notes

  • The --skip-source flag is now forwarded to the uv run subprocess.

    4.1.0release notes

  • Upstream HTTP errors from OpenAPI tools are treated as HTTP status errors.

    4.1.0release notes

  • Full Python 3.15 support is restored.

    4.1.0release notes

  • The server advertises resource_metadata only when a route serves it.

    4.1.0release notes

  • Startup failures are raised instead of leaving the call hanging; cleanup also runs when startup exits early.

    4.1.0release notes

  • Cancelling a finished task preserves its finished status.

    4.1.0release notes

  • Synchronous and asynchronous generator iteration stays within the dependency lifetime or dispatched invocation.

    4.1.0release notes

  • Strict tool input is validated in JSON mode.

    4.1.0release notes

  • The default burst capacity is now at least 1, avoiding a capacity below the supported minimum.

    4.0.11release notes

  • The client now decodes empty structured content into CallToolResult.data.

    4.0.11release notes

  • The CLI now reads fastmcp.json config files as UTF-8.

    4.0.11release notes

  • Explicit Field(title=...) values are now kept on parameters in the input schema.

    4.0.11release notes

  • Image jpg, svg, and tif formats now map to their canonical MIME types.

    4.0.11release notes

  • The CLI now reads MCP and fastmcp.json config files as UTF-8.

    4.0.11release notes

  • Referenced body fields are retained when a request body schema adds sibling properties.

    4.0.11release notes

  • Calls to task-enabled tools through ctx.fastmcp.call_tool now return the tool result instead of an empty task receipt, including when tools are hidden behind search transforms or CodeMode.

    4.0.10release notes

  • The check runs only list-specific middleware hooks, so rate limits, logging, and metrics see a single request per completion again.

    4.0.7release notes

  • Binary resource contents are preserved in the response cache.

    4.0.6release notes

  • A Client releases its session hold before awaiting when its context exits, preventing session leaks on cancellation.

    4.0.6release notes

  • Data-backed file names are encoded.

    4.0.6release notes

  • DNS resolver order is preserved when resolved IP addresses are deduplicated.

    4.0.6release notes

  • Enums and defaults are rendered in get_schema.

    4.0.6release notes

  • Schemas accept integral floating-point length counts and counts larger than any real length instead of failing.

    4.0.6release notes

  • Resource templates now support exploded list query parameters and comma-joined non-exploded values.

    4.0.6release notes

  • Non-JSON schema defaults and enums are rendered in the markdown tool serializer.

    4.0.6release notes

  • OIDC discovery configuration is cached.

    4.0.6release notes

  • Model references in prefixItems are rewritten.

    4.0.6release notes

  • Template literals now match whether clients send them raw or percent-encoded.

    4.0.6release notes

  • String length and pattern constraints are retained when a format is set.

    4.0.6release notes

  • Strict declarations using Field(strict=True), StrictInt, or a strict model config are honored again for direct calls and task submission, preventing silent coercion.

    4.0.5release notes

  • OpenAPI dictionary request bodies are preserved.

    4.0.4release notes

  • Clients now follow empty pagination cursors in lists.

    4.0.4release notes

  • The local provider applies transforms in get_tasks.

    4.0.4release notes

  • JSON scalar request bodies are encoded.

    4.0.4release notes

  • The ordering of meta.fastmcp.versions is deterministic.

    4.0.4release notes

  • OpenAPI multipart string arrays are sent as repeated fields, fixing their default encoding.

    4.0.4release notes

  • OpenAPI query explode defaults are corrected.

    4.0.4release notes

  • Servers reject malformed pagination cursor offsets.

    4.0.4release notes

  • OpenAPI raw body content types are preserved.

    4.0.4release notes

  • Skills frontmatter is parsed with yaml.safe_load, falling back to the line parser.

    4.0.4release notes

  • Non-positive upstream token expiries are rejected.

    4.0.4release notes

  • OpenAPI whole-body arguments no longer clobber same-named HTTP parameters.

    4.0.4release notes

  • Unfinished Monty callbacks are cleaned up when execution ends.

    4.0.3release notes

  • Multi-server clients with legacy-only backends avoid unnecessary startup retries.

    4.0.3release notes

  • Task timing values are serialized in a way strict clients accept.

    4.0.3release notes

  • ClientGroup now reuses existing connections when entered from a nested block or concurrent task, matching Client reentrancy.

    4.0.1release notes

  • Fixed proxy forwarding of MCP transport headers, so proxied requests preserve those headers.

    4.0.0release notes

  • OpenAPI discriminator subtypes are flattened into request bodies.

    4.0.0release notes

  • Response caching now handles empty list results and does not cache errors; component metadata and versioned-component partitioning are also addressed.

    4.0.0release notes

  • Middleware response limits are aligned with output schemas.

    4.0.0release notes

fastmcp 3207 changes

Breaking changes 72

  • Denied concrete resources are no longer served by matching templates.

    3.4.10release notes

  • A skill's SKILL.md must stay inside its skill folder.

    3.4.9release notes

  • OAuth metadata and JWKS fetches can use a mandated corporate proxy while preserving custom CA certificates; fetches are refused when no proxy is configured rather than sent directly.

    3.4.6release notes

  • Invalid tool arguments now raise fastmcp.ValidationError.

    3.4.3release notes

  • Rejects unsafe redirect schemes and unregistered DCR redirect URIs.

    3.4.3release notes

  • Adds an explicit >=1.0.1 dependency floor so installs cannot resolve to versions affected by CVE-2026-48710.

    3.4.1release notes

  • Caps tool calls at 50 per execute block by default; max_tool_calls=None opts out.

    3.4.0release notes

  • Proxies forward initialize upstream, so the downstream handshake succeeds only after the upstream server initializes and upstream failures are surfaced.

    3.4.0release notes

  • When constructed without limits, the provider now applies a 30-second duration and 100 MB memory baseline; limits=None opts out.

    3.4.0release notes

  • Rejects dot-segment paths that could otherwise bypass prefix checks.

    3.3.0release notes

  • Removes configurable deduplication from AggregateProvider; it always warns.

    3.2.4release notes

  • Background tasks are scoped to the authorization context rather than the MCP session, so they survive session churn and remain tied to the user who started them.

    3.2.4release notes

  • Raises on unhandled content types in sampling handler dispatch chains.

    3.2.4release notes

  • Google uses the user ID claim sub for client_id instead of aud.

    3.2.1release notes

  • CSP was removed from tool metadata and retained only on resources.

    3.2.1release notes

  • Removed; use add_transform with ToolTransform.

    3.0.0upgrade guide

  • Replace this removed server API with create_proxy.

    3.0.0upgrade guide

  • call_tool no longer accepts task=True; it transparently polls tasked calls to completion and returns their result.

    3.0.0upgrade guide

  • Replace client-side call_tool(..., task=True) with plain call_tool or call_tool_task.

    3.0.0upgrade guide

  • Use call_tool_task instead of passing task=True to client-side call_tool.

    3.0.0upgrade guide

  • Client now defaults to mode="auto"; use mode="legacy" for servers relying on on_initialize, per-session state, or ctx.elicit().

    3.0.0upgrade guide

  • Raises on 2026-07-28 sessionless connections because logging/setLevel requires session state.

    3.0.0upgrade guide

  • ctx.list_roots was removed; ask for roots through the guard pattern or take file paths as tool arguments.

    3.0.0upgrade guide

  • ctx.sample was removed; call an LLM directly from the server for generation.

    3.0.0upgrade guide

  • Use create_proxy in place of the removed as_proxy server API.

    3.0.0upgrade guide

  • Server calls must provide response_type; omitting it or passing None raises TypeError.

    3.0.0upgrade guide

  • ctx.elicit raises on modern connections, which the default client now negotiates; rewrite the tool, branch on protocol version, or use legacy client mode.

    3.0.0upgrade guide

  • Removed from Context; take paths as tool arguments or ask via the guard pattern.

    3.0.0upgrade guide

  • Removed from Context; call an LLM server-side or use the guard pattern when the caller's model is needed.

    3.0.0upgrade guide

  • State no longer persists across calls on sessionless connections because each request uses a fresh connection.

    3.0.0upgrade guide

  • CurrentDocket moved to fastmcp_tasks.dependencies.

    3.0.0upgrade guide

  • CurrentWorker moved to fastmcp_tasks.dependencies.

    3.0.0upgrade guide

  • The setting and its object mode were removed; decorators always return the original function with metadata attached.

    3.0.0upgrade guide

  • The tool exclude_args parameter was removed; use Depends() instead.

    3.0.0upgrade guide

  • Removed; hide a parameter from the tool schema by injecting it with a Depends(factory) default.

    3.0.0upgrade guide

  • The environment variable setting decorator mode was removed.

    3.0.0upgrade guide

  • The sampling_handler argument was removed; passing it raises TypeError naming the migration.

    3.0.0upgrade guide

  • The sampling_handler_behavior argument was removed.

    3.0.0upgrade guide

  • The sampling_handler constructor parameter was removed.

    3.0.0upgrade guide

  • Removed; use create_proxy from fastmcp.server, passing the target as the first positional argument.

    3.0.0upgrade guide

  • Imports from this module were removed; update imports to the supported locations.

    3.0.0upgrade guide

  • This component shim was removed; update imports to the supported locations.

    3.0.0upgrade guide

  • TaskConfig moved to this module; update its import.

    3.0.0upgrade guide

  • Use httpx2 in place of httpx for exception handling and custom HTTP client integrations handed to FastMCP.

    3.0.0upgrade guide

  • Removed; mount is a live composition rather than a one-time snapshot, so register components directly on the parent if you need frozen-copy behavior.

    3.0.0upgrade guide

  • Replace this removed server API with mount.

    3.0.0upgrade guide

  • When different from base_url, issuer_url now supplies OAuth metadata issuer and minted token and authorization-response iss claims; existing clients may need one-time re-authorization.

    3.0.0upgrade guide

  • Construct McpError with code and message keywords instead of positional ErrorData; catching it is unchanged.

    3.0.0upgrade guide

  • Middleware now sees notifications and unroutable requests, so guard middleware that assumes routed requests.

    3.0.0upgrade guide

  • A direct mount composes the child in-process, and the child's lifespan and middleware now run.

    3.0.0upgrade guide

  • The as_proxy keyword was removed; wrap the child with create_proxy and mount the proxy to retain the MCP-client execution boundary.

    3.0.0upgrade guide

  • Use namespace instead of the removed prefix keyword when calling mount.

    3.0.0upgrade guide

  • The prefix keyword was removed; use namespace instead.

    3.0.0upgrade guide

  • The mount prefix keyword was replaced by namespace.

    3.0.0upgrade guide

  • Use mount in place of the removed import_server server API.

    3.0.0upgrade guide

  • Clients need one-time re-authorization when OAuthProxy or derived providers mint tokens with issuer_url different from base_url.

    3.0.0upgrade guide

  • FastMCP.remove_tool was removed; use local_provider.remove_tool, which raises KeyError rather than NotFoundError for a missing tool.

    3.0.0upgrade guide

  • Removed; it was a no-op. Hide tools with disable instead.

    3.0.0upgrade guide

  • Clients matching the old -32002 resource-not-found code need to be updated.

    3.0.0upgrade guide

  • The core missing-resource wire error code changed from -32002 to -32602; clients matching the numeric code must update.

    3.0.0upgrade guide

  • Templated resource parameter values are screened for traversal, absolute paths, and null bytes before handlers run; exempt legitimate parameters with ResourceSecurity.

    3.0.0upgrade guide

  • This FastMCP setting was removed.

    3.0.0upgrade guide

  • The tool serializer parameter was removed; return a ToolResult instead.

    3.0.0upgrade guide

  • The tool serializer parameter was removed from tool decorators and constructors; return a ToolResult for control over serialization.

    3.0.0upgrade guide

  • The sse_read_timeout parameter was removed; set the timeout through Client or use a custom httpx_client_factory for finer control.

    3.0.0upgrade guide

  • The sse_read_timeout parameter was removed from StreamableHttpTransport.

    3.0.0upgrade guide

  • Drop task= from resource and prompt decorators.

    3.0.0upgrade guide

  • The task keyword is now tool-only; passing it to resource, resource-template, or prompt decorators raises TypeError.

    3.0.0upgrade guide

  • TaskConfig moved from fastmcp.server.tasks to fastmcp.utilities.tasks.

    3.0.0upgrade guide

  • Background tasks are provided by a registered extension; install the tasks extra and register TasksExtension or task-enabled tools fail at startup.

    3.0.0upgrade guide

  • Register TasksExtension with mcp.add_extension for a task=True tool or the server will not start.

    3.0.0upgrade guide

  • Templated resources that legitimately accept .. or absolute paths are exempted from the changed path behavior.

    3.0.0upgrade guide

Security 19

  • Regex tool search is bounded in time and pattern length.

    3.4.9release notes

  • Schemas are inlined when their pointers pass through alias definitions.

    3.4.8release notes

  • CIMD cache growth is bounded.

    3.4.8release notes

  • Auth challenges now include resource metadata.

    3.4.8release notes

  • Cookie is excluded from forwarded HTTP headers.

    3.4.8release notes

  • Resource paths reject unsafe parameter values.

    3.4.3release notes

  • NAT64, 6to4, Teredo, and ISATAP transition addresses can no longer bypass the SSRF allow-list to reach private IPv4 targets.

    3.4.3release notes

  • Validates Host and Origin before session handling to block DNS rebinding against localhost-bound servers.

    3.4.3release notes

  • Guards silent consent against AS-in-the-middle attacks so a malicious authorization server cannot silently approve consent it was not meant to handle.

    3.3.0release notes

  • Partitions cached responses by access token, closing a gap where different users could see each other's cached responses.

    3.3.0release notes

  • AuthKit automatically binds the token audience to the resource URL per RFC 8707, closing a token-reuse gap across MCP resources.

    3.2.4release notes

  • Validates the actual decoded base64 data size instead of trusting the client-reported size.

    3.2.4release notes

  • The proxy client no longer forwards inbound HTTP headers to unrelated remote servers, preventing headers intended for one server from leaking to another.

    3.2.4release notes

  • Azure validation now uses identifier_uri as the expected audience for Entra v2.0 tokens.

    3.2.1release notes

  • Consent cookies are now capped as an LRU to prevent unbounded growth and reverse proxy header overflow.

    3.2.1release notes

  • FastMCP has a Command Injection vulnerability - Gemini CLI

    3.2.0security advisory

  • FastMCP: Missing Consent Verification in OAuth Proxy Callback Facilitates Confused Deputy Vulnerabilities

    3.2.0security advisory

  • FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability

    3.2.0security advisory

  • Added a server-wide resource_security default for templated resource path screening.

    3.0.0upgrade guide

Deprecations 5

  • Calling ctx.elicit() without response_type is deprecated and emits a warning.

    3.2.4release notes

  • CamelCase reads still work but warn and are planned for removal; migrate reads to snake_case.

    3.0.0upgrade guide

  • Ordinary client logging through ctx.info emits an SDK-level MCPDeprecationWarning, but continues to work.

    3.0.0upgrade guide

  • Set FASTMCP_MCP_CAMELCASE_COMPAT=false to make remaining camelCase reads raise AttributeError before the compatibility shims are removed.

    3.0.0upgrade guide

  • Set mcp_camelcase_compat = False to make remaining camelCase reads raise AttributeError before the compatibility shims are removed.

    3.0.0upgrade guide

New APIs and options 28

  • Adds Hugging Face OAuth provider support for public and private apps, PKCE, Dynamic Client Registration, and CIMD.

    3.4.4release notes

  • Adds a remote command flag for TLS certificate verification.

    3.4.3release notes

  • Sets the FastMCP-issued token lifetime independently of the upstream token lifetime; without an upstream refresh token, the lifetime is capped to match.

    3.4.0release notes

  • Adds the --host option to the dev CLI.

    3.4.0release notes

  • Adds the --log-panel option to the dev CLI.

    3.4.0release notes

  • Adds the --no-log-panel option to the dev CLI.

    3.4.0release notes

  • A standalone bridge connects stdio-only MCP hosts to servers hosted over HTTP, with automatic OAuth for HTTPS and support for bearer tokens and custom headers.

    3.4.0release notes

  • Adds spans covering the sampling step and tool execution.

    3.4.0release notes

  • FastMCP can now use pre-bound HTTP sockets.

    3.4.0release notes

  • Treats tokens as expired a configured number of seconds early to close refresh races.

    3.4.0release notes

  • ToolResult accepts is_error to return a structured error result through CallToolResult.isError instead of raising and losing structured content.

    3.4.0release notes

  • The OAuth server metadata endpoint now also answers at this alias.

    3.4.0release notes

  • Adds the extra_authorize_params option to WorkOSProvider.

    3.4.0release notes

  • Adds the valid_scopes option to WorkOSProvider.

    3.4.0release notes

  • Adds first-class support for Azure AD B2C user flows.

    3.3.0release notes

  • The constructor accepts raw capability flags through experimental_capabilities.

    3.3.0release notes

  • A dependency-light distribution ships the client and transport layer without the server stack, for client-only installs.

    3.3.0release notes

  • Supports a default prefill value.

    3.3.0release notes

  • Adds a public API to update the proxy's required scopes after initialization, including when scope requirements are determined at runtime.

    3.3.0release notes

  • Instrumentation complies with MCP semantic conventions, instruments list operations, and enriches delegate spans on proxy servers with backend attributes.

    3.3.0release notes

  • Lets sync tools opt out of the default thread-pool execution when they hold thread-local state or are bound to a specific thread.

    3.3.0release notes

  • Tool errors accept a log_level parameter to control how they're logged.

    3.3.0release notes

  • Adds response_description to ctx.elicit().

    3.2.4release notes

  • Adds response_title to ctx.elicit().

    3.2.4release notes

  • Adds a Keycloak OAuth provider for enterprise authentication and local development.

    3.2.4release notes

  • Auth providers can override protected resource base URLs.

    3.2.4release notes

  • Added as the client API for immediately obtaining a task handle when a caller wants to monitor or cancel background work.

    3.0.0upgrade guide

  • Importing fastmcp_tasks anywhere in the process enables client task support and makes Client advertise the capability.

    3.0.0upgrade guide

Behavior and default changes 7

  • Logs refresh-token cache misses instead of failing silently, making these events visible to developers.

    3.4.1release notes

  • The proxy now forwards ping requests upstream.

    3.4.0release notes

  • Hoists $defs introduced by ArgTransform to the schema root.

    3.3.0release notes

  • Active HTTP transports are terminated before lifespan shutdown.

    3.3.0release notes

  • Parameter descriptions are extracted automatically from docstrings, so tool signatures can document their parameters.

    3.2.4release notes

  • Client now defaults to mode="auto", negotiating the newest protocol shared with the server.

    3.0.0upgrade guide

  • Runs on session-based connections but never runs on the sessionless protocol, which has no initialize handshake.

    3.0.0upgrade guide

Fixes and other changes 76

  • Update custom, system, and installer trust stores too; upgrading FastMCP alone is insufficient.

    3.4.11release notes

  • Restores CIMD private_key_jwt authentication for OAuthProxy deployments at a bare origin by validating client assertions against the exact token endpoint advertised in authorization server metadata.

    3.4.7release notes

  • Fixes Azure scope fallback.

    3.4.5release notes

  • No longer mutates the caller's schema.

    3.4.5release notes

  • Serializes deep object query parameters.

    3.4.5release notes

  • Unsupported keys in a JWKS no longer cause JWTVerifier to reject every token, including tokens correctly signed by supported keys in the same set.

    3.4.5release notes

  • Makes transformed tool required order deterministic.

    3.4.5release notes

  • Restores acceptance of traffic that worked before the 3.4.3 Host/Origin guard change; deployments can still opt in to the guard with explicit trusted hosts and origins.

    3.4.4release notes

  • Fixes a TypeError on cache misses caused by a mismatched call_next parameter.

    3.4.3release notes

  • Preserves required discriminator tags during schema conversion.

    3.4.3release notes

  • Rejects empty environment variable keys.

    3.4.3release notes

  • Async rate-limiting middleware callbacks are handled correctly.

    3.4.3release notes

  • Forwards identity-provider authentication errors to the MCP client instead of displaying an HTML error page.

    3.4.3release notes

  • Guards against recursive references during JSON schema conversion.

    3.4.3release notes

  • Bounds the default discovery timeout and exposes it on provider wrappers.

    3.4.3release notes

  • Round-trips path values containing reserved characters.

    3.4.3release notes

  • Tool result serialization now honors this setting.

    3.4.3release notes

  • No longer causes KeyError during session teardown.

    3.4.3release notes

  • Arguments are validated against declared types.

    3.4.3release notes

  • Private, non-critical JWS header parameters are accepted during JWT validation, while unsupported critical headers remain rejected.

    3.4.2release notes

  • Azure scopes echoed back to MCP clients are now unprefixed.

    3.4.0release notes

  • MCP config files are now read as UTF-8.

    3.4.0release notes

  • Resources created from templates now preserve annotations, meta, title, and icons.

    3.4.0release notes

  • Resource templates with query parameters now work on proxied servers.

    3.4.0release notes

  • The stateless flag is now forwarded in the uv run path.

    3.4.0release notes

  • Component imports no longer reach auth and task primitives through fastmcp.server, avoiding server/provider stack loading and circular imports; existing server-facing imports remain compatible.

    3.3.1release notes

  • Falls back gracefully for unsupported regex patterns.

    3.3.0release notes

  • Plain mcp.tool app-only tools are no longer completely hidden.

    3.3.0release notes

  • Mounted servers enter their own lifespan so startup and shutdown logic works when composed into a larger server.

    3.3.0release notes

  • Honors the upstream refresh token expiry.

    3.3.0release notes

  • Fixes the OCI provider for 3.x installs.

    3.3.0release notes

  • Preserves blank query string values in OpenAPI routing.

    3.3.0release notes

  • Multipart and form-urlencoded requests are no longer sent as JSON.

    3.3.0release notes

  • Exits cleanly when the session stream closes.

    3.3.0release notes

  • No longer crashes on non-TextContent error responses.

    3.3.0release notes

  • Fixes raise_on_error handling for tool tasks.

    3.3.0release notes

  • Resource template parameter names can contain hyphens.

    3.3.0release notes

  • Sampling from background tasks works correctly.

    3.3.0release notes

  • Self-mounting is rejected to prevent infinite recursion.

    3.3.0release notes

  • Allows an upstream client ID to be used directly without DCR.

    3.3.0release notes

  • Windows startup no longer crashes on non-UTF-8 console output.

    3.3.0release notes

  • CIMD clients receive valid_scopes instead of required_scopes.

    3.2.4release notes

  • Hardens cleanup when clients disconnect forcibly.

    3.2.4release notes

  • Fixes state handling in Client.new().

    3.2.4release notes

  • Fixes scalar returns from elicitation.

    3.2.4release notes

  • Retries when an LLM returns text instead of calling final_response.

    3.2.4release notes

  • Caps consecutive final_response validation retries.

    3.2.4release notes

  • Strips title fields from tool schemas that Gemini 2.5 Flash rejects.

    3.2.4release notes

  • No longer leaks thought parts and provides more helpful errors on empty responses.

    3.2.4release notes

  • HTTP kwargs are no longer passed when the transport is unspecified.

    3.2.4release notes

  • Handles Python keywords, boolean schemas, empty enums, and name collisions without crashing.

    3.2.4release notes

  • Fixes list[dict] return types producing Root() instead of dictionaries.

    3.2.4release notes

  • Fixes prompt errors.

    3.2.4release notes

  • Fixes resource auto-serialization.

    3.2.4release notes

  • Fixes wildcard resource template parameters in mounted servers.

    3.2.4release notes

  • Materializes generators before converting results and handles bytes gracefully.

    3.2.4release notes

  • Fixes RetryMiddleware so it retries tool errors.

    3.2.4release notes

  • Fixes task.wait() hanging indefinitely when a task enters input_required.

    3.2.4release notes

  • Prevents pydantic 2.13 from leaking the _WrappedResult docstring into tool output schemas.

    3.2.4release notes

  • Fixes crashes with synchronous functions and prevents schema mutation.

    3.2.4release notes

  • Pins fakeredis below 2.35.0 in the tasks extra as a stopgap for an ImportError that caused installs to fail at startup.

    3.2.3release notes

  • Azure audience validation now accepts both client_id and identifier_uri, covering default Azure AD v2 tokens and custom Application ID URIs.

    3.2.2release notes

  • allowed_client_redirect_uris on OAuthProxy can now be changed.

    3.2.1release notes

  • Proxy timeouts were added and networking in apps dev was modernized.

    3.2.1release notes

  • The deprecated fallback was removed so asyncio.iscoroutinefunction no longer emits deprecation warnings on Python 3.14.

    3.2.1release notes

  • Background task context forwarding was unified and concurrent dependency bugs were fixed.

    3.2.1release notes

  • Boolean property schemas in JSON Schema parsing were fixed.

    3.2.1release notes

  • The client no longer crashes on error responses with empty or non-text content from third-party servers.

    3.2.1release notes

  • Cognito access tokens are now validated using client_id instead of the absent aud claim.

    3.2.1release notes

  • FastAPI TestClient compatibility and lifespan re-initialization were fixed.

    3.2.1release notes

  • JWT expiration validation now uses explicit None checks.

    3.2.1release notes

  • OpenAPI 3.0 nullable fields in tool input schemas are converted to JSON Schema's type array instead of leaking nullable: true.

    3.2.1release notes

  • Form submissions now preserve unchecked boolean checkbox values.

    3.2.1release notes

  • ResponseLimitingMiddleware no longer breaks tools with outputSchema.

    3.2.1release notes

  • Server variable templates in OpenAPI base URLs are now substituted with their defaults.

    3.2.1release notes

  • upstream_claims is now propagated in load_access_token.

    3.2.1release notes

fastmcp 25 changes

Security 5

  • FastMCP OAuth Proxy token reuse across MCP servers

    2.14.2security advisory

  • FastMCP updated to MCP 1.23+ due to CVE-2025-66416

    2.14.0security advisory

  • FastMCP Auth Integration Allows for Confused Deputy Account Takeover

    2.13.0security advisory

  • FastMCP vulnerable to reflected XSS in client's callback page

    2.13.0security advisory

  • FastMCP vulnerable to windows command injection in FastMCP Cursor installer via server_name

    2.13.0security advisory