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
| Action | Value | Applies to | Source |
|---|---|---|---|
| Refresh parser dependency | npm update eventsource-parser | v1 SDK line | maintainer reply |
| Use the parser fix | eventsource-parser ^3.0.8 | v2 client dependency | merged PR |
| Check the release baseline | v2.4.0 | As of November 2026; catalog still requires ^3.0.8 | tagged 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/sdk1.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
- Memory leak in StreamableHTTP and SSE, alexhermida, opened 2025-07-16; closed as completed on 2026-10-02: "Memory leak in StreamableHTTP transport when processing large SSE responses."
- fix(client): update eventsource-parser for large SSE responses, Sthreal, merged 2026-10-02 (closed).
- @modelcontextprotocol/server@2.3.0, published 2026-10-02.
- v2.4.0, published 2026-10-23.
- v2.4.0 parser catalog, tagged source read 2026-11-24.
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