Skip to content

Commit 8d7cbda

Browse files
committed
Raise the default MCP discovery timeout to 30 seconds
1 parent 906bee5 commit 8d7cbda

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"executor": patch
3+
---
4+
5+
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`.

‎packages/plugins/mcp/src/sdk/discover.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ const MAX_LIST_TOOLS_PAGES = 100;
2525
// carries a deadline of its own against a server that never answers (a
2626
// closed/half-open loopback socket, a server wedged mid-handshake), so
2727
// without a bound here a single unresponsive endpoint hangs the calling
28-
// fiber forever. Mirrors the shape-probe fallback's default
29-
// (`probeMcpEndpointShape`'s `timeoutMs = 8_000`) at a slightly longer
30-
// bound since a real handshake + listTools round-trip is heavier than the
31-
// shape probe's single unauth POST.
32-
const DEFAULT_DISCOVER_TIMEOUT = Duration.seconds(15);
28+
// fiber forever. Longer than the shape-probe fallback's default
29+
// (`probeMcpEndpointShape`'s `timeoutMs = 8_000`) since a real handshake +
30+
// listTools round-trip is heavier than the shape probe's single unauth POST,
31+
// and generous enough for servers that cold-start or build a large tool
32+
// catalog on first connect.
33+
const DEFAULT_DISCOVER_TIMEOUT = Duration.seconds(30);
3334

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

0 commit comments

Comments
 (0)