Docs: stateless.md says the stateful task store is "scoped per session", but Tasks are unavailable in strict Stateful mode

オープン 初心者向け
#2,031 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, markdown
領域
documentation

調査の方向性

docs/concepts/stateless/stateless.md の231行目付近(比較表)と686行目(Stateful モードの段落)を読み、次に docs/concepts/tasks/tasks.md の340-342行目と比較してください。そこには正しい down-level の動作がすでに記載されています。McpTasksBuilderExtensions.GateToJuly2026OrLaterProtocol と StreamableHttpHandler.GetOrCreateSessionAsync をざっと確認して gating を確かめ、その後は Stateful のセル/段落だけを書き換えてください。Stateless 列はそのままにします。完了とは、表と段落が、tasks には 2026-07-28 リビジョンが必要であり、strict Stateful モードでは利用できないと述べている状態です。

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

説明

The comparison table in docs/concepts/stateless/stateless.md (line 231) describes Tasks support as:

| Tasks | Supported — shared task store, no per-session isolation | Supported — task store scoped per session |

and the "Stateful mode" section (line 686) says:

In stateful mode, the IMcpTaskStore tracks tasks created for that server instance.

Both statements describe a stateful task store that the current implementation does not provide:

  • The tasks/get, tasks/update, and tasks/cancel handlers, and task creation in the call-tool filter, are all gated on the 2026-07-28 protocol revision and throw MethodNotFound for any earlier version (McpTasksBuilderExtensions.GateToJuly2026OrLaterProtocol).
  • A Streamable HTTP server running in strict Stateful session mode refuses 2026-07-28 (per-request-metadata) requests before dispatch (StreamableHttpHandler.GetOrCreateSessionAsync), and a session established through the initialize handshake can only negotiate a pre-2026-07-28 version. So in strict Stateful mode no task can be created or accessed at all. (In StatefulForInitializeClients mode, modern requests are instead served statelessly, and tasks work there exactly as in Stateless mode — with the shared, non-isolated store the Stateless column describes.)
  • WithTasks registers the supplied IMcpTaskStore as a single shared instance; there is no per-session scoping mechanism.

docs/concepts/tasks/tasks.md (lines 340-342) already documents the correct behavior for down-level connections ("the v2 server does not create Tasks on a down-level connection, and its tasks/get endpoint rejects the legacy request with a method-not-found error"), so this looks like the stateless.md text simply was not updated when the protocol gating landed.

Suggested fix: change the Stateful cell to reflect that Tasks are not available in strict Stateful mode (they require the 2026-07-28 revision and run on the sessionless path — which is also how they are served under StatefulForInitializeClients), and adjust the "Stateful mode" paragraph accordingly. The Stateless column ("shared task store, no per-session isolation") matches the implementation and needs no change.

主要言語
C#
スター
4.6k
フォーク
849
平均マージ
1日 16時間
マージ済み PR(30日)
24

環境構築

Codespaces で開く

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

はじめの一歩

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

modelcontextprotocol/csharp-sdk のほかの issue

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

似ている issue

C# の issue をもっと見る

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

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