Skip to content

Raise the default MCP discovery timeout to 30 seconds - #2317

Open
Oudwins wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
Oudwins:mcp-discovery-timeout-30s
Open

Oudwins wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
Oudwins:mcp-discovery-timeout-30s

Conversation

@Oudwins

@Oudwins Oudwins commented Oct 19, 2026

Copy link
Copy Markdown

Summary

MCP tool discovery gives up after 15 seconds, so a server that takes longer to connect and list its tools shows as Degraded with MCP discovery timed out after 15000ms. This raises the default to 30 seconds.

Connection shown as Degraded with "MCP discovery timed out after 15000ms"

The limit is DEFAULT_DISCOVER_TIMEOUT in packages/plugins/mcp/src/sdk/discover.ts. Every discovery caller (adding a server, the connection health check, tool listing, URL detection) uses the default, so there is no way to raise it from config or the environment. Some servers need more than 15 seconds for the handshake and tools/list, for example when they cold-start or build a large catalog on first connect. Today they are reported as degraded even though they work.

30 seconds still bounds a server that never answers. It matches the OAuth service's existing 30-second deadline.

A follow-up PR adds EXECUTOR_MCP_DISCOVERY_TIMEOUT_MS so operators can override the default.

Verification

  • bun run typecheck in packages/plugins/mcp: passes
  • bun run test in packages/plugins/mcp: 319 passed, 29 skipped. The existing timeout test (stdio-interrupt-cleanup.test.ts) passes an explicit timeout, so it is unaffected.
  • oxlint --deny-warnings and oxfmt --check on the changed files: clean
  • e2e: none. The only behaviour change is the length of the deadline.

Checklist

  • Added a changeset (bun run changeset), or this change needs none.
  • Added or updated tests for the new behaviour. (Only the default constant changes. The follow-up PR adds tests for the resolved timeout.)
  • No secrets, credentials, or private data in the diff.

@Oudwins
Oudwins force-pushed the mcp-discovery-timeout-30s branch from 028705f to 8d7cbda Compare October 19, 2026 08:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant