From 677bb34f781e6970eda309d55aad4075a6f09d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Schr=C3=B6der?= Date: Tue, 25 Feb 2025 18:46:12 +0100 Subject: [PATCH] Update sse client to follow redirects --- src/mcp/client/sse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcp/client/sse.py b/src/mcp/client/sse.py index abafacb9..0620ac7f 100644 --- a/src/mcp/client/sse.py +++ b/src/mcp/client/sse.py @@ -43,7 +43,7 @@ async def sse_client( async with anyio.create_task_group() as tg: try: logger.info(f"Connecting to SSE endpoint: {remove_request_params(url)}") - async with httpx.AsyncClient(headers=headers) as client: + async with httpx.AsyncClient(headers=headers, follow_redirects=True) as client: async with aconnect_sse( client, "GET",