claude mcp serve runs Claude Code as an MCP server, so other programs can use its tools. A subagent is a helper Claude starts for a separate task.
mcp serve now loads your agent definitions before it lists tools or answers calls. The Agent tool description includes an Available agent types: list, and subagent calls use those definitions. Before, the lists were empty.
The internal restrictions gain backgroundAgentLaunchDisabled and remoteAgentIsolationDisabled, set by disableBackgroundAgentLaunch() and disableRemoteAgentIsolation(). Before, only background tasks, unsandboxed commands and a deadline could be disabled this way.
In the restricted (http) mode of mcp serve, background-agent launch and remote-agent isolation are both turned off.
Why
Programs connected through claude mcp serve can now see and use your custom subagents. Background agents can be blocked without switching off every background task.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added sinceA small documentation edit on Review locally with /code-review touched a line naming CLAUDE_CODE_DISABLE_BACKGROUND_TASKS after this was published.* Set [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](/docs/en/env-vars) to `1`, which also turns off other background task featurescode-review-localsee the edit
Confirmed sinceAnthropic's documentation has since written up CLAUDE_CODE_DISABLE_BACKGROUND_TASKS, on Create custom subagents.If you set the [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](/docs/en/env-vars) environment variable to `1` instead of turning fork mode off, Claude waits for every subagent and background tasks are off, **Ctrl+B** included.sub-agentssee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear what sets `backgroundAgentLaunchDisabled` or whether a user can set it.
Anthropic's documentation agreesAnthropic's documentation has since written up CLAUDE_CODE_DISABLE_BACKGROUND_TASKS, on Create custom subagents.