modelcontextprotocol / modelcontextprotocol/php-sdk

[Server] SEP-2663 Tasks: TasksExtension, capability gate, tasks/* handlers

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

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

2026-07-28 enhancement improves spec compliance needs design Server
主要言語
PHP
スター
1.6k
フォーク
173
平均マージ
2日 49分
マージ済み PR(30日)
23

説明

Server-side handler portion of SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335; sits on the SEP-2133 extensions framework (#344).

Scope

  • Mcp\Server\Task\TasksExtension implements MethodProvidingExtensionInterface and ArgumentProvidingExtensionInterface (new, generic: an extension registers its message classes, handlers and injectable handler arguments through Builder::enableExtension(); the core never names the extension). Enable with new TasksExtension($store, $inputHandler) and the tasks/get / tasks/update / tasks/cancel surface appears; no separate setTaskStore() builder knob.
  • Handlers under Mcp\Server\Task\Handler\: TasksGetHandler, TasksUpdateHandler, TasksCancelHandler.
  • Capability gate: TaskCapabilityGuard reads what initialize left in the session and refuses the tasks/* methods with -32021 (missing required client capability) for a client that did not declare the extension.
  • Handlers get a TaskContext by declaring the parameter: isSupported() so a handler that can work either way asks first, create() stores the task before returning the CreateTaskResult (so the first tasks/get cannot arrive before the task exists) and refuses an undeclared client with -32021, getStore().

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

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

はじめの一歩

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

調査の方向性

#344 の SEP-2133 extensions framework と Builder::enableExtension() のパスから始め、次に Mcp\Server\Task\Handler\ 配下の TasksExtension とハンドラーを調べます。TaskCapabilityGuard と TaskContext を追跡し、宣言されたクライアントのチェック、タスク作成の順序、ストアへのアクセスを検証します。tasks/* のサーフェスが TasksExtension を通じて登録され、クライアント capability がない場合に仕様どおり -32021 を返せば完了です。

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

評価

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

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

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