@@ -54,11 +54,11 @@ class StdioConnection(TypedDict):
54
54
The text encoding error handler.
55
55
56
56
See https://docs.python.org/3/library/codecs.html#codec-base-classes for
57
- explanations of possible values
57
+ explanations of possible values.
58
58
"""
59
59
60
60
session_kwargs : dict [str , Any ] | None
61
- """Additional keyword arguments to pass to the ClientSession"""
61
+ """Additional keyword arguments to pass to the ClientSession. """
62
62
63
63
64
64
class SSEConnection (TypedDict ):
@@ -68,19 +68,19 @@ class SSEConnection(TypedDict):
68
68
"""The URL of the SSE endpoint to connect to."""
69
69
70
70
headers : dict [str , Any ] | None
71
- """HTTP headers to send to the SSE endpoint"""
71
+ """HTTP headers to send to the SSE endpoint. """
72
72
73
73
timeout : float
74
- """HTTP timeout"""
74
+ """HTTP timeout. """
75
75
76
76
sse_read_timeout : float
77
- """SSE read timeout"""
77
+ """SSE read timeout. """
78
78
79
79
session_kwargs : dict [str , Any ] | None
80
- """Additional keyword arguments to pass to the ClientSession"""
80
+ """Additional keyword arguments to pass to the ClientSession. """
81
81
82
82
httpx_client_factory : McpHttpClientFactory | None
83
- """Custom factory for httpx.AsyncClient (optional)"""
83
+ """Custom factory for httpx.AsyncClient (optional). """
84
84
85
85
86
86
class StreamableHttpConnection (TypedDict ):
@@ -100,13 +100,13 @@ class StreamableHttpConnection(TypedDict):
100
100
All other HTTP operations are controlled by `timeout`."""
101
101
102
102
terminate_on_close : bool
103
- """Whether to terminate the session on close"""
103
+ """Whether to terminate the session on close. """
104
104
105
105
session_kwargs : dict [str , Any ] | None
106
- """Additional keyword arguments to pass to the ClientSession"""
106
+ """Additional keyword arguments to pass to the ClientSession. """
107
107
108
108
httpx_client_factory : McpHttpClientFactory | None
109
- """Custom factory for httpx.AsyncClient (optional)"""
109
+ """Custom factory for httpx.AsyncClient (optional). """
110
110
111
111
112
112
class WebsocketConnection (TypedDict ):
@@ -133,7 +133,7 @@ async def _create_stdio_session(
133
133
encoding_error_handler : Literal ["strict" , "ignore" , "replace" ] = DEFAULT_ENCODING_ERROR_HANDLER ,
134
134
session_kwargs : dict [str , Any ] | None = None ,
135
135
) -> AsyncIterator [ClientSession ]:
136
- """Create a new session to an MCP server using stdio
136
+ """Create a new session to an MCP server using stdio.
137
137
138
138
Args:
139
139
command: Command to execute
@@ -176,7 +176,7 @@ async def _create_sse_session(
176
176
session_kwargs : dict [str , Any ] | None = None ,
177
177
httpx_client_factory : McpHttpClientFactory | None = None ,
178
178
) -> AsyncIterator [ClientSession ]:
179
- """Create a new session to an MCP server using SSE
179
+ """Create a new session to an MCP server using SSE.
180
180
181
181
Args:
182
182
url: URL of the SSE server
@@ -207,13 +207,13 @@ async def _create_streamable_http_session(
207
207
session_kwargs : dict [str , Any ] | None = None ,
208
208
httpx_client_factory : McpHttpClientFactory | None = None ,
209
209
) -> AsyncIterator [ClientSession ]:
210
- """Create a new session to an MCP server using Streamable HTTP
210
+ """Create a new session to an MCP server using Streamable HTTP.
211
211
212
212
Args:
213
213
url: URL of the endpoint to connect to
214
214
headers: HTTP headers to send to the endpoint
215
215
timeout: HTTP timeout
216
- sse_read_timeout: How long (in seconds) the client will wait for a new event before disconnecting.
216
+ sse_read_timeout: How long (in seconds) the client will wait for a new event before disconnecting
217
217
terminate_on_close: Whether to terminate the session on close
218
218
session_kwargs: Additional keyword arguments to pass to the ClientSession
219
219
httpx_client_factory: Custom factory for httpx.AsyncClient (optional)
@@ -236,7 +236,7 @@ async def _create_websocket_session(
236
236
url : str ,
237
237
session_kwargs : dict [str , Any ] | None = None ,
238
238
) -> AsyncIterator [ClientSession ]:
239
- """Create a new session to an MCP server using Websockets
239
+ """Create a new session to an MCP server using Websockets.
240
240
241
241
Args:
242
242
url: URL of the Websocket endpoint
0 commit comments