Skip to content

fix(client): preserve Streamable HTTP request provenance - #2667

Open
edenbuilds wants to merge 2 commits into
modelcontextprotocol:mainfrom
edenbuilds:codex/fix-stream-provenance-2659
Open

fix(client): preserve Streamable HTTP request provenance#2667
edenbuilds wants to merge 2 commits into
modelcontextprotocol:mainfrom
edenbuilds:codex/fix-stream-provenance-2659

Conversation

@edenbuilds

Copy link
Copy Markdown

Summary

  • preserve the originating client request ID across a Streamable HTTP POST SSE response stream
  • expose it through the existing MessageExtraInfo callback carrier for server-initiated JSON-RPC requests
  • keep standalone GET messages and normal responses backward-compatible
  • add a client patch changeset and transport regression test

Verification

  • Regression proof: before the source change, the focused test received no attributed server request.
  • After the fix: streamableHttp.test.ts passes 70/70.
  • @modelcontextprotocol/client typecheck passes.
  • @modelcontextprotocol/core-internal typecheck passes.
  • Prettier and git diff --check pass.

Fixes #2659

…tprotocol#2659)

Expose the originating client request ID when a server-initiated JSON-RPC
request arrives on that request's SSE response stream.

Fixes modelcontextprotocol#2659
@edenbuilds
edenbuilds requested a review from a team as a code owner August 15, 2026 23:55
@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d363e64

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

This PR includes changesets to release 6 packages
Name Type
@modelcontextprotocol/client Patch
@modelcontextprotocol/core Patch
@modelcontextprotocol/server Patch
@modelcontextprotocol/server-legacy Patch
@modelcontextprotocol/codemod Patch
@modelcontextprotocol/core-internal 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 Aug 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2667

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2667

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2667

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2667

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2667

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2667

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2667

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2667

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2667

commit: d363e64

Refresh the PR base after upstream's cancellation request ID 0 fix while
preserving the Streamable HTTP provenance change.
@edenbuilds

Copy link
Copy Markdown
Author

Refreshed this branch onto the current upstream/main without rewriting history (d363e64). The diff against upstream remains limited to the Streamable HTTP provenance fix, its regression test, and the changeset. All 14 reported CI checks are green; ready for maintainer review.

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

Labels

None yet

Projects

None yet

1 participant