modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 173
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 23
Description
Client side of SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335. Follows the server side (#345–#348).
Scope
Client\Builder::enableExtension(new TasksExtension())declaresio.modelcontextprotocol/tasksin the initialize request (no store needed on the client).Mcp\Client\Task\TaskClientwraps a connectedClient(the core client stays task-agnostic; it gains a genericClient::request()):callTool()/getPrompt()/readResource()return aCreateTaskResultwhen the server answered withresultType: "task";get()pollstasks/getand returns theTask(status,statusMessage,pollIntervalMs,resultonce completed,erroronce failed,inputRequestswhile waiting);update()answersinputRequeststhroughtasks/update;cancel().- The polling loop and routing
inputRequeststo the application's elicitation/sampling handlers stay application code;Task::fromArray()reads the wire shape. - End-to-end coverage in
tests/Integration/TasksTestagainst a stdio fixture server.
Notes
The server exposes pending asks on tasks/get and takes answers on tasks/update; that is the SEP-2260 request-scoping the original sketch of this issue described, without piggybacking anything on the tasks/update response.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Client\Builder::enableExtension(), the generic Client::request(), and the TaskClient API described in the issue. Use tests/Integration/TasksTest and its stdio fixture as the first validation point. Done means task-capable requests return CreateTaskResult, TaskClient supports get, update, and cancel, and Task::fromArray() reads the wire shape without adding polling or handler routing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100