Symptom
A custom Accept header on a streamable HTTP client is replaced. The SDK runs headers.set("accept", "application/json, text/event-stream").
Evidence what you'll see
- The report names SDK 1.17.4, package
@modelcontextprotocol/sdk, filepackage/dist/esm/client/streamableHttp.js. - The overwrite happens for whatever
Acceptthe server config supplied.
Why it happens
headers.set replaces the header key, so a caller-supplied Accept does not survive into the request.
Affected versions
@modelcontextprotocol/sdk 1.17.4. The linked issue does not name an operating system.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- The request leaves with the
Acceptvalue from the client config, not onlyapplication/json, text/event-stream, when a custom value was set.
If it still fails
- A client that does not set
Acceptstill gets the SDK default. The linked issue does not describe a customAcceptthat is still replaced on client 2.0.0.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it