Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mcp-discovery-timeout-30s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"executor": patch
---

Wait up to 30 seconds, instead of 15, for an MCP server to connect and list its tools. Servers that cold-start or build a large tool catalog no longer show as degraded with `MCP discovery timed out after 15000ms`.
11 changes: 6 additions & 5 deletions packages/plugins/mcp/src/sdk/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ const MAX_LIST_TOOLS_PAGES = 100;
// carries a deadline of its own against a server that never answers (a
// closed/half-open loopback socket, a server wedged mid-handshake), so
// without a bound here a single unresponsive endpoint hangs the calling
// fiber forever. Mirrors the shape-probe fallback's default
// (`probeMcpEndpointShape`'s `timeoutMs = 8_000`) at a slightly longer
// bound since a real handshake + listTools round-trip is heavier than the
// shape probe's single unauth POST.
const DEFAULT_DISCOVER_TIMEOUT = Duration.seconds(15);
// fiber forever. Longer than the shape-probe fallback's default
// (`probeMcpEndpointShape`'s `timeoutMs = 8_000`) since a real handshake +
// listTools round-trip is heavier than the shape probe's single unauth POST,
// and generous enough for servers that cold-start or build a large tool
// catalog on first connect.
const DEFAULT_DISCOVER_TIMEOUT = Duration.seconds(30);

// Teardown is best-effort and paid for by the request that performed discovery.
// A remote transport may accept close and then never settle, so use the same
Expand Down
Loading