-
Notifications
You must be signed in to change notification settings - Fork 417
[BUG] Client can't to connect mcp sever SSE #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I had the same problem. I downgraded my mcp package to version 1.7.0. It was probably a compatibility issue with the new version: pip3 install mcp==1.7.0 |
In the mcp/shared/session.py the code is expecting to read SessionMessage, but it actually gets JSONRPCMessage and thus anywhere it says This is the commit in the mcp python SDK that introduced the change of wrapping messages into SessionMessage: |
Thanks @hyson666 @quantotto |
+1 |
There is a PR (#137) that addresses this issue. |
Thank you very much. |
app-1 | | File "/usr/local/lib/python3.13/site-packages/mcp/shared/session.py", line 209, in aexit
app-1 | | return await self._task_group.aexit(exc_type, exc_val, exc_tb)
app-1 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app-1 | | File "/usr/local/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
app-1 | | raise BaseExceptionGroup(
app-1 | | "unhandled errors in a TaskGroup", self._exceptions
app-1 | | ) from None
app-1 | | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
app-1 | +-+---------------- 1 ----------------
app-1 | | Traceback (most recent call last):
app-1 | | File "/usr/local/lib/python3.13/site-packages/mcp/server/session.py", line 146, in _receive_loop
app-1 | | await super()._receive_loop()
app-1 | | File "/usr/local/lib/python3.13/site-packages/mcp/shared/session.py", line 331, in _receive_loop
app-1 | | elif isinstance(message.message.root, JSONRPCRequest):
app-1 | | ^^^^^^^^^^^^^^^
app-1 | | File "/usr/local/lib/python3.13/site-packages/pydantic/main.py", line 989, in getattr
app-1 | | raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
app-1 | | AttributeError: 'JSONRPCMessage' object has no attribute 'message'
app-1 | +------------------------------------
The text was updated successfully, but these errors were encountered: