pypi / mcp-types
mcp-types
What changed in mcp-types 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
11 breaking1 security4 deprecations6 new APIs and options5 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmcp-types 232 changes
Breaking changes 11
initialize leaves out experimental when none is configured; client code reading capabilities.experimental on a legacy connection should handle None.
The required version is now httpx2>=2.10.0, up from >=2.5.0; the new max_sse_event_size option needs it.
Empty _meta is omitted from outbound requests; on receiving connections, ctx.meta is None rather than {}.
Requests without params omit the params member, and middleware sees ctx.params as None.
Invalid tool header annotations now raise InvalidSignature at registration, naming the tool and the problem.
MCP HTTP clients and OAuth providers follow redirects only within the endpoint's origin, with an http-to-https upgrade on the same host allowed. Other redirects fail instead of being followed.
A 403 without an
insufficient_scopechallenge is returned to the caller rather than retried.On the legacy discovery path, authorization server metadata is rejected when its issuer differs from the server's origin.
Tool schema
$refs resolve only within that schema; an unresolvable reference raisesRuntimeError: Invalid schema for tool ....If fetching protected resource metadata fails with a 5xx or 429, the OAuth flow stops instead of falling back to legacy endpoints.
Idle stateful Streamable HTTP sessions using the legacy spec now expire after 30 minutes; set
session_idle_timeout=Noneto disable expiration.
Security 1
Controls whether only tokens that the
TokenVerifierreports as issued for this server are accepted.
Deprecations 4
When
resource_server_urlis set, leavingvalidate_token_resourceunset emits anMCPDeprecationWarning; set it toTrueorFalsebecause 3.0 defaults it toTrue.Constructing this provider without
issuer=emits anMCPDeprecationWarning; pass the authorization server's issuer URL because 3.0 will require it.Constructing this provider without
issuer=emits anMCPDeprecationWarning; pass the authorization server's issuer URL because 3.0 will require it.Imports of mcp.server.fastmcp point to the migration guide, helping developers address the import warning.
New APIs and options 6
Server accepts get_tool_input_schema so a low-level server can supply a tool schema for header validation without running its tools/list handler.
Added to streamable_http_client and StreamableHttpParameters; the default remains 1 MiB per SSE event, and None or a larger value permits larger tool results.
MCPServer(subscriptions=False) stops serving subscriptions/listen and advertises listChanged and subscribe as false.
Adds
issuer=for specifying the authorization server's issuer URL.Streamable HTTP servers now hold at most 10,000 sessions; set
max_sessions=Noneto disable the cap.Adds
issuer=for specifying the authorization server's issuer URL.
Behavior and default changes 5
Context[AppState] now works on prompts and resource templates, as well as tools.
Validation looks up the registered tool schema by name instead of running tools/list for each tools/call; list middleware no longer affects validation.
Request timeouts pause while OAuthClientProvider waits on redirect_handler and callback_handler, so an interactive login no longer counts against them.
Client spans now record JSON-RPC error responses; with mode="auto", probing a server without server/discover shows one ERROR span.
A client DELETE now frees its session immediately.
Fixes and other changes 5
After a HeaderMismatch (-32020) rejection, the client re-lists tools and retries the call once.
A raising progress_callback no longer fails a call on an in-process Client(server).
On Windows, stdio_client resolves the executable off the event loop.
An explicit structuredContent null is now checked against the output schema instead of being treated as missing.
A refused opening request no longer leaves a session behind.