modelcontextprotocol / modelcontextprotocol/go-sdk
Proposal: allow `mcp.streamableClientConn` to listen to SSE stream without using `mcp.Client`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 543
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 37
Description
Is your feature request related to a problem? Please describe.
We use the SDK to implement reverse proxies for MCP servers and transport conversions. For that purpose, we cannot use mcp.Client directly. We use StreamableServerTransport instead to process the messages.
However, there is no exposed function for StreamableServerTransport (or streamableClientConn) to start to listen the SSE stream (the GET call), without using mcp.Client.
Describe the solution you'd like
Have a boolean say ConnectSSEOnInitializeSuccess in StreamableServerTransport to enable the listening functionality. If flag is set, c.connectStandaloneSSE() will be called automatically after receiving successful initialize result.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Expose sessionUpdated or connectStandaloneSSE() and allow external caller to trigger it.
Additional context
Add any other context or screenshots about the feature request here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading StreamableServerTransport and streamableClientConn, then trace the successful initialize result and the existing connectStandaloneSSE path. The change is done when a transport used without mcp.Client can begin listening to the SSE stream through the agreed option or exposed trigger, with the relevant transport behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100