unstale

pypi / mcp-types

mcp-types

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

171 breaking1 security16 deprecations19 new APIs and options10 behavior and defaults8 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

mcp-types 2225 changes

Breaking changes 171

  • initialize leaves out experimental when none is configured; client code reading capabilities.experimental on a legacy connection should handle None.

    2.3.0release notes

  • The required version is now httpx2>=2.10.0, up from >=2.5.0; the new max_sse_event_size option needs it.

    2.3.0release notes

  • Empty _meta is omitted from outbound requests; on receiving connections, ctx.meta is None rather than {}.

    2.3.0release notes

  • Requests without params omit the params member, and middleware sees ctx.params as None.

    2.3.0release notes

  • Invalid tool header annotations now raise InvalidSignature at registration, naming the tool and the problem.

    2.3.0release notes

  • 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.

    2.2.0release notes

  • A 403 without an insufficient_scope challenge is returned to the caller rather than retried.

    2.2.0release notes

  • On the legacy discovery path, authorization server metadata is rejected when its issuer differs from the server's origin.

    2.2.0release notes

  • Tool schema $refs resolve only within that schema; an unresolvable reference raises RuntimeError: Invalid schema for tool ....

    2.2.0release notes

  • If fetching protected resource metadata fails with a 5xx or 429, the OAuth flow stops instead of falling back to legacy endpoints.

    2.2.0release notes

  • Idle stateful Streamable HTTP sessions using the legacy spec now expire after 30 minutes; set session_idle_timeout=None to disable expiration.

    2.2.0release notes

  • Requests for unrecognized methods or methods without a registered handler now return -32601, with the method name in data, instead of -32602.

    2.0.0upgrade guide

  • OAuth discovery now rejects authorization-server metadata whose issuer is not an exact string match for the URL advertised in protected resource metadata, or the expected server origin.

    2.0.0upgrade guide

  • A path-less issuer_url passed as a string preserves its empty path, so advertised issuer metadata retains the supplied URL form.

    2.0.0upgrade guide

  • BaseSession and its receive loop were removed without a shim; ClientSession now runs on JSONRPCDispatcher.

    2.0.0upgrade guide

  • Lowlevel call_tool handlers no longer automatically validate inputs or wrap dict and list return values; handlers must validate inputs themselves and construct CallToolResult.

    2.0.0upgrade guide

  • The callback must return AuthorizationCodeResult rather than a code/state tuple and forward the redirect's iss value for authorization-response issuer validation.

    2.0.0upgrade guide

  • Cancelled requests generally receive no response, including if the handler later completes or fails; the 2025-era streamable HTTP transport instead terminates with a valid -32800 error.

    2.0.0upgrade guide

  • Client adds mode to control version negotiation; auto is the default and legacy reproduces v1's initialize-only handshake.

    2.0.0upgrade guide

  • Union message types are no longer RootModel subclasses; validate values with the exported TypeAdapter instances instead of model_validate(), and use member instances directly without .root.

    2.0.0upgrade guide

  • Secret-based client records with no stored secret are rejected before grant processing; /token returns invalid_client and /revoke returns unauthorized_client.

    2.0.0upgrade guide

  • The requested scope keyword is now scope instead of scopes, matching the single space-separated string value.

    2.0.0upgrade guide

  • A client-specific request context replaces the shared generic context for client-side sampling, elicitation, and roots callbacks.

    2.0.0upgrade guide

  • The suffixed message type alias is removed; use the bare ClientRequest union name.

    2.0.0upgrade guide

  • Inbound deliveries start in arrival order but run as separate tasks, so callbacks and notifications may interleave; callbacks needing strict sequencing must coordinate themselves.

    2.0.0upgrade guide

  • The method was removed; read negotiated metadata from the corresponding ClientSession properties.

    2.0.0upgrade guide

  • The cursor parameter was removed; pass params=PaginatedRequestParams(cursor=...) to request a page.

    2.0.0upgrade guide

  • The cursor parameter was removed; pass params=PaginatedRequestParams(cursor=...) to request a page.

    2.0.0upgrade guide

  • The cursor parameter was removed; pass params=PaginatedRequestParams(cursor=...) to request a page.

    2.0.0upgrade guide

  • The cursor parameter was removed; pass params=PaginatedRequestParams(cursor=...) to request a page.

    2.0.0upgrade guide

  • Inbound server requests, notifications, and results are validated against the negotiated protocol schema before parsing; spec-invalid output may raise pydantic.ValidationError.

    2.0.0upgrade guide

  • The deprecated args parameter was removed; pass arguments instead.

    2.0.0upgrade guide

  • The protocol type alias is removed; use ContentBlock instead.

    2.0.0upgrade guide

  • Removed because it only echoed a non-standard request metadata key and did not provide an authenticated client identity.

    2.0.0upgrade guide

  • Rendered elicitation schemas are checked against PrimitiveSchemaDefinition at the call site; unsupported schemas raise TypeError, and accepted answers that mismatch raise ValueError.

    2.0.0upgrade guide

  • Context logging methods take data: Any instead of message: str; Context.log accepts all eight RFC 5424 levels. The extra parameter is removed.

    2.0.0upgrade guide

  • The context type is imported from mcp.server.mcpserver, and its fastmcp property is now named mcp_server.

    2.0.0upgrade guide

  • The high-level Context type no longer takes a ServerSessionT type parameter; its remaining parameters have defaults.

    2.0.0upgrade guide

  • The yielded streams are now context-propagating wrappers; they no longer support send_nowait, receive_nowait, or statistics().

    2.0.0upgrade guide

  • The in-memory testing helper was removed; use mcp.client.Client, which accepts a Server or MCPServer and handles in-memory transport and session setup.

    2.0.0upgrade guide

  • The protocol type alias is removed; use str directly.

    2.0.0upgrade guide

  • Now a TypeAliasType usable as an annotation, but runtime isinstance checks against the alias raise TypeError; check its member classes instead.

    2.0.0upgrade guide

  • The SDK no longer implements the Tasks runtime or experimental modules and properties; the reintroduced official extension is not implemented yet.

    2.0.0upgrade guide

  • MCP types now silently drop unknown constructor arguments and wire-data keys instead of preserving them; use _meta for custom data.

    2.0.0upgrade guide

  • FastMCP is renamed to MCPServer.

    2.0.0upgrade guide

  • Replaces is_binary with encoding: a string decodes and serves text, while None serves bytes. Defaults use a declared charset, UTF-8 with BOM tolerance for textual MIME types, and bytes otherwise.

    2.0.0upgrade guide

  • The type alias is gone; importing it from mcp.client.streamable_http now raises ImportError.

    2.0.0upgrade guide

  • Private _handle_message, _handle_request, and _handle_notification dispatch methods are removed; use middleware to intercept requests.

    2.0.0upgrade guide

  • The SDK replaces httpx and httpx-sse with httpx2, which becomes a required dependency.

    2.0.0upgrade guide

  • Client-authentication failures at /token now return invalid_client instead of unauthorized_client; unauthorized_client is reserved for authenticated clients not permitted the requested grant.

    2.0.0upgrade guide

  • Invalid template syntax, duplicate variables, unsupported syntax, and adjacent variables without a delimiter now fail when the decorator runs.

    2.0.0upgrade guide

  • The required id field now accepts None, allowing null-id JSON-RPC error responses to validate; callers must handle None.

    2.0.0upgrade guide

  • Message unions are plain unions rather than RootModel instances.

    2.0.0upgrade guide

  • Removed with RFC7523OAuthClientProvider. Use SignedJWTParameters to build an assertion or static_assertion_provider to wrap a prebuilt JWT.

    2.0.0upgrade guide

  • Its value and meaning changed to the newest revision spoken in any era, which the initialize handshake cannot negotiate; use LATEST_HANDSHAKE_VERSION for handshake offers or comparisons.

    2.0.0upgrade guide

  • The lowlevel list_tools, list_resources, and list_prompts handlers no longer accept bare lists; return the corresponding full result type.

    2.0.0upgrade guide

  • The deprecated logging capability is removed; log delivery is instead opted into per request.

    2.0.0upgrade guide

  • Automatic wrapping of bare list or dict returns is removed; such returns fail result validation.

    2.0.0upgrade guide

  • Tool handler exceptions no longer become isError: true results; clients receive a JSON-RPC error.

    2.0.0upgrade guide

  • Streamable HTTP POST bodies now have a 4 MiB default limit; oversized requests receive HTTP 413 before JSON parsing or session creation. Set a larger positive byte limit when needed.

    2.0.0upgrade guide

  • The SDK no longer reads MCP_* environment variables or .env files for Settings. Read environment values in application code and pass them to the constructor.

    2.0.0upgrade guide

  • The command pins the spawned environment to the installed SDK version, except for source builds and other unpublished versions.

    2.0.0upgrade guide

  • The command pins the spawned environment to the installed SDK version, except for source builds and other unpublished versions.

    2.0.0upgrade guide

  • The header-name constant is now imported from mcp.shared.inbound instead of mcp.client.streamable_http.

    2.0.0upgrade guide

  • The SDK adds mcp-types as a required dependency, pinned exactly to the SDK version; do not pin it independently.

    2.0.0upgrade guide

  • The ws optional dependency extra no longer exists.

    2.0.0upgrade guide

  • The WebSocket client transport is removed; use the streamable HTTP transport instead.

    2.0.0upgrade guide

  • The WebSocket server transport is removed; use streamable HTTP instead.

    2.0.0upgrade guide

  • The ProgressContext, Progress, and progress() context manager are removed; use Context.report_progress() or session.report_progress() instead.

    2.0.0upgrade guide

  • The mcp.shared.session module and its generic typing helpers were removed.

    2.0.0upgrade guide

  • The module is removed; import the version registry from mcp.types.version instead.

    2.0.0upgrade guide

  • McpError is renamed to MCPError.

    2.0.0upgrade guide

  • MCPError now exposes a convenience code property for checking protocol error codes.

    2.0.0upgrade guide

  • The exception is renamed from McpError, exported from mcp, and constructed with code, message, and optional data directly; existing ErrorData can be passed to from_error_data().

    2.0.0upgrade guide

  • An MCPError raised in an @mcp.tool() handler now becomes a top-level JSON-RPC error, preserving code, message, and data; client call_tool methods raise it.

    2.0.0upgrade guide

  • The high-level server class is renamed from FastMCP and moved to mcp.server.mcpserver; its submodules move there too, and the old import path raises ModuleNotFoundError.

    2.0.0upgrade guide

  • A server constructed without a name now reports mcp-server as serverInfo.name instead of FastMCP. Pass a name explicitly to preserve the old identity.

    2.0.0upgrade guide

  • The constructor's positional order now includes title and description before instructions, and version after icons. Pass all arguments except name by keyword to avoid silently assigning instructions to title.

    2.0.0upgrade guide

  • Transport-specific parameters move from the MCPServer constructor to runapp methods.

    2.0.0upgrade guide

  • Transport configuration moved from the constructor to run(), sse_app(), and streamable_http_app(). Configure each transport when starting or building the server.

    2.0.0upgrade guide

  • call_tool() now returns CallToolResult or InputRequiredResult rather than exposing internal conversion shapes. Read content and structured_content from the result.

    2.0.0upgrade guide

  • get_context() was removed; tool, resource, and prompt handlers should receive Context through parameter injection instead of reading ambient context.

    2.0.0upgrade guide

  • get_prompt() may now return InputRequiredResult as well as GetPromptResult; callers should narrow the union when handling direct calls.

    2.0.0upgrade guide

  • read_resource() may now return InputRequiredResult as well as resource contents; callers should narrow the union when handling direct calls.

    2.0.0upgrade guide

  • run() is overloaded per transport so type checkers validate accepted keywords; stdio accepts none, and HTTP transports raise TypeError for unrecognized keywords when starting.

    2.0.0upgrade guide

  • The server exception is renamed from FastMCPError and is imported from mcp.server.mcpserver.exceptions.

    2.0.0upgrade guide

  • The handler no longer receives server-initiated requests; its parameter is IncomingMessage, and delivered notifications are concrete instances rather than RootModel wrappers.

    2.0.0upgrade guide

  • Client now defaults to mode='auto'.

    2.0.0upgrade guide

  • Serialization now emits snake_case keys by default; pass by_alias=True to produce the camelCase wire format.

    2.0.0upgrade guide

  • The mount_path parameter was removed from MCPServer methods and Settings; SSE sub-path mounting uses ASGI root_path instead.

    2.0.0upgrade guide

  • Server-initiated requests without a channel now fail with NoBackChannelError instead of stalling or being silently dropped.

    2.0.0upgrade guide

  • The nested metadata class is gone; notification _meta is now a plain dict[str, Any], accessed with dictionary operations.

    2.0.0upgrade guide

  • Cancelling an awaiting request or timing out now sends notifications/cancelled so the server interrupts the handler.

    2.0.0upgrade guide

  • The server-record model is now separate from the strict registration-request model and accepts server-substituted metadata, including nullable or unsupported values and empty or absent redirect_uris.

    2.0.0upgrade guide

  • client_id is required on the server record because a registered-client record without it is not meaningful.

    2.0.0upgrade guide

  • Registered client credentials record their issuing authorization server; credentials bound to a different server are discarded and re-registered, while URL-based client IDs are unaffected.

    2.0.0upgrade guide

  • validate_scope moved from OAuthClientMetadata to OAuthClientInformationFull, along with validate_redirect_uri.

    2.0.0upgrade guide

  • Path-less redirect URIs passed as strings serialize and are sent without a trailing slash; re-register clients if stored redirect URIs use the previous form.

    2.0.0upgrade guide

  • Dynamic registration now rejects credentials the authorization-code flow cannot use before storing them or beginning authorization.

    2.0.0upgrade guide

  • The timeout argument is removed because it was stored but never read; bound waiting in the redirect_handler or callback_handler instead.

    2.0.0upgrade guide

  • The v2 constructor adds a new optional validate_resource_url callback.

    2.0.0upgrade guide

  • Path-less URLs parsed from strings or JSON preserve their empty path instead of gaining a trailing slash, supporting exact issuer comparisons.

    2.0.0upgrade guide

  • Import OAuthTokenError from mcp.client.auth; the client-credentials extension no longer happens to re-export it.

    2.0.0upgrade guide

  • When supported by the authorization server and refresh_token is an allowed grant, the client adds offline_access to requested scopes and sends prompt=consent.

    2.0.0upgrade guide

  • Lowlevel decorator-based handlers are replaced with on_* constructor parameters.

    2.0.0upgrade guide

  • Generic handler exceptions now propagate as top-level JSON-RPC errors instead of becoming CallToolResult errors; catch exceptions and construct an error result when that behavior is desired.

    2.0.0upgrade guide

  • The requested scope keyword is now scope instead of scopes, matching the single space-separated string value.

    2.0.0upgrade guide

  • Protocol model attributes now use snake_case instead of camelCase; constructor kwargs still accept both spellings, but attribute access must use snake_case.

    2.0.0upgrade guide

  • raise_exceptions=True now governs handler exceptions only; transport errors are debug-logged and dropped rather than re-raised from run().

    2.0.0upgrade guide

  • Lowlevel read_resource handlers must return ReadResourceResult and construct text or blob contents themselves, including base64 encoding binary content.

    2.0.0upgrade guide

  • Timeout parameters that accepted datetime.timedelta now accept plain seconds as float; convert existing timedeltas with .total_seconds().

    2.0.0upgrade guide

  • The module-level context variable was removed; handlers receive request context as their first argument.

    2.0.0upgrade guide

  • The public request_handlers and notification_handlers dictionaries are removed; register handlers through constructor arguments or add_* methods, and look them up by method string.

    2.0.0upgrade guide

  • On 2026-07-28 connections, servers deliver log messages only on the requesting stream when that request opts in with _meta io.modelcontextprotocol/logLevel; otherwise messages are dropped.

    2.0.0upgrade guide

  • Client request timeouts now use JSON-RPC code -32001 instead of HTTP status 408; compare the error code with REQUEST_TIMEOUT.

    2.0.0upgrade guide

  • The shared generic RequestContext was removed; use ClientRequestContext or ServerRequestContext instead.

    2.0.0upgrade guide

  • The generic mcp.shared.context.RequestContext type was deleted; use ClientRequestContext for client callbacks.

    2.0.0upgrade guide

  • The nested RequestParams.Meta Pydantic model is replaced by a top-level TypedDict; access metadata with dictionary keys such as progress_token.

    2.0.0upgrade guide

  • RequestResponder and its response and cancellation-tracking APIs were removed; inbound cancellation is handled by JSONRPCDispatcher.

    2.0.0upgrade guide

  • Resolve markers now require the client to declare the matching elicitation, sampling, or roots capability, including sampling.tools when applicable; otherwise the call fails with MISSING_REQUIRED_CLIENT_CAPABILITY.

    2.0.0upgrade guide

  • Resource classes now reject unrecognized keyword arguments with ValidationError instead of silently dropping them; subclasses can explicitly allow extras with model_config.

    2.0.0upgrade guide

  • Template matching now supports RFC 6570, matches literals and structural delimiters exactly, and allows simple variables to match empty values.

    2.0.0upgrade guide

  • Resource URIs use str instead of AnyUrl.

    2.0.0upgrade guide

  • ResourceManager.get_resource() and missing-resource handlers use typed exceptions; missing resource reads return JSON-RPC code -32602 with the requested URI in error.data.

    2.0.0upgrade guide

  • The protocol type is removed; use ResourceTemplateReference instead.

    2.0.0upgrade guide

  • Resource template parameters are checked by default for traversal components, null bytes, and absolute paths; exempt_params can exempt legitimate parameters.

    2.0.0upgrade guide

  • Raises ResourceError when the template function fails instead of ValueError.

    2.0.0upgrade guide

  • Removed the deprecated provider. Use the provider for the actual flow: client credentials, private_key_jwt client authentication, or identity assertion.

    2.0.0upgrade guide

  • Notifications sent after connection close are dropped with a debug log instead of raising a transport exception.

    2.0.0upgrade guide

  • The client-side send_notification method no longer accepts related_request_id.

    2.0.0upgrade guide

  • Calling send_request before entering the context manager now raises RuntimeError immediately; after connection close it raises MCPError with CONNECTION_CLOSED.

    2.0.0upgrade guide

  • The client-side send_request method no longer accepts ServerMessageMetadata.

    2.0.0upgrade guide

  • Lowlevel handlers are now supplied as on_* constructor keyword arguments and receive ServerRequestContext plus typed params, returning full result types instead of using decorator registration.

    2.0.0upgrade guide

  • Handler results are validated against the negotiated protocol schema before transmission. Invalid results raise server-side and produce an INTERNAL_ERROR response for the client.

    2.0.0upgrade guide

  • The lowlevel Server supports registering arbitrary request handlers directly; MCPServer users can access it through the private _lowlevel_server workaround.

    2.0.0upgrade guide

  • Middleware can observe and wrap request handling, including unknown methods; its API is provisional, so the notes recommend using it for observation rather than as a foundation.

    2.0.0upgrade guide

  • The server property was removed; handlers receive request context as their first argument.

    2.0.0upgrade guide

  • The low-level Server.run() method no longer accepts a stateless flag; stateless serving is determined by how the connection is constructed.

    2.0.0upgrade guide

  • All constructor parameters after name are keyword-only, so positional arguments such as version must be passed by keyword.

    2.0.0upgrade guide

  • The Server type now has one type parameter; the RequestT parameter has been removed.

    2.0.0upgrade guide

  • A server without an explicit version now reports an empty string rather than the installed mcp package version. Set version to identify your server.

    2.0.0upgrade guide

  • A server-specific context replaces the shared generic context and includes server fields plus protocol_version, method, raw params, and an optional request_id.

    2.0.0upgrade guide

  • ServerSession is now a per-inbound-message proxy over a connection rather than a connection-wide BaseSession; identity-based per-client state can break, while captured proxies remain usable after handlers return.

    2.0.0upgrade guide

  • ServerSession is no longer an async context manager; its async context-manager methods were removed.

    2.0.0upgrade guide

  • The schema keyword was renamed from requestedSchema to requested_schema; keyword callers using the old name now raise TypeError.

    2.0.0upgrade guide

  • The public inbound-message stream was removed; register handlers or use Server.middleware to observe inbound requests and notifications.

    2.0.0upgrade guide

  • Settings now contains only constructor-owned fields. Removed transport fields can no longer be assigned, and lifespan is read once during construction.

    2.0.0upgrade guide

  • Fields previously named in camelCase are renamed to snake_case.

    2.0.0upgrade guide

  • On POSIX, children left behind by a server that exits gracefully are deliberately left alive; a server that misses the grace period is still terminated with its process group.

    2.0.0upgrade guide

  • The client now closes its pipe ends deterministically at shutdown, and failed writes to a running server surface as CONNECTION_CLOSED on the read side.

    2.0.0upgrade guide

  • The transport moves protocol streams to private descriptors and diverts fd 0 to the null device and fd 1 to stderr while serving.

    2.0.0upgrade guide

  • A second concurrent stdio_server on the process's default streams now raises RuntimeError instead of contending for stdin.

    2.0.0upgrade guide

  • The function now yields a 2-tuple, (read_stream, write_stream), rather than a 3-tuple containing a session-ID callback.

    2.0.0upgrade guide

  • The server lifespan context is now entered once when the session manager starts, with state shared across sessions and requests. Move per-connection resource acquisition into handlers.

    2.0.0upgrade guide

  • Non-2xx message POST responses now surface as JSON-RPC errors on the failing request; the connection remains usable instead of raising HTTPStatusError from the transport context.

    2.0.0upgrade guide

  • The client alias is removed.

    2.0.0upgrade guide

  • The deprecated function is removed; use streamable_http_client and configure headers, timeouts, and auth on an httpx2.AsyncClient.

    2.0.0upgrade guide

  • The timeout and sse_read_timeout fields now take float seconds instead of timedelta values.

    2.0.0upgrade guide

  • The transport-level auth parameter is removed; configure auth on the httpx2.AsyncClient instead.

    2.0.0upgrade guide

  • The transport-level headers parameter is removed; configure headers on the httpx2.AsyncClient instead.

    2.0.0upgrade guide

  • The transport-level SSE read timeout parameter is removed; configure timeouts on the httpx2.AsyncClient instead.

    2.0.0upgrade guide

  • The transport-level timeout parameter is removed; configure it on the httpx2.AsyncClient instead.

    2.0.0upgrade guide

  • The transport no longer exposes per-connection protocol state; read the negotiated version from session.protocol_version or client.protocol_version.

    2.0.0upgrade guide

  • On 2026-07-28 connections, change notifications reach clients only through a subscriptions/listen stream that requested them; standalone notifications sent by v1-style session helpers are dropped.

    2.0.0upgrade guide

  • Synchronous handlers now run on a worker thread.

    2.0.0upgrade guide

  • Synchronous tool, resource, prompt, and resolver functions now run in worker threads rather than inline on the event loop. Thread-affine state and asyncio.get_running_loop() assumptions may need adjustment.

    2.0.0upgrade guide

  • The helper now requires the process to lead its own process group, spawned with start_new_session=True; the lookup and per-process fallback are gone.

    2.0.0upgrade guide

  • The deprecated function is removed; process termination is handled internally by the stdio_client context manager.

    2.0.0upgrade guide

  • The timeout_seconds argument is removed because the value was never used; Job Object termination is immediate.

    2.0.0upgrade guide

  • Use the plain required, optional, or forbidden literal for task_support; TASK_REQUIRED, TASK_OPTIONAL, and TASK_FORBIDDEN constants were removed.

    2.0.0upgrade guide

  • Resource-related URI fields and corresponding client method parameters now use str rather than AnyUrl; relative paths are accepted and values are preserved as given.

    2.0.0upgrade guide

Security 1

  • Controls whether only tokens that the TokenVerifier reports as issued for this server are accepted.

    2.2.0release notes

Deprecations 16

  • When resource_server_url is set, leaving validate_token_resource unset emits an MCPDeprecationWarning; set it to True or False because 3.0 defaults it to True.

    2.2.0release notes

  • Constructing this provider without issuer= emits an MCPDeprecationWarning; pass the authorization server's issuer URL because 3.0 will require it.

    2.2.0release notes

  • Imports of mcp.server.fastmcp point to the migration guide, helping developers address the import warning.

    2.0.1release notes

  • Using the cert parameter is deprecated in httpx2; configure an ssl.SSLContext instead.

    2.0.0upgrade guide

  • Client.send_ping() is deprecated and emits MCPDeprecationWarning when called; ping is removed in the 2026-07-28 protocol.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning because the 2026-07-28 spec restricts progress notifications to the server-to-client direction; it continues working with older servers.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning. It continues to work with 2025-era servers; use Client.listen() for 2026-07-28 connections.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning; the deprecation is advisory and there are no wire-level changes.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning; the deprecation is advisory and there are no wire-level changes.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning. It continues to work with 2025-era servers; resource subscriptions for 2026-07-28 connections use the listen stream.

    2.0.0upgrade guide

  • Roots, Sampling, and Logging methods are deprecated under SEP-2577.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning; it continues working for sessions negotiating 2025-11-25 and earlier.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning; it continues working for sessions negotiating 2025-11-25 and earlier.

    2.0.0upgrade guide

  • The method is deprecated and emits MCPDeprecationWarning; the deprecation is advisory and there are no wire-level changes.

    2.0.0upgrade guide

  • This constant now combines handshake and modern protocol versions and is deprecated; use HANDSHAKE_PROTOCOL_VERSIONS when referring to versions accepted by the initialize handshake.

    2.0.0upgrade guide

  • Passing a CA bundle path as verify is deprecated in httpx2; configure an ssl.SSLContext instead.

    2.0.0upgrade guide

New APIs and options 19

  • 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.

    2.3.0release notes

  • 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.

    2.3.0release notes

  • MCPServer(subscriptions=False) stops serving subscriptions/listen and advertises listChanged and subscribe as false.

    2.3.0release notes

  • Adds issuer= for specifying the authorization server's issuer URL.

    2.2.0release notes

  • Streamable HTTP servers now hold at most 10,000 sessions; set max_sessions=None to disable the cap.

    2.2.0release notes

  • Adds a client-wide log level that is stamped into the reserved _meta key on every modern request, allowing logging_callback to receive messages when the client opts in.

    2.0.0upgrade guide

  • Provides a listen stream for resource subscriptions on 2026-07-28 connections, replacing deprecated per-resource subscribe and unsubscribe calls.

    2.0.0upgrade guide

  • A keyword-only dispatcher argument lets callers supply a pre-built dispatcher, such as DirectDispatcher for in-process embedding.

    2.0.0upgrade guide

  • Negotiated server instructions are available as a property populated by initialize() or discover().

    2.0.0upgrade guide

  • The negotiated protocol version is available as a property populated by initialize() or discover().

    2.0.0upgrade guide

  • Negotiated server capabilities are available as an era-neutral property populated by initialize() or discover().

    2.0.0upgrade guide

  • Negotiated server identity is available as a property and may be None when a 2026-era server does not report it.

    2.0.0upgrade guide

  • The helper gains an optional client_grant_types parameter.

    2.0.0upgrade guide

  • Protocol wire types are available in the standalone mcp-types distribution, allowing projects to use them without installing the full SDK.

    2.0.0upgrade guide

  • call_tool(), read_resource(), and get_prompt() accept an optional context parameter. Direct calls without one receive a Context with no active request.

    2.0.0upgrade guide

  • Dynamic Client Registration now sends application_type, defaulting to native; browser clients on non-local hosts should set it to web.

    2.0.0upgrade guide

  • An optional callback is added to override the RFC 8707 resource check.

    2.0.0upgrade guide

  • Adds dispatcher-agnostic progress reporting, which handles the no-op case when the caller did not request progress and works across dispatchers.

    2.0.0upgrade guide

  • A new helper is added to mcp.client.auth.utils.

    2.0.0upgrade guide

Behavior and default changes 10

  • Context[AppState] now works on prompts and resource templates, as well as tools.

    2.3.0release notes

  • Validation looks up the registered tool schema by name instead of running tools/list for each tools/call; list middleware no longer affects validation.

    2.3.0release notes

  • Request timeouts pause while OAuthClientProvider waits on redirect_handler and callback_handler, so an interactive login no longer counts against them.

    2.3.0release notes

  • Client spans now record JSON-RPC error responses; with mode="auto", probing a server without server/discover shows one ERROR span.

    2.3.0release notes

  • A client DELETE now frees its session immediately.

    2.2.0release notes

  • Client now defaults to mode='auto', probing server/discover and falling back to initialize; use mode='legacy' to force the legacy handshake.

    2.0.0upgrade guide

  • Tracing is enabled by default: servers install tracing middleware and clients open spans per outbound request. When a global tracer provider is configured, outbound _meta receives a W3C traceparent field.

    2.0.0upgrade guide

  • httpx2 honors this environment variable to select a CA bundle before falling back to the system trust store.

    2.0.0upgrade guide

  • httpx2 honors this environment variable to select a CA bundle before falling back to the system trust store.

    2.0.0upgrade guide

  • On a 403 insufficient_scope challenge, re-authorization requests the union of previously requested and newly challenged scopes so earlier permissions are retained.

    2.0.0upgrade guide

Fixes and other changes 8

  • After a HeaderMismatch (-32020) rejection, the client re-lists tools and retries the call once.

    2.3.0release notes

  • A raising progress_callback no longer fails a call on an in-process Client(server).

    2.3.0release notes

  • On Windows, stdio_client resolves the executable off the event loop.

    2.3.0release notes

  • An explicit structuredContent null is now checked against the output schema instead of being treated as missing.

    2.3.0release notes

  • A refused opening request no longer leaves a session behind.

    2.2.0release notes

  • With client_secret_post, client-credentials token requests now include both client_id and client_secret, allowing servers requiring both to accept the exchange.

    2.0.0upgrade guide

  • The SDK registration endpoint now echoes all registered metadata, including application_type, and returns client_secret_expires_at as 0 when an issued secret never expires.

    2.0.0upgrade guide

  • Resource capabilities now report subscribe as true when an on_subscribe_resource handler is provided.

    2.0.0upgrade guide