[Server] SEP-2663 Tasks: TasksExtension, capability gate, tasks/* handlers
还没有人认领这个 Issue。
评估
调研方向
从 #344 中的 SEP-2133 extensions framework 和 Builder::enableExtension() 路径开始,然后检查 Mcp\Server\Task\Handler\ 下的 TasksExtension 和处理器。跟踪 TaskCapabilityGuard 和 TaskContext,以验证已声明客户端的检查、任务创建顺序以及 store 访问。完成标准是通过 TasksExtension 注册 tasks/* surface,并且缺少客户端 capability 时按规范返回 -32021。
由索引模型根据 Issue 内容生成。
描述
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\TasksExtensionimplementsMethodProvidingExtensionInterfaceandArgumentProvidingExtensionInterface(new, generic: an extension registers its message classes, handlers and injectable handler arguments throughBuilder::enableExtension(); the core never names the extension). Enable withnew TasksExtension($store, $inputHandler)and thetasks/get/tasks/update/tasks/cancelsurface appears; no separatesetTaskStore()builder knob.- Handlers under
Mcp\Server\Task\Handler\:TasksGetHandler,TasksUpdateHandler,TasksCancelHandler. - Capability gate:
TaskCapabilityGuardreads whatinitializeleft in the session and refuses thetasks/*methods with-32021(missing required client capability) for a client that did not declare the extension. - Handlers get a
TaskContextby declaring the parameter:isSupported()so a handler that can work either way asks first,create()stores the task before returning theCreateTaskResult(so the firsttasks/getcannot arrive before the task exists) and refuses an undeclared client with-32021,getStore().
- 主要语言
- PHP
- 星标
- 1.6k
- 派生
- 173
- 平均合并
- 2 天 49 分钟
- 30 天内合并 PR
- 23
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/php-sdk 的其他 Issue
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan 未关闭Server
难度 1/5 1 小时以内 新手友好度 78/100
modelcontextprotocol/php-sdk#468 · 2 条评论 ·
-
needs confirmation needs maintainer action Server
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#398 · 1 个 reaction ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 55/100
modelcontextprotocol/php-sdk#510 · 1 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
modelcontextprotocol/php-sdk#504 ·
查看 modelcontextprotocol/php-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
getgrav/grav-plugin-api#45 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
RSS-Bridge/rss-bridge#5098 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
phingofficial/phing#2025 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
silverstripe/developer-docs#911 ·
-
难度 2/5 1-3 小时 新手友好度 74/100