Skip to content

fix: address issue with improper server start failure handling - #72

Merged
hashemix merged 1 commit into
mainfrom
fix/issue-69-proper-handling-of-start-failure
Jul 1, 2025
Merged

fix: address issue with improper server start failure handling#72
hashemix merged 1 commit into
mainfrom
fix/issue-69-proper-handling-of-start-failure

Conversation

@hashemix

@hashemix hashemix commented Jul 1, 2025

Copy link
Copy Markdown
Member

📌 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