What are MCP tasks? Long-running server operations

By

MCP tasks give long-running server operations an ID. Learn how clients follow progress, retrieve results, and handle cancellation in coding workflows.

MCP tasks let an MCP server accept work and return a task ID before the work finishes. The client uses that ID to follow progress and retrieve the result later.

For a working server, start with MCP Tasks and Elicitations in Claude Code. It simulates a build and deployment so you can try the flow safely.

How MCP tasks work

The MCP Tasks extension separates accepting a job from collecting its result. A task can report that it is working, waiting for input, completed, failed, or cancelled.

Following an MCP taskA server accepts a tool call and returns an ID. The client checks status and collects the result when the job completes.Call toolReceive task IDCheck statusCollect result

That ID lets a client reconnect and continue checking a retained task. The server still needs somewhere to run the job and store its state.

In coding tools

Claude Code supports server tasks in public beta, with session and server requirements. It follows their status and lists them in /tasks. A remote task can continue after you exit; resume the same session to follow it again.

Cursor’s MCP capability table does not document the Tasks extension. Codex’s MCP guide and Grok Build’s MCP guide do not document this extension either. Check client support before designing a server around it.

Details checked against each vendor’s documentation in November 2026.

A concrete example

With the tutorial’s site-tools server connected, its example prompt is:

Build the main branch with site-tools, then tell me what's in package.json while it runs

The simulated build runs on the server while Claude reads the file. Follow the setup instructions to create that server first.

When to use MCP tasks

Use them for remote builds or exports that need progress tracking and later result collection. A quick lookup can return an ordinary tool result.

Pitfalls

Moving a call into the background and creating a server task are different mechanisms. Check what your client and server negotiated.

Cancellation is a request to stop. Work already performed can have effects you need to undo separately. A running task can also need elicitation before it continues.

For agent work running away from your computer, see cloud agents. For a concrete server that asks before buying, see the Cloudflare Domains Toolkit tutorial.

  • MCP elicitation: MCP elicitation lets a server ask you for information during a workflow. Learn how coding clients present requests, and why the server must check your answer.
  • Cloud agents: Cloud agents run a coding task on a remote machine instead of your laptop. How Claude Code, Codex, Cursor and Grok Bot start one, and what they cannot see.
  • Tool calling: Tool calling is when a model names a function and its arguments, and the app runs it. How Claude Code, Codex, Cursor and Grok Build take that step.

All AI glossary entries →

Want me to talk about your product? You can sponsor this site.