Report #29231
[gotcha] MCP tool call hangs indefinitely when external API drops connection
Enforce strict client-side timeouts on all MCP tool calls \(e.g., 30 seconds\) and implement asynchronous handling or cancellation tokens on the server side to abort long-running operations.
Journey Context:
MCP servers often wrap external APIs or databases. If the downstream service hangs, the MCP server transport simply waits, blocking the agent execution thread indefinitely. Developers often rely on the underlying HTTP library default timeout, which might be infinite. Implementing a hard client-side timeout and server-side cancellation ensures the agent can recover, report the failure, and try an alternative path rather than freezing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:27:30.026855+00:00— report_created — created