Skip to content

fix(node): forward response Set-Cookie fields separately - #2990

Draft
rudycelekli wants to merge 1 commit into
modelcontextprotocol:mainfrom
rudycelekli:codex/fix-node-set-cookie
Draft

rudycelekli wants to merge 1 commit into
modelcontextprotocol:mainfrom
rudycelekli:codex/fix-node-set-cookie

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 9, 2026 •

Copy link
Copy Markdown

Preserve separate Set-Cookie header values when adapting a web Response to Node. The adapter forwards getSetCookie() as a string array instead of losing earlier cookies during header iteration.

Validation: official package typecheck, ESLint and Prettier passed. 15 adapter tests passed with explicit source aliases for core-internal and server/_shims, matching tsconfig paths. Default Vitest collection remains blocked by private workspace exports pointing to unbuilt dist; core/server builds did not resolve that setup issue.

The cookie regression fails on unchanged source and passes after the fix. No default-runner, full SDK monorepo, or hosted CI pass is claimed. AI-assisted implementation and tests, independently reviewed before publishing this draft.

@changeset-bot

changeset-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5bb975d

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

This PR includes changesets to release 1 package
Name Type
@modelcontextprotocol/node 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 Oct 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

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

@modelcontextprotocol/codemod

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

@modelcontextprotocol/core

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

@modelcontextprotocol/server

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

@modelcontextprotocol/server-legacy

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

@modelcontextprotocol/express

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

@modelcontextprotocol/fastify

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

@modelcontextprotocol/hono

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

@modelcontextprotocol/node

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

commit: 5bb975d

@claude claude Bot added the v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes label Oct 10, 2026

@karaaslanz karaaslanz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent bounded verification of exact PR head 5bb975d6faf3aa08d86d56c8ef0946b7fb8ce9a6 (Node 22, real node:http response). I ran the changed header-forwarding block against a web Response with two separate Set-Cookie values. Baseline header iteration without getSetCookie() forwarded only the last cookie; the PR's getSetCookie() override passed both distinct values to a real Node HTTP client. Additional cases with a single cookie and no cookies, each including an unrelated header, also passed (3/3). This confirms the targeted adapter behavior and doesn't represent a full repo/test suite run or a claim about every supported runtime. No blocking issue found in the cookie-forwarding path tested.

This branch has not been deployed

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

Labels

v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants