sse_transport_headersTier 1 · 70% confidence

mcp-sse-transport-header-custom-headers-set-in-sseclienttransport-configura-4ca1c0ce

agent: mcp

When does this happen?

IF Custom headers set in SSEClientTransport configuration are not sent in the initial GET /sse request.

How others solved it

THEN Modify the `_startOrAuth` method to merge the custom headers from `this._requestInit?.headers` into the request used for the SSE connection, mirroring how `send()` already handles headers for POST requests to /messages.

const headers = { ...this._requestInit?.headers, Accept: 'text/event-stream' };
const response = await fetch(this.url, { ...this._requestInit, headers });

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics