fix(happy-cli): create per-request MCP transport for SDK >= 1.26.0#688
Open
davidrimshnick wants to merge 2 commits intoslopus:mainfrom
Open
fix(happy-cli): create per-request MCP transport for SDK >= 1.26.0#688davidrimshnick wants to merge 2 commits intoslopus:mainfrom
davidrimshnick wants to merge 2 commits intoslopus:mainfrom
Conversation
… crash @modelcontextprotocol/sdk 1.26.0 added a guard that throws when a stateless StreamableHTTPServerTransport is reused across requests. The Happy MCP server was creating a single transport at startup and reusing it, causing HTTP 500 on every request after the first. Create a fresh McpServer + transport per request, following the SDK's own simpleStatelessStreamableHttp.ts example. Fixes slopus#634 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies that the Happy MCP server handles multiple sequential requests without returning HTTP 500 — the core regression from @modelcontextprotocol/sdk >= 1.26.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@modelcontextprotocol/sdk@1.26.0(released Feb 4, 2026) added a guard that throws when a statelessStreamableHTTPServerTransportis reused across requestsMcpServer+StreamableHTTPServerTransportper request, following the SDK's ownsimpleStatelessStreamableHttp.tsexampleFixes #634
Test plan
startHappyServer.test.tsthat verify:happy-coderwith@modelcontextprotocol/sdk@1.26.0+, start a session, and verifymcp__happy__change_titleworks on repeated calls🤖 Generated with Claude Code