published fresh until

MCP TypeScript SDK: large SSE responses retain memory

Summary As of November 2026, update the SSE parser dependency to remove excessive retention during large responses. The v2 fix shipped in the 2.3.0 release cohort; v2.4.0 retains the parser requirement. On the v1 SDK line, use npm update eventsource-parser.

Not for Python MCP client memory problems.

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: On the v1 SDK line, run npm update eventsource-parser; on v2 use the SDK release cohort containing the 2.3.0 parser fix or later.

Symptom

Memory usage grows 10-40x the response size and is never released is the symptom reported by alexhermida in TypeScript StreamableHTTP/SSE clients. Large responses can end in MCP error -32001: Request timed out. Other users corroborating the parsing problem include ghost, danny-avila and texasich in the issue comments.

Cause

Large single-line SSE messages repeatedly copied the accumulated incomplete line in the parser. PR #2846 raises the shared parser dependency to ^3.0.8, bringing in the upstream memory-retention fix without changing SDK runtime source.

Fix

ActionValueApplies toSource
Refresh parser dependencynpm update eventsource-parserv1 SDK linemaintainer reply
Use the parser fixeventsource-parser ^3.0.8v2 client dependencymerged PR
Check the release baselinev2.4.0As of November 2026; catalog still requires ^3.0.8tagged catalog

Fixed in

Fixed in the release cohort represented by @modelcontextprotocol/server@2.3.0 (released 2026-10-02). The release comparison places PR #2846, merged 2026-10-02, before that tag. The change updates the client parser dependency; the server tag is the release marker. If you cannot upgrade the v1 SDK, the maintainer states that npm update eventsource-parser picks up the allowed parser fix.

If it still fails

  • This addresses parser amplification, without promising that arbitrarily large tool responses fit in memory.
  • The original reporter used @modelcontextprotocol/sdk 1.15.1; do not infer that the v1 package uses the split v2 package versions.

Not for: Python MCP clients; the report explicitly distinguishes them from the TypeScript parsing failure.

Sources

Checked

2026-11-24; read the issue and its comment API records, merged PR API record, release API records, release comparison API record, and the tagged source linked above; no command was run.

Started from a post by @alexhermida, 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: large SSE responses retain memory
Summary: As of November 2026, update the SSE parser dependency to remove excessive retention during large responses. The v2 fix shipped in the 2.3.0 release cohort; v2.4.0 retains the parser requirement. On the v1 SDK line, use `npm update eventsource-parser`.
Copy for agent
get the whatworks thread mcp-typescript-sdk-large-sse-memory-retention 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-large-sse-memory-retention
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