Build Durable, Long-Running MCP Tasks on Azure App Service
MCP Tasks let a server return a durable handle instead of holding one fragile HTTP request open for long-running work. Clients can disconnect, reconnect with the same task ID, poll progress, provide input, cancel the operation, and retrieve the final result.
The protocol handle is only half of durability. This .NET sample stores task status, progress, input, results, errors, and TTL in Azure Table Storage, while Azure Service Bus preserves the work that still needs to run. A worker on each App Service instance processes queued work and updates shared state, so retries, approvals, cancellation, and duplicate delivery continue to work across instance recycling and scale-in.
The full article walks through the MCP Tasks lifecycle, cross-instance approval flow, terminal-state and ETag guards, managed identity and RBAC, and when App Service, Durable Functions, or Azure Container Apps Jobs is the better execution model.
👉 Read the full article on Tech Community and explore the companion .NET sample on GitHub.
Comments