pypi / fastmcp-slim
fastmcp-slim
What changed in fastmcp-slim 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
132 breaking43 security12 deprecations63 new APIs and options7 performance31 behavior and defaults171 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initfastmcp-slim 4235 changes
Breaking changes 32
JWTs with an nbf time in the future are rejected.
Remembered consent is now tracked per redirect URI and scope set; users in remember mode are asked for consent once more per client after upgrading.
Client and server extras now require a patched Authlib.
FastMCP now requires patched joserfc.
The resource-era list_skills helper is renamed list_skill_summaries.
Strict input validation now rejects OpenAPI tool arguments that are not declared.
Python 3.11 or newer is now required.
Skill is now a storage-neutral authoring value with a name, description, instructions, and files; it can be built in code or loaded from a directory or package.
Certifi-backed server dependencies and optional SDK integrations now require certifi 2026.10.19 or later following the eMudhra CA compromise.
A tool with an output schema now raises ToolError when it returns an unserializable value.
Search now rejects patterns over 1,000 characters and stops after about a second.
Non-Bearer Authorization schemes are treated as missing authentication.
CodeMode requires Monty 1.1, where
max_duration_secsis renamed tomax_feed_duration_secs.HTTP sessions now expire after the MCP SDK's 30-minute idle default instead of never.
Client identities are now qualified by source, creating new ownership scopes for existing sessions and tasks; finish pending tasks before upgrading.
OpenAPI path parameters reject
.and..segments.A required path parameter that is missing now raises an error.
Positional-only parameters are rejected.
Skill files must resolve inside their configured directories.
Missing and unexpected arguments are rejected when submitting tasks.
The dev apps preview now requires a startup-URL session.
A cancelled task can no longer stop the worker.
Rejects ID-JAG tokens unless identity assertion is configured.
Multipart string-array values are encoded as repeated fields instead of using the previous default encoding.
Calls raise on modern connections, which is what a default client now negotiates; use a guard tool, branch on protocol version, or keep clients in legacy mode.
ctx.sample is deprecated; push features are unavailable on 2026 connections.
Deprecated FastMCP 3 APIs and compatibility shims have been removed.
Cookie is excluded from forwarded HTTP headers.
on_message, on_request, and on_notification now observe every inbound message, including notifications and requests that fail before reaching a handler. Guard on message type if needed.
Tool definitions with positional-only parameters are rejected.
Server-initiated sampling and roots were removed because there is no live connection to call back into mid-request.
Background tasks are provided by the io.modelcontextprotocol/tasks extension in a separate package. Install the tasks extra and register TasksExtension or task-enabled tools cause startup failure.
Security 29
OAuth pre-registered clients can be bound to their issuer.
Provider required scopes are preserved when a custom token verifier is passed.
Generated SKILL.md invocations quote tool names.
Upstream claims are refreshed when the OAuth proxy transparently refreshes.
Authorization now covers hashed app-tool names and synthesized Prefab resources.
Read a skill with the FastMCP client; the method verifies every file's size and digest.
Reading skill content verifies that its advertised frontmatter matches.
Completion no longer suggests values for prompts or templates that a caller cannot see.
Skill limits are checked before directory and remote files are read.
Skills pass through proxies when skills=True; they also namespace under mounts, list across ClientGroup, and respect AuthMiddleware.
FastMCP 4 uses system trust by default; update operating-system, container, custom, and installer trust stores because upgrading FastMCP alone is insufficient.
Set issuer to bind OAuth client credentials to a configured issuer across fresh and cached-token flows; upgrading alone does not enable this protection.
Authorization now applies after component transforms, so transformed components are checked before being served.
Denied resources no longer fall through to matching templates, preventing disabled resources from being served.
CLI OAuth tokens are now persisted in encrypted form.
Component manager routes now use the server's auth provider.
Hashed tool lookups now apply transforms, enabled state, and auth.
Injected tools are now resolved through the server's tool lookup.
OpenAPI components send only declared arguments and retain configured headers.
Schema inlining keeps $ref pointers when inlining would produce an oversized schema.
Host and Origin protection settings now apply to the SSE transport.
Client CLI arguments are passed literally to Windows .cmd wrappers.
Completion returns to its 4.0.5 behavior, reverting the list-based visibility check that could let a response cache serve hidden prompts to other clients.
OAuthProxy revokes the upstream refresh token instead of sending its own token upstream.
Completion answers only reference prompts and templates the caller can list.
Google access tokens are kept out of request URLs.
Client data is kept out of tool validation warnings.
Non-positive upstream token expiries are rejected.
Templated resource parameters are screened for path traversal by default.
Deprecations 6
The 4.1 skills API, including the old providers in this module, is deprecated and will be removed in 4.3; the old providers still work and warn with their replacements.
The 4.1 skills API, including helpers in this module, is deprecated and will be removed in 4.3; the old helpers still work and warn with their replacements.
The wire model formerly named Skill is now named MCPSkill; the old import remains available until 4.3.
A burst_capacity below 1 is deprecated.
Passing a bare string path to Client to infer a stdio transport is deprecated and warns; use Path(...) or StdioTransport, as the behavior is removed in FastMCP 5.
MCP model fields are now snake_case; old names have a warning compatibility bridge.
New APIs and options 37
Dependencies can be declared in an Annotated parameter while preserving the parameter's real type.
The TTL for background task execution is now configurable.
A dependency can own the tool argument it reads through CallArgument.
List skills across servers in a client group.
FastMCP dev apps now support the npm_config_registry override.
Add --skills to fastmcp list to discover skills.
Add KeystoneTokenVerifier for authentication.
Load a skill from a directory.
Load a skill from a package.
Clients can read skills and their files as ordinary resources using skill URIs.
Serve skills on a server through SkillCatalogProvider; skills are exposed as ordinary resources and can be discovered through the Skills extension.
Serve skills without loading their files.
Serve skills stored in object storage or a database, reading files on client request.
Servers expose skills/list to clients that support the experimental Skills extension, with a hashed manifest per skill.
Serve skills from a directory on a server, exposing them as ordinary resources and supporting discovery through the Skills extension.
Install a skill into an agent's skills folder.
Adds a foundation for the SEP-2640 Skills extension.
Adds experimental Skills discovery to SkillsDirectoryProvider.
HTTP header forwarding by proxies is now configurable.
Token introspection audiences can now be configured.
GoogleTokenVerifier and GoogleProvider now support TokenCache.
Retention of uploads in memory can now be configured.
An experimental JevSearchTransform is available.
ClientGroup is importable from the package root with the same lazy export and install hint as Client, so integrations no longer need to depend on FastMCP's internal module layout.
Extensions can register a negotiated capability, additive request methods, tool-call interception, and a lifespan.
Servers can answer argument-completion requests for prompt and resource-template inputs, with already-supplied arguments visible to the handler.
Dependency injection can bind a dependency to arguments of the call it serves while keeping the bound argument out of the tool schema.
Adds machine-to-machine client authentication.
Manages one client per server with collision-checked namespacing, while each member negotiates its own protocol version.
Adds server-side identity assertion support for agents and services using SEP-990.
Authorization challenges include the scopes needed for incremental authorization.
Tools can request input such as approval or a missing field, then rerun with the client's answers available on the context.
Adds a routable transport header so gateways can route requests without parsing JSON-RPC.
The task=True option runs tools as background tasks through the optional fastmcp-tasks package.
OAuthProxy adds RFC 9207 issuer responses.
Adds a provider-neutral role-checking authentication API.
Adds server-level cache hints for infrastructure integrations.
Performance 7
Forwarded authorization server metadata is cached.
JWT verifiers share JWKS refreshes instead of fetching on every unknown key ID.
Every compiled resource template pattern is cached without a size limit, so servers with thousands of templates read fast again.
Compiled URI template patterns are cached, making resource template reads faster.
Multi-server clients with legacy-only backends avoid unnecessary startup retries.
Lightweight imports avoid loading MCP and CLI stacks.
HTTP server startup is faster.
Behavior and default changes 12
Background task logging is allowed even when there is no session.
Colon-terminated prose lines are retained in tool descriptions generated from docstrings.
The command bypasses proxy environment variables when listing tools.
Telemetry spans now report JSON-RPC error codes and request ids, making request failures easier to identify.
Templated MCPMixin resources are registered as resource templates.
The default burst capacity is now at least 1.
Detailed CodeMode schemas name nested fields.
FileSystemProvider discovery failures are exposed.
Supports anthropic 1.x alongside 0.x.
CallArgument resolution is supported for background tasks.
The default mode is auto, negotiating the newest protocol both sides share. Against a FastMCP server this is the sessionless 2026-07-28 era; use mode="legacy" for session-based behavior.
JWTVerifier supports EdDSA verification.
Fixes and other changes 112
Middleware edits to a returned CallToolResult are kept.
Template parameters are coerced from resolved hints.
Structured content is preserved on bulk tool results.
The server advertises the MCP Apps extension only when it serves an app.
A missing required argument now returns invalid params.
Skill listing follows empty pagination cursors so additional pages are not skipped.
The SSE endpoint no longer sends a second response after its stream.
A timeout that fires before a synchronous tool's thread starts is accepted.
Object schemas without a type now retain additionalProperties during hydration.
Apps development log retention is now bounded.
Async-generator tools can now run as background tasks.
Failed authorization forms are no longer reread.
The whole body is sent when a body $ref with siblings cannot be flattened.
The client timeout no longer caps the HTTP read timeout.
Code Mode search limits are honored after BM25 ranking.
The proxy now receives the transport so it can forward server-initiated requests.
Filesystem component construction failures are isolated.
GitHub sessions are preserved across transient verification failures.
Schema hydration now handles mutually recursive types.
A caller-provided OAuth httpx client factory is preserved when verify is set.
Revocation ownership is kept separate from user identity so revocation works for the client that owns the token.
PingMiddleware no longer errors when the client has no back-channel.
Postponed annotations are resolved when prompts are rendered.
Prompt argument titles are carried through PromptArgument and proxies.
OpenAPI resource templates with non-identifier path parameters are now readable.
Proxies relay the client's sampling result unchanged.
The CLI now forwards path, stateless, and log-level settings to SDK MCPServer servers.
Log levels for sessionless clients are stored on the connection.
Single-server tool transforms are applied before tag filters.
Mutable defaults are isolated between transformed tool calls.
OpenAPI hydration now handles wrapped non-object responses when validate_output=False.
Per-server MCP config timeouts are honored for ordinary requests.
Empty session visibility selections are preserved instead of being lost.
A TimeoutError raised by a tool body's own code is no longer classified as the tool timeout.
Generator results from transform_fn are materialized when run, fixing generator transforms.
The upstream token auth method now defaults to none when there is no client secret, fixing public-client OAuth authentication.
CIMD private_key_jwt assertions now accept ES256 and other RSA/EC algorithms.
Falls back to the client timeout when resolving claimed results.
Fixes ctx.log() failures when extra contains names of LogRecord attributes.
The MCP format of fastmcp inspect now follows pagination.
Keeps fastmcp.json resolvable when deployment.cwd changes the working directory.
Data-backed File resources are named consistently with their MIME subtype.
An explicit is_binary=False is now respected.
FileUpload and session visibility are scoped to a stable client on MCP 2026-07-28.
Adds discovery of Goose Streamable HTTP extensions.
An unbindable OAuth callback port is reported instead of causing SystemExit.
The OAuth callback server no longer requires websockets.
Accepts private_key_jwt without a form client_id.
Python stdio child processes now run in UTF-8 mode.
Built-in read contents preserve public metadata.
Component metadata is preserved for list[ResourceContent] returns.
Valid schema defaults are hydrated while invalid defaults are preserved.
Non-string skill frontmatter descriptions are treated as absent.
Icons are preserved on transformed tools.
The CLI now honors an explicitly selected URL transport.
An unparseable proxy setting no longer aborts the update check.
Discovers skill folders that are links again, including links outside the skills root; a skill's own files must still resolve inside the linked folder.
Relative URLs are resolved against the server origin.
Output schemas are found across all tools/list pages.
Responses to dict and nested-list elicitation choices are now validated.
The --skip-source option is now forwarded to the uv run subprocess.
The stdio transport now advertises the same list_changed capabilities as other transports.
Upstream HTTP errors are treated as HTTP status errors.
Full Python 3.15 support is restored.
Tool search uses Pydantic's regex engine, which does not support lookarounds or backreferences.
The server advertises resource_metadata only when a route actually serves it.
Startup failures are raised instead of leaving the caller hanging.
Strict tool input is validated in JSON mode.
Cancelling a finished task no longer changes its status.
Tool results returned after timeout deadlines are rejected.
get_tool, get_resource, and get_prompt now respect include_unversioned=False.
writeOnly properties are omitted from OpenAPI tool output schemas.
The client now decodes empty structured content into CallToolResult.data.
Explicit Field(title=...) values on tool parameters are retained in the input schema.
Image jpg, svg, and tif formats now map to canonical MIME types.
The CLI now reads MCP and fastmcp.json config files as UTF-8.
Runtime tracking for mounted extensions is fixed.
Referenced body fields are retained when a request body schema adds sibling properties.
Calls to task-enabled tools from another tool run in the foreground and return the result instead of an empty task receipt.
The destructor tolerates a transport whose construction failed.
Task-enabled tools are registered with the task backend even when hidden by search transforms or CodeMode, allowing them to work behind those features.
Each template retains its compiled URI pattern for its lifetime while the shared cache remains bounded, preventing dynamic proxies from growing process memory without restoring the 4,096-template performance cliff.
The visibility check runs only list-specific middleware hooks, so rate limits, logging, and metrics see a single request per completion.
Binary resource contents are preserved in the response cache.
A Client releases its session hold before awaiting when its context exits, preventing a cancelled exit from leaking the session.
Data-backed file names are encoded.
get_schema renders enums and defaults.
String length and pattern constraints are preserved when a format is set.
JSON schemas accept integral float counts such as minLength 2.0 and counts larger than any real length, instead of failing to load.
The markdown tool serializer renders non-JSON schema defaults and enums.
OIDC discovery configuration is cached.
OpenAPI model references in prefixItems are rewritten.
Resource templates match literals whether clients send them raw or percent-encoded, and support exploded or comma-joined list query parameters.
Strict parameters declared with Field(strict=True), StrictInt, or a strict model config are honored again on direct calls and task submission, preventing silent coercion.
The local provider now applies transforms in get_tasks.
Version entries are now ordered deterministically.
Dictionary request bodies are preserved rather than altered during OpenAPI handling.
JSON scalar request bodies are encoded correctly.
OpenAPI query parameter explode defaults are corrected.
Raw body content types are preserved during OpenAPI handling.
Whole-body arguments no longer overwrite HTTP parameters with matching names.
Servers reject malformed pagination cursor offsets.
Clients now follow empty pagination cursors when listing results.
Frontmatter is parsed with yaml.safe_load, falling back to the line parser.
Unconstrained sequences no longer have an inferred output schema, preventing images from being sent twice.
Task timing values are serialized so strict clients no longer reject them.
Unfinished Monty callbacks are cleaned up when execution ends.
ClientGroup now reference-counts its context, allowing nested or concurrent entries to reuse existing connections instead of raising.
The client supports the modern protocol in multi-server clients.
Fixes proxy forwarding of MCP transport headers.
Response caching no longer caches error results and can serve empty-list results.
Response caching preserves component metadata and correctly partitions cache entries for versioned components.
fastmcp-slim 3224 changes
Breaking changes 100
FastMCP's HTTP stack now requires certifi 2026.10.19 or later. Update custom, system, and installer trust stores too; upgrading FastMCP alone is insufficient.
Denied concrete resources are no longer served by matching templates.
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.
Rejects unsafe redirect schemes and unregistered DCR redirect URIs.
Adds an explicit >=1.0.1 floor so installs can no longer resolve to a version affected by CVE-2026-48710.
Caps tool calls at 50 per execute block by default; max_tool_calls=None opts out.
When constructed without limits, applies a 30-second duration and 100 MB memory baseline; limits=None opts out.
Rejects dot-segment paths that could bypass prefix checks.
Raises on unhandled content types in sampling handler dispatch chains instead of silently passing them through.
Google authentication now uses the user ID from sub for client_id instead of the app ID from aud.
CSP is no longer included in tool metadata; it remains on resources.
add_tool_transformation(...) is removed.
Replace the removed API with
create_proxy.Caching wrapper model names correct the Cachable spelling to Cacheable; the old names have no compatibility alias.
Replace client-side
call_tool(..., task=True)with plaincall_toolorcall_tool_task.Use
call_tool_taskinstead of the removedtask=Trueargument tocall_tool.The client now defaults to
mode="auto"; usemode="legacy"for servers relying on legacy behavior.client.call_tool(..., task=True) is removed.
client.ping() returns bool on handshake-era connections, but on the sessionless 2026-07-28 era it is not routed and raises MCPError: Method not found; pin mode="legacy" if health checks depend on it.
Raises on sessionless 2026-07-28 connections because logging/setLevel requires session state.
Use
create_proxyin place of the removedas_proxyAPI.ctx.elicit(...) is era-gated in 4.0 and raises on modern connections, which Client negotiates by default.
Server-authoring calls must provide response_type; omitting it or passing None raises TypeError. Use bool for a confirmation.
Elicitation via server-initiated requests works on handshake-era connections but raises on the modern 2026-07-28 protocol. Use the guard pattern, branch by protocol version, or keep clients on legacy mode.
ctx.list_roots(...) is removed.
ctx.sample(...) is removed.
ctx.sample_step(...) is removed.
This
ContextAPI is gone; call an LLM directly from the server for generation.State values set with ctx.set_state and read back in a later call do not survive a modern connection.
Moved to fastmcp_tasks.dependencies.
The setting and its object mode were removed. Decorators always return the original function with metadata attached; retrieve the component through the server.
The tool exclude_args keyword is removed.
The tool
exclude_args=parameter was removed; useDepends()instead.FastAPI 0.133.0 is the first release that admits Starlette 1.x; projects pinned below it may encounter an unsatisfiable dependency resolution.
The FASTMCP_DECORATOR_MODE environment variable is removed.
Removed along with decorator_mode; decorators always return the original function with metadata attached.
FastMCP no longer accepts the sampling_handler keyword.
CurrentDocket and CurrentWorker are no longer imported from fastmcp.dependencies; use fastmcp_tasks.dependencies.
fastmcp.server.apps and fastmcp.server.app are removed; use fastmcp.apps for AppConfig or fastmcp for FastMCPApp.
FastMCP.as_proxy(...) is removed.
Removed; use create_proxy from fastmcp.server. Its target is the first positional argument, so replace keyword calls such as as_proxy(backend=server) with create_proxy(server).
Prompt and Message imports from fastmcp.prompts.prompt are removed; import them from fastmcp.prompts.
FunctionPrompt and prompt imports from fastmcp.prompts.prompt are removed; use fastmcp.prompts.function_prompt.
Resource imports from fastmcp.resources.resource are removed; import them from fastmcp.resources.
FunctionResource and resource imports from fastmcp.resources.resource are removed; use fastmcp.resources.function_resource.
Authorization helpers and types are no longer imported from fastmcp.server.auth.authorization; use fastmcp.server.auth.
This import module was removed; update imports to the supported location.
The old fastmcp.server.proxy import is removed; use fastmcp.server.providers.proxy instead.
This import module was removed; update imports to the supported location.
Tool and ToolResult imports from fastmcp.tools.tool are removed; import them from fastmcp.tools.
FunctionTool, ParsedFunction, and tool imports from fastmcp.tools.tool are removed; use fastmcp.tools.function_tool.
This component shim was removed; update imports from it.
fastmcp.types no longer re-exports protocol types; it contains only types defined by FastMCP itself, currently Textarea.
run_auth_checks_with_shortfall and scope_requirements are no longer imported from fastmcp.server.auth.authorization; use fastmcp.utilities.authorization.
The old fastmcp.experimental.utilities.openapi import is removed; use fastmcp.utilities.openapi.
Import
TaskConfigfrom this module after its move.get_prompt(task=True) is removed.
FastMCP uses httpx2 across its HTTP stack. Custom clients, factories, auth objects, and exception handlers supplied to FastMCP must use httpx2; httpx.AsyncClient is temporarily accepted with a deprecation warning.
FastMCP HTTP logger names change from httpx and httpcore.* to httpx2 and httpcore2.*; logging filters selecting the HTTP stack may need updates.
Use
httpx2imports for exception handling and custom HTTP client or auth objects handed to FastMCP.import_server(...) is removed. mount() replaces it but is not equivalent: import_server took a static snapshot and skipped the child's lifespan and middleware, while mount is live composition that runs both.
When distinct from base_url, issuer_url now supplies OAuth metadata issuer and minted token and authorization-response issuer claims. Existing clients may need one-time full re-authorization.
Removed; use mcp.add_transform with ToolTransform({name: cfg}).
Removed; mount is a live composition rather than a one-time static snapshot. Register components directly on the parent if you need the former frozen-copy behavior.
The as_proxy keyword was removed. Wrap the child with create_proxy and mount the proxy to preserve the MCP-client execution boundary; a direct mount composes in-process.
The prefix keyword was removed; use namespace to name the mounted child.
Removed; use mcp.local_provider.remove_tool. The replacement raises KeyError for a missing tool rather than NotFoundError.
Removed; it was a no-op. Hide tools with mcp.disable(keys={...}) instead.
Positional construction with ErrorData no longer works; construct the error with code and message keyword arguments. Catching errors and reading err.error.code are unchanged.
Middleware now sees notifications and unroutable requests, so guard middleware accordingly.
Middleware.on_initialize hooks do not survive a modern connection.
The as_proxy keyword is removed from mount().
Use
namespace=in place of the removedprefix=keyword.The prefix keyword is removed from mount().
The
prefix=keyword is replaced bynamespace=.Clients need one-time re-authorization when OAuth tokens are minted under an
issuer_urldifferent frombase_url.An OAuth server using an issuer_url different from base_url forces a one-time re-authorization of every client.
The old experimental sampling-handler import is removed; use fastmcp.client.sampling.handlers.openai.
The old OpenAPI module and FastMCPOpenAPI import are removed; use FastMCP with OpenAPIProvider from fastmcp.server.providers.openapi.
PromptToolMiddleware is removed in favor of the PromptsAsTools transform from fastmcp.server.transforms.
The minimum supported version is 2.12. Projects pinned below that must raise the pin before upgrading.
Pydantic AI users need version 2.45 or newer; releases 2.32 through 2.44 may fail to import their MCP module because httpx is no longer installed by FastMCP.
read_resource(task=True) is removed.
The replacement for remove_tool raises KeyError where the old method raised NotFoundError; update surrounding exception handling.
remove_tool_transformation(...) is removed.
The core resources/read handler now returns -32602 instead of -32002 for a missing resource; update clients that match on the numeric code.
ResourceToolMiddleware is removed in favor of the ResourcesAsTools transform from fastmcp.server.transforms.
Calling ctx.elicit(...) without response_type is identified as a runtime break.
Removed from FastMCP constructor arguments.
The sampling_handler_behavior keyword is removed.
The tool serializer keyword is removed.
The sessionless era removes the server's ability to call back into a client mid-request.
The settings.decorator_mode setting is removed.
SkillsProvider is removed; use SkillsDirectoryProvider from fastmcp.server.providers.skills.
The server extra requires Starlette 1.0.1 or newer, which may require raising FastAPI pins to versions that admit Starlette 1.x.
The sse_read_timeout keyword is removed from StreamableHttpTransport.
The task keyword is no longer supported on @mcp.resource or @mcp.prompt; tasks are tools only now.
TaskConfig is no longer imported from fastmcp.server.tasks; import it from fastmcp.utilities.tasks.
Using @mcp.tool(task=True) or TaskConfig now requires registering TasksExtension with mcp.add_extension.
HTTP TLS verification uses the operating system trust store via truststore and honors SSL_CERT_FILE and SSL_CERT_DIR instead of using the bundled certifi CA set.
Security 14
Regex tool search is bounded in time and pattern length.
CIMD cache growth is bounded.
Client schema types are built with create_model and bounded caches.
Schemas are inlined when their pointers pass through alias definitions.
NAT64, 6to4, Teredo, and ISATAP transition addresses can no longer bypass the SSRF allow-list to reach private IPv4 targets.
Validates Host and Origin before session handling to prevent DNS rebinding against localhost-bound servers.
Silent consent is guarded against authorization-server-in-the-middle attacks.
Rejects dot-segment paths that could bypass prefix checks.
Partitions cached responses by access token so different users cannot see each other's cached responses.
Automatically binds token audience to the resource URL per RFC 8707, closing a token-reuse gap across MCP resources.
Validates decoded base64 data size instead of trusting the client-reported size, preventing oversized uploads from bypassing size checks.
Stops forwarding inbound HTTP headers to unrelated remote servers, preventing headers intended for one server from leaking to another.
Azure token validation uses identifier_uri as the expected audience.
Consent cookies are capped as an LRU to prevent unbounded growth and reverse proxy header overflow.
Deprecations 6
Calling ctx.elicit() without response_type now emits a deprecation warning.
Bridged camelCase reads warn and are planned for removal; migrate reads to snake_case. Setting mcp_camelcase_compat to False makes remaining reads raise AttributeError.
Inferring stdio transport from a string is deprecated and will be removed in FastMCP 5. Pass a pathlib.Path for a script or construct a StdioTransport.
Ordinary client logging emits an SDK MCPDeprecationWarning, but ctx.info and other logging methods continue to work on every protocol era.
SDK v2 protocol model fields use snake_case in Python instead of camelCase; FastMCP temporarily bridges old field reads with deprecation warnings.
Templated resources with parameters containing .. or absolute paths are flagged for upgrade review.
New APIs and options 26
Adds a remote command flag for TLS certificate verification.
Lets providers set the FastMCP-issued token lifetime independently of upstream expires_in; when the upstream issues no refresh token, the lifetime is capped to match.
Adds the --host option to the dev CLI.
Adds --log-panel and --no-log-panel options to control the dev CLI log panel.
Adds a standalone command that bridges a remote HTTP MCP server to a local stdio MCP host, with automatic OAuth for HTTPS and support for bearer tokens and custom headers.
Adds support for pre-bound HTTP sockets.
Treats tokens as expired a specified number of seconds early to close refresh races.
Adds is_error so tools can return rich error results, including structured content, instead of raising and reducing errors to text-only results.
The OAuth server metadata endpoint now responds at this additional alias.
Adds the extra_authorize_params option to WorkOSProvider.
Adds the valid_scopes option to WorkOSProvider.
Adds first-class support for Azure AD B2C user flows.
The constructor accepts raw capability flags through
experimental_capabilities.A dependency-light distribution provides the client and transport layer without the server stack, for client-only installs.
Supports a default prefill value.
Tool errors accept a
log_levelparameter to control how they are logged.Sync tools run in a thread pool by default; set
run_in_thread=Falseto opt out when a tool has thread-local state or is bound to a specific thread.Adds a public API to update the proxy's required scopes after initialization, useful when scope requirements are determined at runtime.
Adds response_description to ctx.elicit() so callers can set a response description.
Adds response_title to ctx.elicit() so callers can set a response title.
Adds a Keycloak OAuth provider for enterprise authentication and local development.
Auth providers can now override protected resource base URLs.
Returns a task handle immediately for callers that want to do other work, check progress, or cancel.
Setting this environment variable to false turns off the camelCase compatibility shims.
This setting controls the camelCase compatibility shims and defaults to on; setting it to False disables the shims.
Protocol types now live in the standalone mcp_types package and remain available through the preferred mcp.types spelling.
Behavior and default changes 19
Component manager auth challenges now include resource metadata.
Restores acceptance of HTTP traffic that worked before 3.4.3 by default; deployments can opt in to the guard with explicit trusted hosts and origins.
Invalid tool arguments now raise fastmcp.ValidationError.
Logs refresh-token cache misses instead of failing silently.
Proxies forward initialize upstream and report a successful handshake only after upstream initialization, surfacing backend, URL, authentication, and protocol failures to downstream clients.
The proxy now forwards ping requests to the upstream server.
Hoists
$defsintroduced byArgTransformto the schema root.Proxy-server delegate spans are enriched with backend attributes.
List operations are instrumented with OTEL in compliance with MCP semantic conventions.
Mounted servers enter their own lifespan, allowing servers with startup or shutdown logic to work when composed into a larger server.
Plain
mcp.toolapp-only tools are no longer completely hidden.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.
Parameter descriptions are extracted automatically from docstrings, so tool signatures document their parameters.
Azure token validation now accepts both the bare client ID GUID and the custom Application ID URI as audience values.
Tasked calls are handled transparently: the client polls background execution to completion and returns the synchronous-call result.
get_session_id() returns None on protocol eras without sessions instead of raising.
Middleware must not assume on_message only sees routable requests.
A single server now serves sessionless 2026-07-28 and earlier session-based protocol eras, with the SDK negotiating the era per client.
Templated resources that legitimately accept
..or absolute paths are exempted from the changed path behavior.
Fixes and other changes 59
A skill's
SKILL.mdmust stay inside its skill folder.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.
The Azure scope fallback is fixed.
compress_schema no longer mutates the caller's schema.
Deep object query parameters are serialized.
Unsupported keys in a JWKS are skipped, so a single unsupported Ed25519 key no longer causes tokens signed by supported keys in the same set to be rejected.
The required order for transformed tools is deterministic.
Empty environment variable keys are rejected.
Rate-limiting middleware now supports asynchronous get_client_id callbacks.
Identity provider authentication errors are forwarded to the MCP client instead of being shown as an HTML error page.
The default OIDC discovery timeout is bounded and exposed on provider wrappers.
JSON schema conversion now preserves required discriminator tags.
Resource path values containing reserved characters now round-trip correctly in URI templates.
Tool result serialization now honors serialize_by_alias.
Proxy disconnect during session teardown is shielded to avoid teardown races.
Calling clear during session teardown no longer causes a KeyError.
Task tool arguments are now validated against their declared types.
Private, non-critical JWS header parameters no longer cause JWTs to be rejected before signature and claim validation; unsupported critical headers remain rejected.
MCP config files are now read as UTF-8.
Resources created from templates now preserve annotations, meta, title, and icons.
Resource templates with query parameters now work on proxied servers.
The CLI now forwards the stateless flag in the uv run path.
Component imports no longer pull in the server/provider stack through auth and task primitives, avoiding circular imports on clean installs; existing server-facing import paths remain compatible.
Cancels an orphaned session task when disconnect times out.
Active HTTP transports are terminated before lifespan shutdown.
Honors upstream refresh token expiry.
Fixes the OCI provider for 3.x installs.
Preserves blank query string values in OpenAPI routing.
Exits cleanly when the session stream closes.
No longer crashes on non-TextContent error responses.
Hyphens are now allowed in resource template parameter names.
Sampling from background tasks now works correctly.
Rejects self-mounting to prevent infinite recursion.
No longer crashes on non-UTF-8 console output.
Hardens cleanup after forced client disconnects.
No longer crashes on Python keywords, boolean schemas, empty enums, or name collisions.
Fixes list[dict] return types being represented as Root() instead of dictionaries.
Fixes wildcard resource template parameters in mounted servers.
Generators are materialized before result conversion, and bytes are handled gracefully.
Retries tool errors that were not previously retried.
No longer hangs indefinitely when a task enters input_required.
Strips title fields from tool schemas for Gemini 2.5 Flash compatibility.
Fixes synchronous function crashes and schema mutation in TransformedTool.
The tasks extra pins fakeredis below 2.35.0 as a stopgap for an undocumented rename that broke pydocket's memory:// backend and caused startup ImportErrors.
allowed_client_redirect_uris on OAuthProxy can now be changed.
The deprecated asyncio.iscoroutinefunction fallback was removed, avoiding deprecation warnings on Python 3.14.
Background task context forwarding is unified, fixing concurrent dependency bugs.
Boolean property schemas are now handled correctly during JSON Schema parsing.
The client handles error responses with empty or non-text content from third-party servers without crashing.
Cognito token verification checks client_id instead of aud.
FastAPI TestClient compatibility and lifespan re-initialization were fixed.
JWT expiration validation now uses explicit None checks.
OpenAPI 3.0 nullable fields are converted into JSON Schema-compatible tool input schemas.
Proxy timeouts were added and networking in apps dev was modernized.
ResponseLimitingMiddleware no longer breaks tools that use outputSchema.
Defaults for server variables are substituted when building a base URL from an OpenAPI spec.
upstream_claims is now propagated in load_access_token.
Upgrade FastAPI if the resolver complains about Starlette below 1.0.1.
Clients matching on resource-not-found error code -32002 are flagged for upgrade review.