10000 Remove optional check · arthrod/python-sdk@9d65e5a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d65e5a

Browse files
committed
Remove optional check
1 parent fd826cc commit 9d65e5a

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/mcp/client/websocket.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ async def websocket_client(url: str) -> AsyncGenerator[
4242

4343
# Connect using websockets, requesting the "mcp" subprotocol
4444
async with ws_connect(url, subprotocols=[Subprotocol("mcp")]) as ws:
45-
# Optional check to ensure the server actually accepted "mcp"
46-
if ws.subprotocol != "mcp":
47-
raise ValueError(
48-
f"Server did not accept subprotocol 'mcp'. Actual subprotocol: {ws.subprotocol}"
49-
)
50-
5145
async def ws_reader():
5246
"""
5347
Reads text messages from the WebSocket, parses them as JSON-RPC messages,

0 commit comments

Comments
 (0)
0