Skip to content

Commit 4952456

Browse files
author
patrick.rump
committed
Allow kwargs down in AsyncClient when instantiating sse or streamable_http clients.
- Shorten documentation strings.
1 parent 5771222 commit 4952456

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/mcp/client/sse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ async def sse_client(
3434
`sse_read_timeout` determines how long (in seconds) the client will wait for a new
3535
event before disconnecting. All other HTTP operations are controlled by `timeout`.
3636
37-
`**client_kwargs` : dict, optional - Additional http client configurations used to configure the AsyncClient.
37+
`**client_kwargs` : dict, optional - Additional http client configurations used
38+
to configure the AsyncClient.
3839
3940
"""
4041
read_stream: MemoryObjectReceiveStream[SessionMessage | Exception]

src/mcp/client/streamable_http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ async def streamablehttp_client(
442442
`sse_read_timeout` determines how long (in seconds) the client will wait for a new
443443
event before disconnecting. All other HTTP operations are controlled by `timeout`.
444444
445-
`**client_kwargs` : dict, optional - Additional http client configurations used to configure the AsyncClient.
445+
`**client_kwargs` : dict, optional - Additional http client configurations used
446+
to configure the AsyncClient.
446447
447448
Yields:
448449
Tuple containing:

src/mcp/shared/_httpx_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def create_mcp_http_client(
2222
headers: Optional headers to include with all requests.
2323
timeout: Request timeout as httpx.Timeout object.
2424
Defaults to 30 seconds if not specified.
25-
client_kwargs : dict[str, Any], optional. Used to configure the AsyncClient.
25+
client_kwargs : dict[str, Any]. Optional. To configure the AsyncClient.
2626
2727
Returns:
2828
Configured httpx.AsyncClient instance with MCP defaults.

0 commit comments

Comments
 (0)