Uh oh!
There was an error while loading. Please reload this page.
fix(server): keep idle GET SSE streams alive - #2124
Conversation
🦋 Changeset detectedLatest commit: 2d2d3a7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client@modelcontextprotocol/codemod@modelcontextprotocol/core@modelcontextprotocol/server@modelcontextprotocol/server-legacy@modelcontextprotocol/express@modelcontextprotocol/fastify@modelcontextprotocol/hono@modelcontextprotocol/nodecommit: |
lppedd
commented
May 26, 2026
This seems to be working in prod. Patched my own library with the changes and all good. |
he-yufeng
commented
May 27, 2026
Rebased onto current main, added the server patch changeset, and force-pushed 7f08da4. Local validation: changeset status shows @modelcontextprotocol/server patch; server streamableHttp.test.ts passed with 41 tests; server typecheck and lint passed; git diff --check passed. |
31e3308 to
7f08da4Comparehe-yufeng
commented
May 27, 2026
Correction: the previous comment was posted after my first push attempt failed in the local pre-push hook with a transient pnpm workspace-state JSON parse error. I reran the push; pre-push typecheck, build, and lint all passed, and 7f08da4 is now pushed. |
7f08da4 to
b2e0f85Comparehe-yufeng
commented
Jun 6, 2026
Rebased on current Validated locally:
The pre-push hook also completed the repo-wide build, typecheck, and lint steps successfully. |
b2e0f85 to
fd1a9a2Comparehe-yufeng
commented
Jun 12, 2026
Rebased onto current Focused validation after the rebase: Result: server |
4e08ddb to
48a026bCompare48a026b to
44071feCompare# Conflicts: # packages/server/src/server/streamableHttp.ts
he-yufeng
commented
Jul 27, 2026
Closing this out. #2541 landed upstream and wires keep-alive comment frames into the same standalone GET SSE stream in WebStandardStreamableHTTPServerTransport, with a configurable keepAliveMs, timer cleanup on cancel/cleanup, and broader test coverage. This PR has nothing left to add. |
Summary
Fixes#1211.
Validation
pnpm --filter @modelcontextprotocol/server exec vitest run test/server/streamableHttp.test.ts -t "keep-alive"pnpm --filter @modelcontextprotocol/server exec vitest run test/server/streamableHttp.test.tspnpm --filter @modelcontextprotocol/server run typecheckpnpm --filter @modelcontextprotocol/server run lintgit diff --check