Skip to content
BENIBIX Learn

MCP_TOOL_TIMEOUT

AI⌨️ Claude CodeConfiguration

Also known as MCP_TOOL_TIMEOUT environment variable

It sets how long one MCP tool call may run.

Think of it like

It is like you wait for a helper to finish a job. You only wait so long.

Example

Jack's HTTP server runs reports that take 2 minutes, and they kept failing at 60 seconds. He sets 5 minutes, and the reports come back.

Why it matters

Slow tools on a web server hit the 60 second wall unless you raise it.

Definition

MCP_TOOL_TIMEOUT sets how long one MCP tool call may run before Claude Code stops it. The value is in milliseconds, and the default is about 28 hours. A server reached over HTTP also stops each request after 60 seconds. Set this above 60,000 to raise that too. A timeout set for one server in .mcp.json wins for that server.

Example code

bash
export MCP_TOOL_TIMEOUT=300000
claude
Let MCP tools run up to 5 minutes.

Common mistake

Lowering it to speed up a slow server. That only stops calls sooner. It never makes them faster.

Key takeaways

  1. 1
    Per tool call. Milliseconds.
  2. 2
    60 seconds on HTTP. Raise above 60,000.
  3. 3
    Per server wins. In .mcp.json.

Compare