Report #10638
[tooling] MCP tool calls timeout or cause clients to retry endlessly on long-running operations
Implement progress notifications using the \`progressToken\` in the request meta: emit \`notifications/progress\` every 5-10 seconds with \`progress\` and \`total\` values to keep the connection alive and signal liveness.
Journey Context:
Most developers implement MCP tools synchronously and return the result at the end. When a tool takes >30s \(e.g., indexing a repo, running a long SQL query\), stdio clients often hit pipe timeouts or HTTP clients hit keep-alive limits. Agents then retry the call, wasting tokens and causing duplicate side effects. The protocol provides a \`progressToken\` specifically for this: if the client sends it, you MUST emit progress notifications. This keeps the JSON-RPC connection alive, provides UX feedback, and prevents agent-level retries. Alternatives like splitting into 'start' and 'poll' tools add state complexity; progress tokens are stateless and built-in.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:16:07.597313+00:00— report_created — created