{"version":"2.1.248","anchor":"per-server-timeouts-for-sdk-hosted-mcp-servers","canonical_anchor":"per-server-timeouts-for-sdk-hosted-mcp-servers","heading":"Per-server timeouts for SDK-hosted MCP servers","tier":"use","area":"MCP","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/per-server-timeouts-for-sdk-hosted-mcp-servers","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Per-server timeouts for SDK-hosted MCP servers\n\nSDK-hosted MCP servers can each carry their own timeout, applied when registered.\n\n**What**\n\nAn SDK client can now attach a timeout to each MCP server it runs in-process, and the CLI applies that timeout when it registers the server. The setting travels in a new field on the `initialize` handshake that older CLIs ignore, so adding it does not break against v2.1.247, where the field does not exist at all. Changing a timeout on an already-registered server is deliberately ignored, and malformed configuration is skipped with a warning rather than failing the handshake.\n\n**Details**\n\n- Timeouts travel in a new `sdkMcpServerConfigs` map on the `initialize` request, keyed by server name, and are echoed back in the `mcp_set_servers` control event that tells the CLI which servers exist.\n- The field is documented as settings for the SDK-hosted MCP servers named in `sdkMcpServers`, keyed by server name; a timeout is the only setting it currently carries.\n- The client only sends the field when at least one in-process server actually declares a timeout, and nothing else gates it in this build: it is live for any SDK caller that sets one.\n- A timeout is a per-server HTTP request timeout in milliseconds that raises both the fetch first-byte budget and the tool-call watchdog, capped at five minutes, and ignored when the existing `timeout` option is also set.\n- A non-object value for the whole map is dropped and logged as `initialize: ignoring sdkMcpServerConfigs (not an object keyed by server name)`.\n- Re-sending a different timeout for a server that is already registered logs that the change is ignored until the server is removed and re-added; you must remove and re-add the server for a new timeout to take effect.\n- Registered in-process servers are recorded as `type: \"sdk\"` entries.\n- Internally the client's two parallel bookkeeping maps for transports and server instances collapsed into one `sdkMcpServers` map holding `{ transport, timeout }`, which is now also what the check for whether a bidirectional connection is needed reads.\n\n**Evidence**\n\n`initialize: ignoring sdkMcpServerConfigs (not an object keyed by server name)`, `MCP server '${g}' is already registered; its timeout change is ignored until the server is removed and re-added`, `is already registered; its timeout change is ignored until the server is removed and re-added`, `Per-server HTTP request timeout in milliseconds, set by the host on the mcp_set_servers control event.`, `sdkMcpServers`, `type: \"sdk\"`, `Settings for the SDK-hosted MCP servers named in sdkMcpServers, keyed by server name.`\n\n- Area: MCP\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5"}