# MCP_TIMEOUT

> It sets how long Claude Code waits for an MCP server to start.

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

## Think of it like

It is like you wait for a friend to show up. Then you start the game.

## Definition

MCP_TIMEOUT sets how long Claude Code waits for an MCP server to start. The value is in milliseconds. The default is 30,000, which is 30 seconds. A server that takes longer is not ready when the session begins.

## Example

Lucy's MCP server downloads a model when it starts and takes 45 seconds. She sets the wait to a minute, and its tools show up.

## Example code

```bash
export MCP_TIMEOUT=60000
claude
```

Give slow servers a minute to start.

## Why it matters

A slow server that misses the wait looks broken, even though it works.

## Common mistake

Mixing it up with MCP_TOOL_TIMEOUT. This one is for starting, not for a tool call.

## Three principles

- **Server start.** Not tool calls.
- **Default 30 seconds.** 30,000.
- **Milliseconds.** Not seconds.

## Related terms

- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [MCP_TOOL_TIMEOUT](https://learn.benibix.com/term/ai/mcp-tool-timeout-variable)
- [--mcp-config Flag](https://learn.benibix.com/term/ai/mcp-config-flag)

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