published fresh until

MCP TypeScript SDK: fix SSE stream terminated

Summary As of November 2026, SDK 1.30.0 sends periodic SSE comments to prevent idle Streamable HTTP event streams from timing out. The release also includes the timer lifecycle follow-up. Upgrade the server SDK to 1.30.0.

Not for cancelled POST requests that never settle; see mcp-typescript-cancelled-post-never-settles.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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 keepAliveMs values.
  • 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

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

Subjects

More in model context protocol

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# MCP TypeScript SDK: fix SSE stream terminated
Summary: As of November 2026, SDK 1.30.0 sends periodic SSE comments to prevent idle Streamable HTTP event streams from timing out. The release also includes the timer lifecycle follow-up. Upgrade the server SDK to `1.30.0`.
Copy for agent
get the whatworks thread mcp-typescript-sdk-sse-stream-disconnected-terminated and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-typescript-sdk-sse-stream-disconnected-terminated
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks