{"version":"2.1.323","anchor":"sdk-mcp-tool-idle-timeout-can-be-set-by-the-host","canonical_anchor":"sdk-mcp-tool-idle-timeout-can-be-set-by-the-host","heading":"MCP tools for SDK hosts: own idle timeout and task results returned to the caller","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/sdk-mcp-tool-idle-timeout-can-be-set-by-the-host","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### MCP tools for SDK hosts: own idle timeout and task results returned to the caller\n\nApps embedding Claude Code can set an idle timeout for their own MCP tools and receive long-running task handles directly\n\n**Unclear.** Which SDK option a program uses to set this timeout.\n\n**What**\n\nMCP servers are add-ons that give Claude extra tools. An SDK host is an app that builds Claude Code into itself through the SDK, the programming kit for that. Such an app can supply its own MCP server, of type `\"sdk\"`. This release changes how calls to those tools are handled:\n\n- Idle timeout for SDK servers: the idle timeout is how long a tool call may go quiet before it is stopped. SDK servers now get their own idle watchdog. The timeout first uses a value the host sets with `setSdkMcpToolIdleTimeoutMs`, kept between 1000 ms and the server's maximum.\n\n- Other servers: `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` and the stdio and other defaults now apply only to servers that are not of type `\"sdk\"`.\n\n- Task handles: a task handle is a reference to long-running work. A new `taskToCaller` option sends the handle straight to the caller, and the tool result is empty text. Without it, a task with a background owner is waited on. A task that ends with no result gives the message `ended without a result`. Before, every task handle went to a single background handler.\n\n- Host capabilities: the settings a host can declare gained `desktopModeFromRecord`, `desktopMessageCard` and `desktopPluginInstallFrames`, which start as false, and `sdkMcpToolIdleTimeoutMs` and `shownPluginsDir`, which start unset.\n\nThe gate `tengu_gleaming_creek`, a switch Anthropic can flip from its servers, appears with this code. Nothing has been read about it yet.\n\n**Why**\n\nApps that embed Claude Code can control how long their own tools may stay idle and handle long-running MCP tasks themselves. The environment variable no longer affects tools from SDK servers.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}