Skip to content

Conversation

@taobaorun
Copy link

Motivation and Context

In numerous real-world MCP service invocation cases, we have observed that when Server-Sent Events (SSE) connections are disrupted due to server-side maintenance operations or network instability, clients often fail to promptly detect these disconnection events. This delay in detection can lead to client instances becoming unavailable. There is a critical need for clients to reliably perceive connection status changes, enabling them to perform timely reinitialization actions such as establishing new connections and implementing effective connection monitoring strategies.

How Has This Been Tested?

This functionality has been validated in actual MCP service deployment environments. Testing scenarios included:

  • Simulated server maintenance events that intentionally terminated SSE connections

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@taobaorun
Copy link
Author

Hey @tzolov @chemicL ,could you please take a look at this PR when you have a moment?

This change addresses an issue where MCP clients can become unresponsive due to undetected SSE connection drops. It ensures clients can reliably detect disconnections to enable timely reconnection and maintain service availability.

@taobaorun taobaorun changed the title client transport support connection closed event feat: Client transport support connection closed event Oct 27, 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