File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,15 +27,12 @@ def create_mcp_http_client(
2727) -> httpx .AsyncClient :
2828 """Create a standardized httpx AsyncClient with MCP defaults.
2929
30- This function provides common defaults used throughout the MCP codebase:
31- - follow_redirects=True (always enabled)
32- - Default ``timeout`` tuned for long-lived SSE streams (see ``timeout`` below).
30+ Always enables follow_redirects and applies an SSE-friendly default timeout.
3331
3432 Args:
3533 headers: Optional headers to include with all requests.
36- timeout: Request timeout as httpx.Timeout object. Defaults to 30 seconds for
37- connect/write/pool and 300 seconds for read (to accommodate long-lived
38- SSE streams) if not specified.
34+ timeout: Request timeout as httpx.Timeout object. Defaults to 30s for
35+ connect/write/pool and 300s for read (for long-lived SSE streams).
3936 auth: Optional authentication handler.
4037
4138 Returns:
You can’t perform that action at this time.
0 commit comments