MCP_TIMEOUT is a 30-second startup wait, not a Sume job limit

In claude -p, MCP_TIMEOUT is the wait for MCP servers to connect, 30 seconds by default. It does not limit a video job; Sume's jobs_wait does that.

4 min readSume
All posts

MCP_TIMEOUT is the startup timeout for MCP servers in Claude Code, 30 seconds by default, and it only governs how long claude -p --mcp-config waits for a server to connect before the first turn. It has nothing to do with how long a video job takes. That limit lives in Sume's jobs_wait tool, which holds for 50 seconds by default and no more than 55.

What the startup wait does

Claude Code's headless docs describe the sequence. When you pass --mcp-config with -p, Claude Code waits for still-pending servers before running the first turn, up to MCP_TIMEOUT. A remote server with a cached tool list skips the wait, shows pending in the system/init event, and connects on its first tool call.

Two timeouts that get mixed up

That gives you two failure shapes that look alike in a log and mean different things. A server that is missing at the first turn is a connection problem, so read mcp_servers and mcp_server_errors in the init event. A video that is not ready is not an error at all. It is a job that has not finished, and the answer is to wait on the job again, never to submit it again.

Timeout, who owns it, and what to do (Claude docs read 2026-10-05, Sume docs from repo)
TimeoutOwnerDefaultWhat it limitsIf it fires
MCP_TIMEOUTClaude Code30 secondsStartup wait for MCP servers in -pCheck mcp_server_errors, retry the call
jobs_wait holdSume MCP50 seconds, cap 55One wait slice on a jobRetry the same wait; do not re-create the job
Job runtimeProvider and SumeVaries by modelTime to a finished videoKeep waiting or poll status

See the startup state of the Sume server

The script below prints the startup state, so you can see whether the Sume server connected before the first turn. It needs claude, jq and SUME_API_KEY. The stream-json format needs --verbose in print mode, and the filter picks only the init event.

jq -n --arg k "$SUME_API_KEY" '{mcpServers:{sume:{type:"http",url:"https://mcp.sume.com/mcp",headers:{Authorization:("Bearer "+$k)}}}}' > /tmp/sume-mcp.json
claude -p "Reply with ok." --mcp-config /tmp/sume-mcp.json \
  --output-format stream-json --verbose \
  | jq -c 'select(.type=="system" and .subtype=="init") | {mcp_servers, mcp_server_errors}' \
  | head -1

Reading the result

If the server shows pending, the tool list was cached and the first tool call will connect it. If it shows an error, the next step is the server URL, the key, or the network, and not the video.

The Sume side of the wait

Sume's own remote limit is documented on the jobs page: the hosted jobs_wait tool holds for 50 seconds by default and caps at 55. When it returns wait_slice_expired, the job is still running. Call the same wait again with the same job id. Do not call the paid create tool again, because that would submit a second job. jobs_wait also takes 1 to 20 job ids, with wait_for set to all or any.

A rule for unattended scripts

So the rule for an unattended Claude Code script is short. Leave MCP_TIMEOUT at its default unless the server really needs longer to connect, keep paid creates idempotent, and loop on jobs_wait until the status is terminal.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume