modelcontextprotocol / modelcontextprotocol/php-sdk
[Server] SEP-2663 Tasks: TaskStoreInterface with InMemory and PSR-16 stores
オープン
まだ誰も着手していません。
2026-07-28
enhancement
improves spec compliance
needs design
Server
- 主要言語
- PHP
- スター
- 1.6k
- フォーク
- 173
- 平均マージ
- 2日 49分
- マージ済み PR(30日)
- 23
説明
Task persistence for SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335.
Scope
Mcp\Server\Task\TaskStoreInterface:save(),get()(null for unknown or expired — a client cannot tell them apart and does not need to),delete().InMemoryTaskStorewith a task limit (default 1000, oldest-by-last-use evicted) so unbounded task creation cannot exhaust memory. Right for stdio and single-process runtimes; wrong under PHP-FPM, where the worker that creates a task is not the one polled for it.Psr16TaskStore(PSR-16 cache-backed) for PHP-FPM — a filesystem adapter covers the "file store" case, so no separateFileTaskStore.- Expiry is TTL-based (
Task::isReadable()on read, cache TTL for PSR-16) plus the in-memory limit; no request-counted GC pass. - The store is the one place both server-side task state and the pending server→client asks (
Task::$inputRequests) live. - The store is handed to
TasksExtension, not to the builder (see #346).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず TasksExtension、Task::isReadable()、および提案されている TaskStoreInterface のエントリポイントを特定します。サーバー側のタスク状態と Task::$inputRequests がどのように拡張機能へ渡されるかを追跡し、その後 InMemoryTaskStore と Psr16TaskStore の責務を定義します。完了条件は、save/get/delete が有効期限付きで動作し、メモリ内に最終使用時刻に基づく最古の項目を対象とした上限付きエビクションが存在し、PSR-16 の TTL 動作が PHP-FPM をサポートすることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100