MCP Python SDK redirect rule: which Sume URL avoids a redirect

MCP Python SDK 2.2.0 follows redirects only within the endpoint's origin. Sume answers POST on https://mcp.sume.com/mcp and on the host root directly.

4 min readSume
All posts

Pass https://mcp.sume.com/mcp to the MCP Python client. Sume's server handles POST on that path directly, so there is no redirect for the 2.2.0 same-origin rule to block. A POST to the host root also works, as a compatibility route.

SDK behavior is from the v2.2.0 release notes; Sume's routes are from the MCP server source and OAuth docs, read 2026-10-01.

Which redirects does 2.2.0 still follow?

Per the release notes, only those that keep the scheme, host and port the same, or upgrade http to https on the same host. Anything else fails with MCPError and leaves the session usable.

Redirect cases from the MCP Python SDK v2.2.0 release notes, read 2026-10-01.
Redirect targetFollowed?
Same scheme, host and portYes
http to https on the same hostYes
A different host or portNo: MCPError

Which Sume URLs answer a POST without redirecting?

The server registers POST /mcp and POST /. Its routing code names the host origin as the compatibility endpoint and the resource URL as the canonical one, and the OAuth docs tell the client to connect to https://mcp.sume.com/mcp. Both live on mcp.sume.com, so a client that falls back to the root stays in the same origin.

What if my config points at another host?

Then 2.2.0 will not follow a redirect there; the notes say to use the other URL as the endpoint if that is the server you meant. For Sume that means the MCP host, not the API host. Use the canonical path exactly as documented.

Do I still need follow_redirects?

No. The notes say the setting on a passed-in httpx2.AsyncClient is no longer used for MCP requests. With a direct URL nothing needs following in the first place. Session handling is a separate topic: see the idle-session post.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume