We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd826cc commit 9d65e5aCopy full SHA for 9d65e5a
src/mcp/client/websocket.py
@@ -42,12 +42,6 @@ async def websocket_client(url: str) -> AsyncGenerator[
42
43
# Connect using websockets, requesting the "mcp" subprotocol
44
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
-
51
async def ws_reader():
52
"""
53
Reads text messages from the WebSocket, parses them as JSON-RPC messages,
0 commit comments