Context
SDK 2.0 extracted MCP Tasks into ModelContextProtocol.Extensions.Tasks (2.0.0-preview.3): IMcpTaskStore/InMemoryMcpTaskStore, task results/notifications (CreateTaskResult, GetTaskResult, CancelTaskResult, completed/failed/cancelled/input-required), and client helpers (CallToolAsTaskAsync, CallToolWithPollingAsync). The per-tool Tool.Execution augmentation is gone from the protocol surface.
Since PR #71, Repl keeps .LongRunning() in its own model (help/docs) and deliberately does not advertise task support at the protocol level — per #51's non-goal: no advertisement until polling/cancel/update works end-to-end.
Scope
- Reference
ModelContextProtocol.Extensions.Tasks and wire a task store (in-memory by default, pluggable).
- Route
.LongRunning() tool calls through the task lifecycle: create → progress → completed/failed/cancelled, honoring cancellation.
- Handle
tasks/get, tasks/update, tasks/cancel and the corresponding notifications.
- Advertise task capability once the runtime is complete (whatever shape the SDK exposes at that point — the per-tool augmentation no longer exists).
- End-to-end tests using the SDK client's
CallToolAsTaskAsync/CallToolWithPollingAsync.
- Update
docs/mcp-reference.md#sdk-and-protocol-versions and the .LongRunning() doc mentions when advertisement returns.
Notes
Context
SDK 2.0 extracted MCP Tasks into
ModelContextProtocol.Extensions.Tasks(2.0.0-preview.3):IMcpTaskStore/InMemoryMcpTaskStore, task results/notifications (CreateTaskResult,GetTaskResult,CancelTaskResult, completed/failed/cancelled/input-required), and client helpers (CallToolAsTaskAsync,CallToolWithPollingAsync). The per-toolTool.Executionaugmentation is gone from the protocol surface.Since PR #71, Repl keeps
.LongRunning()in its own model (help/docs) and deliberately does not advertise task support at the protocol level — per #51's non-goal: no advertisement until polling/cancel/update works end-to-end.Scope
ModelContextProtocol.Extensions.Tasksand wire a task store (in-memory by default, pluggable)..LongRunning()tool calls through the task lifecycle: create → progress → completed/failed/cancelled, honoring cancellation.tasks/get,tasks/update,tasks/canceland the corresponding notifications.CallToolAsTaskAsync/CallToolWithPollingAsync.docs/mcp-reference.md#sdk-and-protocol-versionsand the.LongRunning()doc mentions when advertisement returns.Notes
ModelContextProtocolv2.0 #51.