Skip to content

Commit 60c0420

Browse files
aryanmotgiaryanmotgiKludex
authored
docs: correct create_mcp_http_client default timeout docstring (#2683)
Co-authored-by: aryanmotgi <carecompanioninc@gmail.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
1 parent c91f406 commit 60c0420

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/mcp/shared/_httpx_utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +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 of 30 seconds if not specified
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.
37-
Defaults to 30 seconds 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).
3836
auth: Optional authentication handler.
3937
4038
Returns:

0 commit comments

Comments
 (0)