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.

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 | Owner | Default | What it limits | If it fires |
|---|---|---|---|---|
| MCP_TIMEOUT | Claude Code | 30 seconds | Startup wait for MCP servers in -p | Check mcp_server_errors, retry the call |
| jobs_wait hold | Sume MCP | 50 seconds, cap 55 | One wait slice on a job | Retry the same wait; do not re-create the job |
| Job runtime | Provider and Sume | Varies by model | Time to a finished video | Keep 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 -1Reading 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
- MCP's 12-month deprecation window: what Sume tool authors can rely on
MCP 2026-07-28 sets a 12-month deprecation policy and deprecates HTTP+SSE, Roots, Sampling and Logging. Sume tool authors should read tools_list.
- MiniMax H3 aigc_watermark defaults to false: what Sume exposes
MiniMax's H3 API has an aigc_watermark boolean, off by default. What it does, and what to do for a minimax-h3 clip made through Sume.
- Omni and Seedance clips in one timeline: the fps resample warning
Clips from two video models can have different frame rates. Sume's timeline warns with output_fps_resamples_sources; probe each clip, then set output.fps.
- mode subscribe on Sume images is a 30-second wait: poll instead
On Sume, mode subscribe is an alias of sync with one wait of at most 30 seconds and no events. For a longer wait, submit async and poll status in your client.
Written by Sume