Repository navigation
chore(cli): document the real MCP timeout keys - #72
Closed
lukealvoeiro wants to merge 1 commit into
Closed
lukealvoeiro wants to merge 1 commit into
lukealvoeiro wants to merge 1 commit into
Conversation
The MCP docs described a per-server `timeoutMs` key in mcp.json and a global `mcp.callTimeoutMs` setting in settings.json. The CLI reads neither: the server config schema only accepts `timeout` (tool call timeout, ms) and `connectTimeout` (connect/initialize timeout, ms), and unknown keys are silently stripped. Rename `timeoutMs` to `timeout`, document `connectTimeout` and its defaults, state the built-in 3-minute call timeout, and remove the nonexistent `mcp.callTimeoutMs` setting and resolution order from the EN and JP MCP and settings pages. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
|
Droid finished @lukealvoeiro's task —— View job LGTM. No actionable issues found in the MCP timeout documentation changes. 0 inline comments posted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gap
EXT-N100 (F/P2): The MCP docs describe a per-server
timeoutMskey inmcp.jsonand a globalmcp.callTimeoutMssetting insettings.json. Neither exists in the CLI. The only timeout keys the CLI reads are the per-servertimeout(tool call timeout, ms) andconnectTimeout(connect/initialize timeout, ms; added in factory-mono#17204 and previously undocumented). There is no global setting for the call timeout.Evidence
Docs (before this PR)
docs/cli/configuration/mcp.mdx:294: "|timeoutMs|number| Per-server override for the MCP tool call timeout in milliseconds. Falls back to the global default when omitted. |"docs/cli/configuration/mcp.mdx:483-515("MCP call timeout"): "Override the timeout per server withtimeoutMs", "You can also set a global default via themcp.callTimeoutMssetting insettings.json", followed by a resolution order (per-servertimeoutMs, then globalmcp.callTimeoutMs, then built-in default).docs/cli/configuration/settings.mdx:65: "|mcp.callTimeoutMs| Integer (milliseconds) | Built-in default | Global timeout for MCP tool calls. Overridden per-server bytimeoutMsinmcp.json. ... |"docs/jp/cli/configuration/mcp.mdx:294,:489-517;docs/jp/cli/configuration/settings.mdx:65.ce83e77, "configurable per-server and global call timeouts") and its review follow-up; the key names never matched the CLI.Code (factory-mono)
packages/common/src/settings/schema.ts:1602-1621:McpServerConfigSchemaacceptstimeoutandconnectTimeout(positive int, ms). It has notimeoutMs, and zod strips unknown keys silently.apps/cli/src/mcp/McpHub.ts:1850:timeout: server.config.timeout ?? MCP_CALL_TOOL_TIMEOUT_MSapps/cli/src/mcp/constants.ts:1:MCP_CALL_TOOL_TIMEOUT_MS = 3 * 60 * 1000connectTimeout:McpHub.ts:1029,1059pass it asconnectTimeoutMs. Stdio falls back toMCP_STDIO_SERVER_CONNECT_TIMEOUT_MS= 30 s (clients/stdio.ts:116,constants.ts:19). HTTP/SSE fall back toMCP_SERVER_CONNECT_TIMEOUT_MS= 10 s (clients/http/shared.ts:417->clients/shared.ts:38,constants.ts:14).callTimeoutMs.Live test (source-built CLI, isolated HOME, no network): a mock stdio MCP server whose tool sleeps 6000 ms, called via
droid exec --auto high -m custom:mock "call the sleep tool"with a local mock model:"timeoutMs": 1500slept ok(key ignored)"timeout": 1500MCP error -32001: Request timed out{"mcp":{"callTimeoutMs":1500}}slept ok, no warningAll runs exited 0.
Why it matters
Users who follow the docs to raise or lower the timeout for slow tools get no effect and no warning, because the documented keys are silently dropped; the tool keeps the 3-minute default.
connectTimeout, the fix for slow-starting servers that fail on the 10 s or 30 s connect deadline, was not documented anywhere.Fix
mcp.mdx: renametimeoutMstotimeoutin the schema table and the example, and documentconnectTimeoutwith its defaults (30 s stdio, 10 s http/sse). State the built-in 3-minute call timeout, and remove themcp.callTimeoutMsexample and the resolution-order list. The example value is now 600000, because the old 120000 was below the 3-minute default and would have shortened the timeout.settings.mdx: remove themcp.callTimeoutMsrow.Validation
grep -rn "callTimeoutMs\|timeoutMs" docsreturns nothing after the change.#mcp-call-timeoutanchor and the JP explicit anchor are kept.Found by the scheduled CLI arguments audit (gap EXT-N100).