Agent InfrastructureAutomated release watch

MCP Python SDK v2.2.0

MCP Python SDK v2.2.0 introduces stricter security defaults, including origin-only HTTP redirects and OAuth metadata issuer checks, alongside session expiration limits for legacy Streamable HTTP.

Human read

Why this signal matters

The MCP Python SDK has been updated to version 2.2.0, introducing several behavioral changes and security-focused defaults: - HTTP Redirects: The HTTP client, Streamable HTTP client, SSE client, and OAuth providers now only follow redirects within the endpoint's origin (same scheme, host, and port, or an upgrade to HTTPS on the same host). Cross-origin redirects will fail with MCPError or HTTPStatusError rather than being automatically followed. - Idle Session Management: Stateful Streamable HTTP sessions (legacy <=2025-11-25 spec) now expire after 30 minutes of inactivity, returning a 404 on subsequent requests. Server instances also now cap concurrent sessions at 10,000 by default (returning 503 if exceeded). Clients holding open GET streams and stateless configurations are unaffected. These limits can be disabled by passing None to session idle timeout and max sessions. - OAuth Enforcement: The authorization server metadata issuer is now validated across legacy discovery paths, failing with OAuthFlowError if it does not match the server's origin. Requests failing with a 5xx/429 during protected resource metadata retrieval no longer fall back to legacy endpoints. - Deprecations: Added deprecation warnings for ClientCredentialsOAuthProvider / PrivateKeyJWTOAuthProvider initialized without issuer=, and AuthSettings where resource server url is set but validate token resource is unset. Both will become strict requirements in 3.0. - Fixes: Fixed session leakage on client DELETE requests or refused initializations, and restricted tool outputSchema $ref resolution strictly to…

Agent parse

Actionable summary

MCP Python SDK v2.2.0 updates HTTP client redirect policies to restrict follow-through to the same origin, introduces automatic 30-minute idle session timeouts (and a 10,000 max session cap) for stateful Streamable HTTP servers, enforces strict issuer validation across OAuth discovery paths, and adds deprecation warnings for upcoming 3.0 requirements.

Agent usefulness
77/100
Confidence
96%
Canonical data
JSON + Markdown
Next actions

What builders should check

  • Verify endpoint URLs if your MCP setup relies on cross-origin redirects, and update client configs to point directly to the destination origin.
  • Set session idle timeout=None and max sessions=None on Streamable HTTP servers if your deployment requires long-lived idle sessions or more than 10,000 concurrent sessions.
  • Add the explicit issuer= argument to ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider instances ahead of the 3.0 release.
  • Explicitly configure AuthSettings.validate token resource to True or False to clear deprecation warnings.
Classification

Tags and routing

mcpsdkpython
Related signals

Continue the thread