-
Notifications
You must be signed in to change notification settings - Fork 554
Sends a heartbeat (ping) to all connected clients to keep connection… #353
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
base: main
Are you sure you want to change the base?
Conversation
…s alive. This method sends ping notifications to all active sessions without expecting a response, which helps prevent connection timeouts. @return A Mono that completes when heartbeat has been sent to all sessions
Sends a heartbeat (ping) to all connected clients to keep connections alive. This method sends ping notifications to all active sessions without expecting a response, which helps prevent connection timeouts. |
@FrolikovEA can you elaborate on this? What connection timeouts do you see. |
Good afternoon @tzolov
|
I am wondering if it wasn't easier if we exposed Why in the Mcp*Server instead of transport? Because it's a domain level method meant for heartbeat and the domain level methods are there and also in |
TODO: PING is a Temporary solution: @FrolikovEA could you try using the existing McpAsyncServer#loggingNotification and McpSyncServer#loggingNotification methods that already broadcast to all connected clients? Still PING's advantage might be its silent acknowledgment with empty responses, providing bidirectional communication validation. Alternative: In system-design to setup a heart-beat, one would use HTTP keep-alive configuration with an HTTP proxy server for production MCP deployments - likely the standard cloud setup anyway. |
…s alive. This method sends ping notifications to all active sessions without expecting a response, which helps prevent connection timeouts.
@return A Mono that completes when heartbeat has been sent to all sessions
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context