MCP Tasks Extension: Durable Work on a Stateless Core
Stateless MCP does not mean every operation must finish in one request. The official Tasks extension gives long-running work an explicit durable handle. A server can return that handle from tools/call, any instance can answer tasks/get, and client input arrives through tasks/update without reviving protocol sessions. Distinguish stateless protocol transport from durable application task state. Negotiate the io.modelcontextprotocol/tasks extension in per-request capabilities and server/discover. Return a server-directed CreateTaskResult with resultType: "task" only after durable creation. Poll with tasks/get, fulfill task input with tasks/update, and request cooperative cancellation with tasks/cancel. Remove the older tasks/status, tasks/result, and tasks/list assumptions. Subscribe to optional task notifications through subscriptions/listen on a POST response SSE stream. Model task expiry, restart recovery, input-key deduplication, and execution errors correctly. Tasks first appeared as an experimental core feature in 2025-11-25. The July 2026 redesign moves them into the official io.modelcontextprotocol/tasks extension so clients and servers can opt into the extra lifecycle without expanding the core protocol for everyone. The extension specification remains a draft surface even though it is the current official home for Tasks. Pin the extension version supported by your SDK, run conformance scenarios, and isolate wire adapters from your worker and storage domain. Use a task when the operation has one or more of these properties: It may outlive an ordinary request timeout. A worker queue…
MCP Tasks Extension: Durable Work on a Stateless Core: Stateless MCP does not mean every operation must finish in one request. The official Tasks extension…
This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.
Browse the complete course catalog or open this lesson on GitHub.