Skip to content

Commit 7a6c89d

Browse files
Restore original create_mcp_http_client default timeout
Remove the read timeout parameter from the default timeout that was incorrectly added. The original behavior uses a simple 30-second timeout for all operations when no custom timeout is provided. Callers that need longer read timeouts (like session_group for SSE streams) explicitly pass httpx.Timeout(30.0, read=300.0). This change restores the original behavior from the main branch.
1 parent 43dec02 commit 7a6c89d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/shared/_httpx_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def create_mcp_http_client(
7272

7373
# Handle timeout
7474
if timeout is None:
75-
kwargs["timeout"] = httpx.Timeout(MCP_DEFAULT_TIMEOUT, read=MCP_DEFAULT_SSE_READ_TIMEOUT)
75+
kwargs["timeout"] = httpx.Timeout(MCP_DEFAULT_TIMEOUT)
7676
else:
7777
kwargs["timeout"] = timeout
7878

0 commit comments

Comments
 (0)