modelcontextprotocol / modelcontextprotocol/php-sdk

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

Open
#346 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2026-07-28 enhancement improves spec compliance needs design Server
Dominant language
PHP
Stars
1.6k
Forks
173
Avg merge
2d 49m
Merged PRs (30d)
23

Description

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().

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SEP-2133 extensions framework in #344 and the Builder::enableExtension() path, then inspect TasksExtension and the handlers under Mcp\Server\Task\Handler. Trace TaskCapabilityGuard and TaskContext to verify the declared-client checks, task creation ordering, and store access. Done means the tasks/* surface is registered through TasksExtension and missing client capability returns -32021 as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.