# MCP_CONNECTION_NONBLOCKING

> Set to 0, it waits for MCP servers before the first prompt.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** MCP_CONNECTION_NONBLOCKING=0

## Think of it like

It is like you start the meal while some guests are still on their way.

## Definition

MCP_CONNECTION_NONBLOCKING decides if Claude Code waits for MCP servers at start. By default it does not wait: servers connect in the back, and their tools show up when ready. Set it to 0 to wait for them before the first prompt. Servers marked alwaysLoad make it wait anyway.

## Example

Jack's first prompt always needs his database server, but it was not ready yet. He sets this to 0, and the tools are there from the start.

## Example code

```bash
export MCP_CONNECTION_NONBLOCKING=0
claude
```

Wait until every MCP server is ready.

## Why it matters

Not waiting makes start fast. Waiting makes sure the first prompt has every tool.

## Common mistake

Setting it to 0 with a slow server. Every start then waits for that server.

## Three principles

- **Default: no wait.** Tools arrive later.
- **0 waits.** Before the first prompt.
- **alwaysLoad waits.** Either way.

## Related terms

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

---

Source: https://learn.benibix.com/term/ai/mcp-connection-nonblocking-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.
