Skip to content

Back to the catalog

MCP Python SDK v2.2.0
github.comother

MCP Python SDK v2.2.0

Release notes for MCP Python SDK v2.2.0 detailing several security-relevant default changes: HTTP clients (Client, streamable_http_client, sse_client) now only follow redirects within the same origin, closing a cross-origin redirect trust gap; OAuth clients now validate the authorization server's issuer even on the legacy (non-protected-resource-metadata) discovery path, preventing metadata/issuer mismatch attacks; idle Streamable HTTP sessions now expire after 30 minutes with a 10,000-session cap to limit resource exhaustion; and a new AuthSettings.validate_token_resource setting lets servers reject bearer tokens not issued for them (audience/resource confusion). Deprecation warnings push OAuth provider configs toward requiring an explicit issuer ahead of a 3.0 breaking change.

TL;DR MCP Python SDK v2.2.0 tightens redirect origin-scoping, OAuth issuer validation, session expiry limits, and adds token-resource-audience checks.
Also seen from another angle🧠 AI →

Organisations named here

  • MCPDeprecationWarning

Technologies named here

  • MCP Python SDK
  • Model Context Protocol
  • Python
  • OAuth

Techniques named here

  • Open redirect / cross-origin redirect following
  • Authorization server metadata issuer spoofing
  • Session exhaustion via unbounded idle sessions
  • Bearer token audience/resource confusion