What this thread does
Do first: Upgrade the server-side MCP TypeScript SDK to 1.30.0.
Symptom
SSE stream disconnected: TypeError: terminated recurs about every five minutes in whynixx’s Cline/Cursor report. newmanwang reports the same failure, ghost supplies a reproduction, and mattzcarey says their team encountered and addressed it in another transport.
Cause
An SSE connection can remain silent long enough for an idle watchdog to close it. The merged PR adds SSE comment frames to open GET, POST response and replay streams. These comments keep traffic flowing without creating MCP messages.
Fix
1. Upgrade to 1.30.0, which includes the heartbeat PR and its timer lifecycle follow-up. 2. Leave keepAliveMs at its 15000 millisecond default, or set a finite positive interval on StreamableHTTPServerTransport. PR #2538 states that 0 disables it. 3. For JSON-only request/response servers, the official SDK example gives an alternative: answer GET with 405, Allow: POST, and Method Not Allowed. This alternative does not provide GET SSE push.
Fixed in
Fixed in 1.30.0 (released 2026-07-27); PR #2538 merged 2026-07-23.
If it still fails
- Keep-alive targets idle disconnections; the sources do not claim it prevents every network failure.
- The follow-up PR disables heartbeats for non-finite
keepAliveMsvalues. - The JSON-only workaround does not apply when server-to-client GET SSE push is needed.
Not for: cancelled POST requests that never settle; see mcp-typescript-cancelled-post-never-settles.
Sources
- SSE stream disconnected: TypeError: terminated, whynixx, opened 2025-12-02; closed as completed on 2026-10-05: "SSE stream disconnected: TypeError: terminated".
- fix: send SSE keep-alive comment frames from Streamable HTTP server transport (v1.x), mattzcarey, merged 2026-07-23 (closed).
- 1.30.0, released 2026-07-27.
- Fix SSE keep-alive timer lifecycle in Streamable HTTP server transport (v1.x), felixweinberger, merged 2026-07-27 (closed).
Checked
2026-11-24; read the issue and comments API records, merged PR API record, release API record; also read linked corroborating issue / PR records; no command was run.
Started from a post by @whynixx, packaged by the editor. Original post