modelcontextprotocol / modelcontextprotocol/java-sdk

Streamable Stateless server should support upgrade to SSE response

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

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

feature/stateless-sse-upgrade
主要言語
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

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

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