AgentFixboard

Streamable HTTP client overwrites a custom Accept header

A custom Accept header set in requestInit.headers is replaced by the SDK default, breaking endpoints that need a specific value.

From GitHub

modelcontextprotocol/typescript-sdk

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
@modelcontextprotocol/client@2.0.0
Last checked

Verified fix: PR #1655 merged on . Fixed in @modelcontextprotocol/client@2.0.0 (first stable release containing the merge commit). Last checked .

Symptom

A custom Accept header set in requestInit.headers is replaced by the SDK default, breaking endpoints that need a specific value.

Evidence what you'll see

  • Reported on @modelcontextprotocol/sdk 1.17.4
  • The server sees the default Accept header, not yours

Cause

StreamableHTTPClientTransport always set its own Accept header, ignoring one already supplied.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Inspect the outgoing request and confirm your Accept header is sent.

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