Tasks
Asynchronous task execution for long-running MCP operations.
Adapted from Tasks. Spec and docs: experimental-ext-tasks / related Tasks extension SEPs.

Tasks keep hosts responsive when tools cannot finish within a single request timeout.
Why not just block?
- Connection and intermediary timeouts
- Crash resilience via durable IDs
- Progress visibility (
working,input_required, …) - Mid-flight elicitation without a second ad-hoc channel
- Server decides per request whether to create a task
Lifecycle statuses
| Status | Meaning |
|---|---|
working | In progress |
input_required | Needs client/user input (inputRequests) |
completed | Terminal success (result) |
failed | Terminal error (error) |
cancelled | Cancel acknowledged (cooperative) |
Client checklist
- Advertise
io.modelcontextprotocol/tasksin per-request capabilities. - Accept either a normal result or
CreateTaskResult(resultType: "task"). - Poll with
tasks/getusingpollIntervalMs. - Handle
input_requiredviatasks/update. - Persist
taskIdacross restarts. - Optionally subscribe to
notifications/tasks.
Server checklist
- Advertise the extension in
server/discover. - Never return a task to clients that did not opt in.
- Create the task durably before responding.
- Honour cancellation when possible (cooperative).
Good fit
CI pipelines, batch jobs, human approvals, wrappers around external job APIs, unreliable networks.
Negative cases
- Returning tasks without client capability → protocol violation.
- Non-durable task store → lost work on server restart.
- Ignoring
input_requiredon the client → stuck forever.
Discussion
Comments
Share feedback or questions about this page. No account required.
Loading comments…