typescript-sdk/.changeset/odd-forks-enjoy.md
Niels Kaspers 1eb31236e7
fix(client): preserve custom Accept headers in StreamableHTTPClientTransport (#1655)
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
2026-04-02 13:52:53 +01:00

502 B

@modelcontextprotocol/client
patch

fix(client): append custom Accept headers to spec-required defaults in StreamableHTTPClientTransport

Custom Accept headers provided via requestInit.headers are now appended to the spec-mandated Accept types instead of being overwritten. This ensures the required media types (application/json, text/event-stream for POST; text/event-stream for GET SSE) are always present while allowing users to include additional types for proxy/gateway routing.