Skip to content

Commit 0ae7b66

Browse files
committed
refactor: move stdio package to its own module
1 parent a1d330d commit 0ae7b66

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/mcp/client/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@
33
from mcp.client.client import Client
44
from mcp.client.session import ClientSession
55

6-
__all__ = [
7-
"Client",
8-
"ClientSession",
9-
]
6+
__all__ = ["Client", "ClientSession"]

src/mcp/client/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ def __init__(
6666
self,
6767
server: Server[Any] | FastMCP,
6868
*,
69-
# TODO(Marcelo): When do `raise_exceptions=True` actually raises?
69+
# Note: raise_exceptions only affects transport/stream errors and exceptions
70+
# that escape request handlers. Tool exceptions in FastMCP are caught by
71+
# the call_tool decorator and converted to error results. See test_client.py
72+
# test_raise_exceptions_returns_error_result_for_tool_exceptions for details.
7073
raise_exceptions: bool = False,
7174
read_timeout_seconds: float | None = None,
7275
sampling_callback: SamplingFnT | None = None,

src/mcp/client/session_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
class SseServerParameters(BaseModel):
33-
"""Parameters for intializing a sse_client."""
33+
"""Parameters for initializing a sse_client."""
3434

3535
# The endpoint URL.
3636
url: str
@@ -46,7 +46,7 @@ class SseServerParameters(BaseModel):
4646

4747

4848
class StreamableHttpParameters(BaseModel):
49-
"""Parameters for intializing a streamable_http_client."""
49+
"""Parameters for initializing a streamable_http_client."""
5050

5151
# The endpoint URL.
5252
url: str

src/mcp/client/websocket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from websockets.asyncio.client import connect as ws_connect
99
from websockets.typing import Subprotocol
1010

11-
import mcp.types as types
11+
from mcp import types
1212
from mcp.shared.message import SessionMessage
1313

1414

0 commit comments

Comments
 (0)