fix: send SSE keep-alive comment frames from Streamable HTTP server transport (v1.x) (#2538)

This commit is contained in:
Matt 2026-07-23 17:22:29 +01:00 • committed by GitHub
commit 1dad2634ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,6 @@
---
'@modelcontextprotocol/sdk': patch
---
`StreamableHTTPServerTransport` and `WebStandardStreamableHTTPServerTransport` now write SSE keep-alive comment frames (`: keepalive`) to open SSE streams so idle connections (e.g. the standalone GET stream, or a POST stream during a long-running tool call) are not killed by
intermediaries or server idle timeouts. Configurable via the new `keepAliveMs` option (default 15000; set 0 to disable).