From f2d7beb7cef2f030e59859f271b8c717a8540d36 Mon Sep 17 00:00:00 2001 From: CRT Date: Thu, 29 Oct 2026 16:31:41 +0700 Subject: [PATCH] mcp --http: no request timeout (tool calls can run for many minutes) --- cli/mcp-http.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/mcp-http.ts b/cli/mcp-http.ts index 0c30e08..1fe8c03 100644 --- a/cli/mcp-http.ts +++ b/cli/mcp-http.ts @@ -165,6 +165,9 @@ export function startHttp(o: HttpOptions): Promise<{ close: () => void; port: nu return r ? send(res, 200, r) : send(res, 202); } catch (e) { return send(res, 500, { jsonrpc: '2.0', id: (msg as { id?: unknown }).id ?? null, error: { code: -32603, message: String((e as Error).message) } }); } }); + // a tool call can run for many minutes (check on a big project, uploads): Node's 300 s request timeout would cut it + server.requestTimeout = 0; + server.timeout = 0; return new Promise((ok, fail) => { server.once('error', fail); server.listen(o.port, o.host, () => {