Skip to content

Align Streamable HTTP onclose type with Transport contract - #2154

Closed
cyq1017 wants to merge 2 commits into
modelcontextprotocol:mainfrom
cyq1017:codex/fix-2083-streamable-http-onclose-type
Closed

cyq1017 wants to merge 2 commits into
modelcontextprotocol:mainfrom
cyq1017:codex/fix-2083-streamable-http-onclose-type

Conversation

@cyq1017

@cyq1017 cyq1017 commented May 25, 2026

Copy link
Copy Markdown

Summary:\n- Align Streamable HTTP onclose declarations with Transport['onclose'].\n- Remove redundant onclose casts in the Node wrapper transport.\n- Add a typecheck-only fixture covering NodeStreamableHTTPServerTransport assignability to Transport and onclose = undefined.\n\nFixes #2083

@cyq1017
cyq1017 requested a review from a team as a code owner May 25, 2026 00:36
@changeset-bot

changeset-bot Bot commented May 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6693b49

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@modelcontextprotocol/node Patch
@modelcontextprotocol/server Patch

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

@pkg-pr-new

pkg-pr-new Bot commented May 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@2154

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/codemod@2154

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@2154

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@2154

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/fastify@2154

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@2154

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@2154

commit: 6693b49

@felixweinberger

Copy link
Copy Markdown
Contributor

Thanks for the PR. On v2 the assignability problem was fixed by #1766, released in 2.0.0; v1 still has it, which is what #2083 reports. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants