This release fixes a critical issue affecting streamable-http transport where sessions were terminated immediately after initialization, preventing subsequent API calls in containerized environments.
๐ Fixed
Streamable-HTTP Session Management: Resolved session termination issue where HTTP transports (SSE and streamable-http) incorrectly used stdin monitoring, causing premature shutdown when clients closed their stdin. This prevented the initialize โ tools/list flow from working correctly, with sessions being terminated and returning "Received request before initialization was complete" errors. The fix ensures HTTP transports rely solely on OS signals for shutdown while stdio transport continues to work correctly (#524)
๐งช Testing
Transport Lifecycle Test Suite: Added comprehensive test coverage for transport lifecycle behavior to prevent regression of stdin monitoring issues. The new tests verify that stdio transport correctly bypasses lifecycle monitoring while HTTP transports (SSE, streamable-http) use proper signal-based shutdown. These tests would have caught both issue #519 and #524 before shipping by detecting the race condition between MCP's stdio handler and lifecycle monitoring (#523)
โ๏ธ Internal
Removed Flawed Lifecycle Function: Completely removed the run_with_stdio_monitoring function that was the root cause of both this issue and the previous stdio transport issue (#519). This function was fundamentally incompatible with MCP's architecture as it conflicted with the protocol's own use of stdin for communication. After the fixes in v0.11.4 and this release, the function was dead code and has been removed to prevent future issues.
Full Changelog: v0.11.4...v0.11.5