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

Add configurable headers to SSE connections

Open Nicba1010 opened this issue 8 months ago • 5 comments

As per #54

I would advise against merging until I update this message, as I haven't tested running without any passed headers and would hate to break something. Even if there is seemingly no way I broke it :')

Nicba1010 avatar Mar 12 '25 19:03 Nicba1010

@Nicba1010 thanks! Would also appreciate an example maybe added to the examples folder, and some validation steps

saqadri avatar Mar 12 '25 19:03 saqadri

Sure thing, but it will have to wait till the weekend, just leave this open, I'll set a notification for myself to do it. I'm a bit swamped with work right now so I needed to implement it quick :)

Is there already an example for connecting to an SSE server at all?

If not, you can assign at least that part of #41 to me. I'll add both a simple SSE example and a SSE + headers example.

Nicba1010 avatar Mar 12 '25 19:03 Nicba1010

@Nicba1010 wanted to check in if you've got any updates on this!

saqadri avatar Mar 19 '25 20:03 saqadri

Hi, thanks for asking, it has been an extremely busy 2 weeks, I hope to finish it today, finally got some free time. Ironically, I think SSE is going out of the picture and MCP is moving to HTTP. I think I saw something like that, I need to check.

Nicba1010 avatar Mar 28 '25 18:03 Nicba1010

Thanks @Nicba1010! For some reason I'm not seeing you latest commit https://github.com/lastmile-ai/mcp-agent/commit/423ec42bd021a9b534fb518e9a8d03ccf3cdec4d show up in the PR. Can you check if there's anything about the fork or branch causing this? Feel free to close and recreate the PR

saqadri avatar Apr 01 '25 02:04 saqadri

@Nicba1010 #116 just got merged and it added the headers for SSE. I quite like your example and would love to get it merged as well. Can you please rebase against latest main?

saqadri avatar Apr 17 '25 23:04 saqadri

Closing this now that I merged #143 (which was a fork from this!). Thank you for the contribution @Nicba1010!

saqadri avatar Apr 17 '25 23:04 saqadri