Outbound requests on 2025-11-25 and earlier connections no longer carry an empty "_meta" or empty "params", and tools with invalid x-mcp-header annotations now raise InvalidSignature at registration instead of being silently dropped by clients. Also adds a max_sse_event_size option and requires httpx2>=2.10.0.
Python SDK
npx @buildinternet/releases get mcp-python-sdkStateful Streamable HTTP sessions idle for 30 minutes now close by default and servers cap at 10 000 concurrent sessions, both configurable via session_idle_timeout and max_sessions; HTTP clients now follow redirects only within the endpoint's origin. Also adds AuthSettings.validate_token_resource and issuer= on the pre-provisioned OAuth providers, with MCPDeprecationWarnings for omitting them ahead of 3.0.
Streamable HTTP and SSE clients now follow redirects only within the endpoint's origin, and a stateful Streamable HTTP session idle for 30 minutes is closed, with servers capped at 10,000 concurrent sessions. The OAuth client also rejects authorization server metadata whose issuer mismatches, and two new DeprecationWarnings cover providers without issuer= and AuthSettings with resource_server_url but unset validate_token_resource.
Imports of mcp.server.fastmcp on 2.0.x now point at the migration guide, backported as a one-off because many users were hitting the error. Users should either pin mcp<2 or upgrade to 2.
Imports of mcp.server.fastmcp now point at the migration guide.
Unexpected exceptions from tool, resource, or prompt handlers are now logged at ERROR and the client sees only "Error executing tool " instead of the exception text, and content-block return annotations lose outputSchema and structuredContent unless structured_output=True is passed. Also adds direct StdioServerParameters support for Client, Image and Audio prompt messages, and a 4 MiB body limit on SSE and OAuth endpoints.
The request body limit now applies to the SSE and OAuth endpoints. Recursive tool return types get an object-rooted output schema, and the FastMCP Settings model is completed at import time.
The stable v2 release supports the 2026-07-28 protocol revision while still serving every 2025-era client from the same server, renames FastMCP to MCPServer, and replaces v1's transport-plus-ClientSession-plus-initialize layering with a single Client object. Adds multi-round-trip requests with Resolve(fn) dependency injection, pluggable extension APIs, default-on OpenTelemetry tracing, and a standalone mcp-types package; v1.x moves to maintenance mode with security fixes only.
Streamable HTTP request body limits are now enforced, and Context.report_progress() routes to the originating request stream. Tool-name validation now rejects trailing newlines.
The first v2 release candidate completes the public API cleanup, removing Context.client_id, RFC7523OAuthClientProvider, OAuthClientProvider's timeout parameter, and FileResource.is_binary, and renaming scopes= to scope= on client-credentials OAuth providers. Stdio servers now decide the protocol era from the opening request and serve from private stdin/stdout duplicates so stray prints can't corrupt the JSON-RPC stream.
The SDK's HTTP stack now runs on httpx2 (>=2.5.0), replacing httpx and httpx-sse, with TLS verification moved to the OS trust store, loggers renamed to httpx2 and httpcore2.*, and SSE GET streams sending Accept: application/json, text/event-stream. Also added a client-side subscriptions/listen driver, request cancellation over the 2026 transports, resolver DI for sampling and roots, and trailing-newline rejection in tool-name validation.
First v2 beta replaces the session-centric internals with a dispatcher/runner pipeline and supports the stateless 2026-07-28 protocol, including server/discover, multi-round-trip requests, and header-based routing. FastMCP is renamed MCPServer, a new Client speaks every protocol version via mode='auto', and protocol types move to a standalone mcp-types package; roots, sampling, and logging/setLevel are deprecated per SEP-2577.
StreamableHTTP per-request streams are now buffered with the priming event stored before dispatch, and the WebSocket server transport now supports TransportSecuritySettings. Also moved the package's Development Status classifier to Production/Stable.
Streamable HTTP now supports the 2026-07-28 stateless spec in both directions: each POST is self-describing with protocol version, client info, and capabilities in params._meta, and Client gains mode='legacy'|'auto'| with .discover() and .adopt(). Wire types move to a standalone mcp-types package, and mcp.types and mcp.shared.version are removed.
The SDK now ships generated per-version type packages for 2025-11-25 and 2026-07-28 wired into ServerRunner and ClientSession, so inbound and outbound traffic is validated against the negotiated protocol version and newer-only fields are stripped before reaching older peers. ClientSession was also rewritten on JSONRPCDispatcher, making server-initiated requests concurrent and containing raising callbacks instead of dropping the connection; BaseSession is removed.
The WebSocket transport (mcp.client.websocket, mcp.server.websocket) and the experimental tasks API now emit DeprecationWarning when called, with removal planned for v2; WebSocket was never part of the MCP specification. Also adds Python 3.14 support and omits null optional fields from task result payloads.
First v2 alpha replaces ServerSession with a Dispatcher pipeline, moves low-level Server handlers to constructor parameters with no auto-wrapping of return values, renames FastMCP to MCPServer, and switches field names to snake_case. It implements only the 2025-11-25 spec revision; full 2026-07-28 support is targeted for a 2026-06-30 beta and stable v2 for 2026-07-27.
Transport sessions are now bound to the authenticated principal, and experimental tasks are scoped to the session that created them. AccessToken now carries subject and claims.
Output schema generation now catches PydanticUserError for compatibility with pydantic 2.13, and OAuthClientMetadata coerces empty-string optional URL fields to None. Also restricts httpx to below 1.0.0 and imports SSEError from the httpx_sse public API.
The OAuth client now performs RFC 8707 resource validation, and StreamableHTTP sessions gain an idle timeout. Also fixes non-UTF-8 bytes on stdio server stdin, ClosedResourceError when a transport closes mid-request, and a command injection in the example URL opening.


