-
Notifications
You must be signed in to change notification settings - Fork 786
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
AttributeError: 'JSONRPCMessage' object has no attribute 'message' in MCP 1.4.0 #280
Comments
I encountered the same issue. Upon further investigation of the error, I discovered that the type of python-sdk/src/mcp/shared/session.py Line 324 in ebb81d3
This appears to be happening because the server extracts the inner python-sdk/src/mcp/server/stdio.py Lines 85 to 86 in ebb81d3
|
Set MCP dependency to <1.4 for compatibility and replaced a custom logging utility with standard `logging` module setup. This improves maintainability and ensures consistent behavior with logging configurations. See also: modelcontextprotocol/python-sdk#280
Same here |
1 similar comment
Same here |
Yeah, it seems this line: python-sdk/src/mcp/server/stdio.py Lines 85 to 86 in ebb81d3
Should have been I would prefer to revert #239 - not really because of this, but because of the type changes. |
+1 having this issue |
Same here |
The fix was released in mcp 1.4.1. FYI |
Fixed in v1.4.1. @Kludex we need to revisit this, but we need to have a way for servers to get access to the raw http request, in order to get access to headers ,etc. |
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of tools and prompts listing functionality Note: Resource listing tests are currently skipped due to modelcontextprotocol#268.
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
This commit introduces end-to-end tests to detect potential miscommunication issues between servers and clients (e.g. modelcontextprotocol#280). The implementation includes: - Basic end-to-end test suite using an Echo server - Verification of session initialization - Testing of resource templates, tools, and prompts listing functionality
Describe the bug
I encountered an
AttributeError
when running the example code from MCP Quickstart - Client with MCP version 1.4.0. The error suggests that theJSONRPCMessage
object is missing themessage
attribute. This issue does not occur with MCP 1.3.0.To Reproduce
Steps to reproduce the behavior:
Install MCP version 1.4.0:
Run the example client code from the MCP Quickstart.
Observe the following error:
Expected behavior
The client should run without raising an
AttributeError
, as it does with MCP 1.3.0.Desktop (please complete the following information):
Additional context
JSONRPCMessage
class no longer has amessage
attribute in version 1.4.0, but this is just based on the traceback.Would appreciate any insights on whether this is an intended change or a regression. Thanks!
The text was updated successfully, but these errors were encountered: