mcp-agent icon indicating copy to clipboard operation
mcp-agent copied to clipboard

Allow passing headers to SSE server

Open Nicba1010 opened this issue 7 months ago • 3 comments

I have a use-case to pass some headers to the SSE server. The sse_client from mcp.client.sse.sse_client accepts headers in its function signature. Would you be comfortable with adding configurable headers to the config for an sse mcp server? I tried to just put the data I need to pass in the route, like http://mc-server/dataineedtopass/sse. And it works fine, but when the library connects to /messages/ it completely ignores the /dataineedtopass/ part and doesn't preserve it.

I would implement it if you give the goahead.

Nicba1010 avatar Mar 12 '25 18:03 Nicba1010