Use it now
Headless SDK sessions expose a session object for MCP servers with addMcpServer, removeMcpServer, toast, status and refreshContext.
Headless SDK sessions now expose a $.tool.register-style session object with addMcpServer, removeMcpServer, toast, status, and refreshContext hooks for MCP servers. In a headless session, calls to toast and status are logged rather than displayed, since there is no notification bar or status row to show them in.
Names in the bundleaddMcpServerremoveMcpServerrefreshContext
Documented inapi/agents-and-tools/mcp-connector
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.
Confirmed since
Anthropic's documentation has since written up addMcpServer, on permission-policies.
.addMcpServer(managed-agents/permission-policies see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up addMcpServer, on permission-policies.