# MCP_TOOL_TIMEOUT

> It sets how long one MCP tool call may run.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** MCP_TOOL_TIMEOUT environment variable

## Think of it like

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

## 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

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.

## Example code

```bash
export MCP_TOOL_TIMEOUT=300000
claude
```

Let MCP tools run up to 5 minutes.

## Why it matters

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

## Common mistake

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

## Three principles

- **Per tool call.** Milliseconds.
- **60 seconds on HTTP.** Raise above 60,000.
- **Per server wins.** In .mcp.json.

## Related terms

- [MCP_TIMEOUT](https://learn.benibix.com/term/ai/mcp-timeout-variable)
- [MCP Tool](https://learn.benibix.com/term/ai/mcp-tool)
- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)

## Told apart from

- [MCP_TIMEOUT vs MCP_TOOL_TIMEOUT](https://learn.benibix.com/compare/mcp-timeout-variable-vs-mcp-tool-timeout-variable): People think MCP_TIMEOUT is the limit on how long an MCP tool can run. It is the wait for a server to start, 30 seconds by default. MCP_TOOL_TIMEOUT is the limit on one tool call, about 28 hours by default, with a 60 second limit per request on servers reached over HTTP. A server that never shows its tools needs the first. A tool that fails partway needs the second.

---

Source: https://learn.benibix.com/term/ai/mcp-tool-timeout-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
