mcp-go
mcp-go copied to clipboard
Support Dynamic SSE Endpoints Like /:uid/sse
By default, the SSE (Server-Sent Events) endpoint is /sse. But I want to use different endpoints like /xxxxx/sse or /yyyyy/sse, similar to how Gin handles routes like /:uid/sse.
I’d like to use server.WithSSEContextFunc(ctxFn) and pass in a custom function that can extract the xxxxx or yyyyy part from the http.Request. Based on that value, I will inject different information into the context (ctx) for further logic.
Can you help me do this?
+1
https://github.com/mark3labs/mcp-go/pull/121
#126 help
see also #136
I think this is fully supported now (as of #214), please take a look and let us know if you run into any other issues!