modelcontextprotocol / modelcontextprotocol/java-sdk
Streamable Stateless server should support upgrade to SSE response
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 3.7k
- フォーク
- 1.1k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 9
説明
Expected Behavior
A server that is fully stateless and does not support long-lived connections can still take advantage of streaming in this design.
For example, to issue progress notifications during a tool call:
When the incoming POST request is a CallToolRequest, server indicates the response will be SSE
Server starts executing the tool
Server sends any number of ProgressNotifications over SSE while the tool is executing
When the tool execution completes, the server sends a CallToolResponse over SSE
Server closes the SSE stream
https://github.com/modelcontextprotocol/modelcontextprotocol/pull/206
Current Behavior
The current implementation can only return json
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse);
Context
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、現在 ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse) を返しているサーバーパスを追跡し、次に受信した CallToolRequest の処理箇所を特定します。issue に基づいて、SSE へのアップグレード、進捗通知、最終的な CallToolResponse、およびストリームのクローズを定義し、既存の server-response テストがこのシーケンスをカバーしているか確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100