[4.0] Add polling support for long-running operations with MCP Tasks and client fallback

Aperta
#3,990 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@alzimmermsft ci sta già lavorando.

Dal 19/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement needs-team-attention remote-mcp server-Azure.Mcp tools-Core

Release Tracker: microsoft/mcp-pr#691 (Theme 1.2)
Initiative: microsoft/mcp#3105 (Product and Platform)
Priority: P0 (Required for 4.0 GA)

Objective

Standardize polling and long-running operations (LROs) in Azure MCP Server to prevent client timeouts and stalled conversations during multi-minute Azure operations. This feature owns both the official MCP Tasks lifecycle and stateless polling fallback for clients that do not advertise Tasks support.

Boundary with Pagination (#3112)

  • This issue (#3990) owns starting long-running operations, issuing task or operation handles, polling status, reporting progress, retrieving results, and cooperative cancellation where supported. It also owns the fallback contract for clients without Tasks support.
  • #3112 owns only pagination of collection/query results. Page continuation tokens are not LRO operation handles.
  • Pagination and polling are separate features. Neither feature is a prerequisite for the other.

Scope

  • Integrate the finalized MCP Tasks specification through the updated official ModelContextProtocol C# SDK (#3991).
  • Implement the full task lifecycle across the command execution pipeline: task creation and handle issuance, status inspection and progress reporting, output retrieval upon completion, and cooperative cancellation propagation.
  • Define and implement a stateless fallback for clients without Tasks support: start an operation and return an operation handle, inspect its status in subsequent tool calls, and retrieve its terminal result or error without requiring MCP Tasks capability negotiation.
  • Define fallback polling guidance and invalid or expired handle behavior. Document cancellation behavior and any service-specific limitations.
  • Support durable task tracking, request-scoped tenant and identity isolation, and recovery across transient transport disconnects in both stdio and remote HTTP modes. Apply identity isolation and reconnect safety to fallback operation handles as well.
  • Deliver an initial service pilot covering high-latency operations (deployments, database restorations, failover drills, and backup recovery operations).
  • Ensure polling and reconnect recovery do not resubmit the initiating mutating operation.

Dependencies

  • Stabilized MCP Specification and C# SDK upgrade for Tasks integration: #3991.

Related issues

  • #3112: Separate pagination feature for collection/query results.
  • #1426: Poll interval configuration and recorded-test performance. Keep this design question separate; distinguish server-side waiting from client-driven status polling.
  • #3229: Missing progress notifications during Event Hubs updates can cause client timeouts. This remains a separately tracked bug, not a duplicate of this feature.
  • #3255: Fabric-specific polling and result retrieval for getDefinition and other LROs. Coordinate relevant patterns without absorbing the Fabric feature into this Azure MCP issue.

4.0 Exit Criteria

  • End-to-end Tasks lifecycle (create, poll status, retrieve output, cancel) validated across both stdio and HTTP transports.
  • Clients without Tasks support can start an operation, poll its status, and retrieve its terminal result or error across both transports.
  • Invalid and expired fallback handles return explicit errors, and task/operation handles enforce tenant and identity isolation.
  • Task and fallback operation recovery verified under transport reconnects without duplicating mutating operations in Azure.
  • Polling guidance and cancellation behavior documented for both Tasks and fallback clients.
  • Recorded and unit test coverage added for Tasks and fallback lifecycles, terminal errors, reconnect recovery, and tenant isolation.
Lingua principale
C#
Stelle
3.9k
Fork
689
Merge medio
2g 11h
PR unite (30g)
143

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/mcp

Tutte le issue di microsoft/mcp

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.