Handling Long-Running MCP Tools: Progress, Cancellation, and UX (ANSWERED)
TL;DR — Quick Answer
Use async job pattern: start_tool returns job_id, poll status/progress resources or tools, support cancellation, stream partial updates where protocol allows, and set host-side timeouts with user-visible progress — not blocking spinners.
The Interview Question
Some MCP tools take minutes (reports, ML jobs, large exports). How should servers and hosts handle long-running operations without blocking agents?
Deep Explanation
Sign in to unlock full answer
Get deep explanations, PDF export & all MCP questions
- 16 more sections of deep explanation
- Real-world examples
- Common mistakes
- Interviewer expectations
- Follow-up questions
MCPLong-RunningAsyncJobsGoogleAmazon