modelcontextprotocol / modelcontextprotocol/csharp-sdk
Allow tools to continue running when session is closed
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 4.5k
- フォーク
- 814
- 平均マージ
- 9日 19時間
- マージ済み PR(30日)
- 4
説明
Is your feature request related to a problem? Please describe.
A server may implement a long-running tool that should continue running if the client disconnects or session is closed due to idle timeout.
The MCP Spec permits this case and has provisions for reconnecting to the server to resume its connection to the tool (resumable streams), but this is currently not possible with the C# SDK because it terminates tool calls when the session is closed.
Describe the solution you'd like
An option in the McpServerOptions, or maybe in the HttpTransport options, or maybe on individual tools, that skip cancellation of outstanding tool calls when a session is closed.
Describe alternatives you've considered
An alternative might be to not close a session when the client disconnects, and/or disable the idle session timeout.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、C# SDK でセッションの終了とアイドルタイムアウトが保留中のツール呼び出しをどのようにキャンセルするかを追跡します。McpServerOptions、HttpTransport のオプション、個々のツールの設定を、MCP の再開可能なストリームに関する規定と比較します。切断またはセッション終了後も対象となるツール呼び出しを保持し、それらへの再接続をサポートする文書化されたオプションがあれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100