Skip to content
BENIBIX Learn

MCP_CONNECTION_NONBLOCKING

AI⌨️ Claude CodeConfiguration

Also known as MCP_CONNECTION_NONBLOCKING=0

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

Think of it like

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

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.

Why it matters

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

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 code

bash
export MCP_CONNECTION_NONBLOCKING=0
claude
Wait until every MCP server is ready.

Common mistake

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

Key takeaways

  1. 1
    Default: no wait. Tools arrive later.
  2. 2
    0 waits. Before the first prompt.
  3. 3
    alwaysLoad waits. Either way.