MCP Python SDK 2.2.0 Restricts HTTP Redirects to Same-Origin Endpoints

The MCP Python SDK version 2.2.0, released on September 7, now limits HTTP redirect-following to requests that remain within the same scheme, host, and port as the originally configured endpoint. This change addresses a security concern where redirects could silently route authenticated sessions or OAuth tokens to unintended third-party servers. The update applies uniformly across standard client connections, Streamable HTTP, and SSE transports, as well as OAuth authorization flows. HTTP-to-HTTPS upgrades on the same host are still permitted, and rejected redirects leave the existing session intact rather than terminating it. Developers are advised to explicitly configure any new endpoint URLs rather than relying on cross-origin redirects as a migration mechanism.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in