Long-running MCP tools: client timeouts, tasks and resumable runs
Claude Code times out remote MCP requests at 60 seconds by default, claude.ai tool calls at 240. Client timeouts, MCP Tasks, and jobs that outlast a call.
CrabTalk Team
An MCP tool call that runs longer than a few minutes risks being cut off by the client. Claude's web and desktop apps stop a tool call after 240 seconds, and Claude Code times out each request to a remote server after 60 seconds unless configured otherwise. A crawl, a batch of API calls or a report doesn't fit. This post lists the timeouts clients impose, what the MCP specification offers for long jobs, and the pattern that works in every client today: start a run, return an ID, and poll.
MCP tool call timeouts by client
| Client | Timeout | Configurable |
|---|---|---|
| claude.ai and Claude Desktop | "240 seconds per tool call" | No |
| Claude Code, HTTP servers | "each request also times out after 60 seconds by default" | A per-server timeout in .mcp.json |
| Claude Code, all tool calls | MCP_TOOL_TIMEOUT, "default: 100000000, about 28 hours" |
Yes |
The specification sets no number. Clients "SHOULD" "Implement timeouts for tool calls" (tools, 2026-07-28), and each picks its own. A server that serves several clients has to fit the shortest.
A timeout doesn't undo anything. In the 2026-07-28 Streamable HTTP transport, a client that closes the response stream is cancelling the request, and the server should stop as soon as practical, but effects the tool already caused stand. If the agent then retries, the work can run twice.
Progress notifications
A server can send progress notifications while it works, against a progressToken the client provided. The 2025-11-25 lifecycle let clients reset their timeout on each notification, while still enforcing a maximum. Progress keeps a call alive in clients that implement the reset, and only up to their maximum; it doesn't make a call survive a closed laptop or a dropped connection.
MCP Tasks
Tasks turn a request into a job the client can come back to. The 2025-11-25 revision added them as experimental; in 2026-07-28 they moved out of the core into the extension io.modelcontextprotocol/tasks (tasks).
- The client sends an ordinary
tools/calland advertises the extension; the server may answer at once with a task ID. - The task moves through
working,input_required,completed,failedorcancelled. - The client polls
tasks/getuntil the task ends, sends input withtasks/update, and stops it withtasks/cancel. - A server returns a task only to a client that advertises Tasks support. A tool that needs one may have no ordinary fallback for other clients.
Tasks are the protocol's answer, but they need both the client and the server to implement an extension that changed shape between the last two revisions.
The pattern that works in every client
Without Tasks, a long job becomes three ordinary tools:
- Start takes the input and an ID the agent generates, starts the job, and returns at once.
- Status takes the ID and returns progress, and the result when there is one.
- Cancel takes the ID and stops the job.
Each call does only the work of recording or reading the job, so it stays short however long the job runs. Three rules make it safe:
- The agent picks the ID. If the start call's response is lost, the agent sends the same ID again and gets the same job, not a second one.
- Save progress as you go. A job that fails at step 40 of 50 should resume from 40.
- Keep results for a stated time. The agent may come back hours later, in a new session.
How CrabTalk runs long jobs
CrabTalk runs long jobs as workflows: a bounded graph of tool calls that saves a checkpoint after each step. Over MCP they follow the start, status and cancel pattern:
| MCP tool | Does |
|---|---|
workflow_inspect |
Shows the graph, its inputs and the price quote, without running anything |
workflow_run |
Starts a run with an id the agent generates, and returns at once |
workflow_status |
Returns checkpoints, the result and when it expires |
workflow_continue |
Resumes an eligible failed run from its saved checkpoints |
workflow_cancel |
Stops new calls; effects already accepted elsewhere stand |
Sending workflow_run again for the same workflow with the same id, identical input and the accepted quote after a lost response returns the same run. Checkpoints are kept for seven days by default, so workflow_continue can pick up a run long after the session that started it.