MCP Tasks: Run Long-Running Tool Calls in the Background
A customer lookup can finish in milliseconds. An account investigation might require dozens of requests, a document export, and a person's approval. Holding the original tool call open through all of that makes timeouts and interrupted connections part of the user experience.
MCP Tasks gives long-running operations a durable handle that the client can follow until a result is ready. Anthropic's November 24 announcement says Tasks and Elicitation are generally available in Claude and Claude Code for Pro, Max, and Ultra, with rollout to Team and Enterprise organizations. ZoomInfo's deeper account and contact research is one example highlighted in the announcement.
This article covers the Tasks extension for protocol revision 2026-07-28. Older experimental implementations can use different message shapes; match your SDK and client to the version you intend to serve.
A tool call starts the work
The current extension overview describes a server-directed flow. The client declares io.modelcontextprotocol/tasks in its per-request capabilities, and the server advertises support through server/discover. For a supported tool call, the server can then return either the ordinary result or a task handle.
The client polls tasks/get, respecting the suggested interval. If the server needs input, it exposes requests for the client to answer through tasks/update. The final result arrives through tasks/get too.
| Task status | What the client should expect |
|---|---|
working |
Work is still underway. |
input_required |
Input is needed before the operation can continue. |
completed |
The original operation's result is available. |
failed |
Execution ended with a JSON-RPC error. |
cancelled |
Cancellation took effect. |
The last three states are terminal. Polling is the default; the extension also supports optional status notifications. These are protocol capabilities, while the host decides how to present background activity to the user. See the lifecycle documentation.
What the response looks like
Imagine a fictional analyze_account tool researching a customer's open issues and recent activity. After accepting the work, its server could return this JSON-RPC response:
{
"jsonrpc": "2.0",
"id": 42,
"result": {
"resultType": "task",
"taskId": "d3013750-f959-4c30-a26b-bf4595b7c2b8",
"status": "working",
"statusMessage": "Collecting account activity and unresolved issues.",
"createdAt": "2026-11-27T09:00:00Z",
"lastUpdatedAt": "2026-11-27T09:00:00Z",
"ttlMs": 3600000,
"pollIntervalMs": 5000
}
}
The identifier, message, and timing values are illustrative. Notice that task fields are directly inside result in this revision. The server must durably create the task before returning its handle. A completed tasks/get response has outer resultType: "complete", the task metadata, and a nested result containing the original tool result. See the versioned specification.
There is an important error distinction: a tool result with isError: true can belong to a completed task. The task's failed state represents a JSON-RPC error. A client should inspect the returned tool result before announcing that the business operation succeeded. The specification defines both cases.
Waiting for a person is part of the lifecycle
Suppose the investigation discovers that a paid data export would improve its report. In a sensible implementation, the server would explain the proposed export and cost before starting it. The client could present that question while the task waits in input_required.
Tasks supplies the lifecycle around the pause; Elicitation supplies a way to ask the person. Outstanding questions appear in inputRequests, and answers are submitted in inputResponses through tasks/update. Multiple questions can remain pending until the necessary answers arrive. The extension documentation describes this exchange.
For this hypothetical workflow, I would make a declined export produce a useful report from the available evidence, with the limitation clearly stated. The alternative of silently retrying the purchase would turn an understandable decision into a frustrating loop. That behavior belongs in application logic, not in the protocol's status labels.
Cancellation and retention need explicit decisions
Calling tasks/cancel signals intent. Its acknowledgement does not promise that execution stopped, and it does not undo completed side effects. A task can still finish after cancellation was requested. The extension also defines ttlMs as a lifetime measured from creation, after which the server may discard task state. See the cancellation and lifetime rules.
For an export service, I would make cancellation stop future batches where possible and record which batches already finished. I would choose retention long enough for a person to return to the conversation, then test what the client displays after expiry. “The task record expired” and “the export failed” tell users very different things.
Backgrounding in the client is a different mechanism
Claude Code can also move an ordinary slow tool call into the background. Its documentation distinguishes that behavior from a server-backed MCP task: an ordinary background call does not survive exiting the session, while a task on a remote server can keep running and be followed when the original session resumes.
A local stdio server needs special care because its process stops when Claude Code exits. Whether its underlying work continues depends on how that server is implemented. UI support and eligibility also vary by session type and version. Check the Claude Code Tasks documentation for the environment your users actually run.
Design the worker before polishing the status message
The extension's architecture separates durable task state from the worker doing the computation. For an implementation, I would turn that distinction into a small set of practical checks:
- Kill a worker during an export and verify that the task remains readable and reaches an honest outcome.
- Disconnect the client after acceptance, then reconnect with the saved handle.
- Retry submission after a lost response and check that application-level deduplication prevents duplicate exports.
- Cancel between batches and verify that the reported outcome matches the work already performed.
These are engineering recommendations, not guarantees supplied by adding a task ID. A protocol can expose the state of a job; reliable execution still depends on the queue, storage, and service behind it.
Start with an operation that already behaves like a job: an export, a build, or a substantial investigation. Keep quick lookups simple. Pair the job with Skills over MCP when users also need guidance about when to run it, which inputs to collect, and what to do with the result.