Apply MCP startup timeouts during client creation (#32781)

## What changed

- Apply each server's `startup_timeout_sec` (or the default) while creating the
  MCP client, so the deadline also covers transport setup.
- Launch local stdio servers on a blocking task so synchronous command
  resolution and process creation do not prevent the deadline from firing.
- Recognize the new client-startup timeout error and show the existing
  `startup_timeout_sec` configuration hint.

## Testing

- Extend the timeout error display test to cover the client-startup timeout.

GitOrigin-RevId: 1967c62f943d55f6aa18792d4488e52c22f1e717
This commit is contained in:
jif authored and copyberry committed 2026-07-13 12:00:50 +00:00
1 parent 4477b20713
commit 8b2c84ddcc
4 files changed
+38 -15

No files matched your search

@@ -1043,6 +1043,7 @@ fn is_mcp_client_startup_timeout_error(error: &StartupOutcomeError) -> bool {
StartupOutcomeError::Failed { error, .. } => {
error.contains("request timed out")
|| error.contains("timed out handshaking with MCP server")
|| error.contains("MCP client startup timed out")
}
_ => false,
}