{"version":"2.1.286","anchor":"new-mcp-pre-wait-env-vars-for-named-servers","canonical_anchor":"mcp-prewait-by-name-env-vars-added-only-for-sdk-url-remote","heading":"Remote sessions can wait for specific named MCP servers before the first turn","tier":"use","area":"MCP","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286\/e\/new-mcp-pre-wait-env-vars-for-named-servers","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.286","markdown":"### Remote sessions can wait for specific named MCP servers before the first turn\n\n`CLAUDE_CODE_MCP_PREWAIT_SERVERS` and `CLAUDE_CODE_MCP_PREWAIT_SERVERS_MS` let a remote host hold the first turn for named MCP servers\n\n**Unclear.** The format of the server list and the unit of the `_MS` value are not stated.\n\n**What**\n\nMCP servers are separate programs that give Claude Code extra tools. Claude Code could already hold the first turn while waiting for some servers. Two new environment variables (settings passed to Claude Code when it starts) let a host name the exact servers to wait for.\n\n- `CLAUDE_CODE_MCP_PREWAIT_SERVERS` names the servers to wait for.\n\n- `CLAUDE_CODE_MCP_PREWAIT_SERVERS_MS` sets how long to wait, in milliseconds.\n\n- They sit next to the existing `CLAUDE_CODE_MCP_CONNECTOR_PREWAIT_MS` and are read only in remote worker sessions, meaning sessions started with an SDK URL.\n\n- If a named server has no matching `--mcp-config` entry at startup, Claude Code logs a warning and does not wait for it.\n\n- A log message about probing servers was reworded from one about claude.ai connectors to a general `[mcp]` message, so the probing seems to cover servers in general.\n\n**Why**\n\nA host running Claude Code remotely can make sure particular tools are ready before Claude starts working, instead of relying only on the general startup wait. Check that each name matches an `--mcp-config` entry, or the wait is skipped for it.\n\n- Area: MCP\n- Names: `CLAUDE_CODE_MCP_CONNECTOR_PREWAIT_MS`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}