Report #76835
[tooling] Long-running MCP tools timeout or appear hung without progress feedback
For tools lasting >5 seconds, implement the \`notifications/progress\` pattern. Accept a \`progressToken\` \(string or integer\) passed via the \`\_meta\` field in the tool request. During execution, send server-to-client \`notifications/progress\` messages containing the token, a float 0.0-1.0, and optional status messages. Also listen for \`notifications/cancelled\` on the same token to abort gracefully.
Journey Context:
MCP tools that perform long-running operations \(database migrations, video rendering, batch API calls\) often cause hard client timeouts or poor UX because the request-response cycle blocks silently. The MCP specification includes a progress notification mechanism that is severely underutilized. When a client invokes a tool, it generates a \`progressToken\` and includes it in the request metadata \(\`\_meta: \{ progressToken: 123 \}\`\). The server must then emit \`notifications/progress\` messages containing that token, a completion percentage, and human-readable status \(e.g., 'Processing chunk 4/10'\). This serves three purposes: \(1\) keeping the TCP connection alive to prevent network timeouts during silence, \(2\) allowing UI progress bars so users don't cancel 'hung' operations, and \(3\) enabling the client to send \`notifications/cancelled\` if the user aborts, allowing the server to clean up partial work \(killing subprocesses, rolling back transactions\). Most SDKs \(Python/TypeScript\) require manual implementation; it is not automatic. The 2024-11-05 specification defines this under 'Progress Notifications' in the utilities section.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:33:11.316838+00:00— report_created — created