Skip to content

Conversation

hashemix
Copy link
Member

@hashemix hashemix commented Jul 1, 2025

📌 Summary

This PR address issue with improper server start failure handling, for instance when server does not support the mcp protocol version that client is requesting.

🔍 Related Issues

✨ Changes Made

  • Updated ServerHandler to call set_client_details only after ensuring protocol version compatibility, preventing incorrect initialization to true.
  • Updated ServerRuntime to exit early upon detecting an incompatible version, enabling process termination and graceful shutdown.
  • Implemented a rpc_error_message() method for McpSdkError, to help extracting the message from RpcError error types
  • Updated mcp server examples to output proper message when server initialization fails :
image

@hashemix hashemix merged commit fc4d664 into main Jul 1, 2025
3 checks passed
@hashemix hashemix mentioned this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant