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

オープン
#657 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
62/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, networking

調査の方向性

まず StreamableServerTransport と streamableClientConn を読み、次に initialize の成功結果と既存の connectStandaloneSSE パスを追跡します。mcp.Client なしで使用される transport が、合意されたオプションまたは公開された trigger を通じて SSE ストリームのリッスンを開始でき、関連する transport の動作がテストでカバーされた時点で変更は完了です。

索引モデルが issue の本文から書いたものです。

説明

needs investigation

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.

主要言語
Go
スター
5.4k
フォーク
623
平均マージ
22時間 10分
マージ済み PR(30日)
30

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/go-sdk のほかの issue

modelcontextprotocol/go-sdk の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。