modelcontextprotocol / modelcontextprotocol/go-sdk

Proposal: allow `mcp.streamableClientConn` to listen to SSE stream without using `mcp.Client`

Open
#657 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.