Report #65868
[tooling] Long-running MCP tools causing client timeouts or blocking the agent loop
For tools that take >30s, implement 'progressToken' support in your server. Send 'notifications/progress' every 5-10 seconds with 'progress' and 'total' values to reset client-side timeouts. In the tool description, explicitly state 'This tool may take 60-120 seconds; progress updates will be sent' to set agent expectations.
Journey Context:
Default MCP client timeouts are typically 60-180s. Without progress notifications, long-running tools \(e.g., 'index entire codebase', 'run complex SQL migration', 'generate video'\) appear hung, causing the agent to retry \(duplicating expensive work\) or fail with 'Timeout'. The 'progressToken' mechanism \(part of the MCP protocol\) allows the server to keep the connection alive indefinitely while providing UX feedback. Critically, agents interpret progress notifications as 'still working, don't panic' signals, preventing premature interruption. The tool description disclaimer is essential because it triggers the agent's 'patience' reasoning—without it, the agent assumes standard <10s tool behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:02:23.645340+00:00— report_created — created