add optional timeout field to mcp config to allow users to use responding servers (#3558)

Co-authored-by: Matt Gillard <matt-github@gillard.biz>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
Matt Gillard
2025-10-30 17:25:24 +11:00
committed by GitHub
parent 4b5e447961
commit 3ae75d7031
3 changed files with 220 additions and 60 deletions

View File

@@ -167,7 +167,7 @@ export namespace MCP {
return
}
const result = await withTimeout(mcpClient.tools(), 5000).catch(() => {})
const result = await withTimeout(mcpClient.tools(), mcp.timeout ?? 5000).catch(() => { })
if (!result) {
log.warn("mcp client verification failed, dropping client", { name })
return