Skip to content

Last update 

Adoption · Build

Tasks extension security

Secure MCP Tasks with unguessable task IDs, per-request authorization, and operational bounds.

Changed in 2026-07-28

Model Context Protocol (MCP) specification 2026-07-28 moves Tasks to the io.modelcontextprotocol/tasks MCP extension under Specification Enhancement Proposal (SEP) SEP-2663. It replaces tasks/result waits with tasks/get polls, adds tasks/update, keeps tasks/cancel, and removes tasks/list. Task responses set resultType: "task". See What's new and the MCP Tasks extension overview.

Extension stage and opt-in rules

MCP Tasks is a Tracked as Beta, to Core under SEP-3392.. Every MCP extension is off by default. Opt in explicitly via extensions in server/discover and per-request client capabilities.

Servers must return task results only to an MCP client that declared io.modelcontextprotocol/tasks.

Required protocol controls

The Tasks extension specification (2026-07-28) and transport require 3 controls:

  • Generate unguessable task IDs. High entropy blocks third-party guesses and enumeration. Without tasks/list, attackers who cannot guess a taskId cannot discover other callers' tasks.
  • Authenticate and authorize every task request. Check identity and permissions on every tasks/get, tasks/update, and tasks/cancel. Bind taskId to the authenticated principal with a task state key such as {tenantId}:{userId}:{taskId}, and reject other callers.
  • Match header and body. Confirm Mcp-Name matches the body taskId on tasks/get, tasks/update, and tasks/cancel. Reject mismatches with HTTP 400 and -32020 (SEP-2243, MCP-06).

The extension directs MCP hosts to treat task input requests like elicitation and deprecated sampling because a task is not a higher-trust channel. Apply synchronous tools/call authorization and input checks to task inputs, updates, and cancellations.

These are guide recommendations, not protocol requirements:

  • Cap ttlMs. The extension allows null for an unlimited lifetime. Cap ttlMs server-side and expire completed or abandoned tasks.
  • Rate-limit polls. Servers may limit MCP clients that poll tasks/get faster than pollIntervalMs. Add per-principal limits against stuck or malicious clients.
  • Route by Mcp-Name. Mcp-Name carries taskId on tasks/get, tasks/update, and tasks/cancel so stateless gateways can route calls to the backend that owns the task.

Azure hosting considerations

Microsoft Foundry supports Foundry Long-running MCP tasks over Toolboxes Checked · Source page. Keep task state durable and shared across replicas, or route by Mcp-Name to the replica that owns the task. See Stateless MCP 2026-07-28 impact on gateways and hosts.

Beta extensions and production governance

Review your extension policy before production use. Document an exception for io.modelcontextprotocol/tasks under Stable-only policies until it reaches Stable. See Extensions governance for approval and inventory practices.

Tasks security checklist

Verify before you enable io.modelcontextprotocol/tasks:

  • Use cryptographically random task IDs, never sequential counters (MCP-10).
  • Verify tokens and principal ownership on every tasks/get, tasks/update, and tasks/cancel request (MCP-10).
  • Reject Mcp-Name mismatches with HTTP 400 and -32020 (MCP-06).
  • Return resultType: "task" only when the MCP client declared io.modelcontextprotocol/tasks.
  • Cap ttlMs and rate-limit polls faster than pollIntervalMs.
  • Record Beta production use as an approved exception in your governance inventory.

OWASP MCP Top 10, 2025 edition risks:

Next steps: