mcp-bridge-connect-blocks-up-to-30s
IN premise
`connect()` blocks the calling thread for up to 30 seconds waiting for MCP session initialization via `_ready.wait(timeout=30)`, then raises `TimeoutError` if the server doesn't respond.
Summary
When a client calls connect(), it will hang for up to 30 seconds waiting for the MCP server to become ready, and if the server never responds, it throws a TimeoutError. This means any code that calls connect() synchronously — such as during startup — can stall the entire thread for half a minute before failing, which is especially problematic if multiple connections are attempted sequentially.
Dependents
These beliefs depend on this one:
- mcp-bridge-is-timeout-bounded-at-all-phases — MCP bridge operations are timeout-bounded at both connection establishment (30s) and per-tool execution (60s), preventing indefinite blocking on unresponsive MCP servers at any lifecycle phase.
Details
| Source | entries/2026/05/11/reasons_lib-mcp_client.md |