diff --git a/src/mcp/shared/_httpx_utils.py b/src/mcp/shared/_httpx_utils.py index 251469eaa1..23b2667da5 100644 --- a/src/mcp/shared/_httpx_utils.py +++ b/src/mcp/shared/_httpx_utils.py @@ -29,12 +29,13 @@ def create_mcp_http_client( This function provides common defaults used throughout the MCP codebase: - follow_redirects=True (always enabled) - - Default timeout of 30 seconds if not specified + - Default ``timeout`` tuned for long-lived SSE streams (see ``timeout`` below). Args: headers: Optional headers to include with all requests. - timeout: Request timeout as httpx.Timeout object. - Defaults to 30 seconds if not specified. + timeout: Request timeout as httpx.Timeout object. Defaults to 30 seconds for + connect/write/pool and 300 seconds for read (to accommodate long-lived + SSE streams) if not specified. auth: Optional authentication handler. Returns: