Expand description
The MCP servers an agent launches with, put into its .mcp.json: the same
rows on both launch paths, agent.open (agent_config::build_mcp_config_from_refs)
and the picker’s writeagentconfig (overlay_mcp_servers).
SPEC_CONNECTORS_MCP_WHAT_AGENTS_RUN_2026_10_10.md §2.2.
Functions§
- add_
to_ files - The picker path’s MCP step (
writeagentconfig): lay the agent’s effective servers over the.mcp.jsonamong the frontend’s files, which has only theagentmuxentry and the agent’s legacy blob. Nothing to do without one, or without an agent id (an older frontend sends none). - insert_
server_ 🔒rows - Put server rows into an
mcpServersmap, each under its name. A row namedagentmuxis skipped: the built-in entry always wins. - is_
launched 🔒 - Whether a row is written into
.mcp.jsonat all: not the reservedagentmuxname, and a config that is JSON.insert_server_rowsskips the others, so a server that is never launched is never “missing”. - missing_
for_ agent missing_serversforagent_id: what AgentMux would launch it with now (Store::effective_mcp_servers, which gives a container agent only what is switched on for containers) against what its CLI reported.- missing_
for_ pane - What a pane needs a restart for:
missing_for_agentfor a pane running an agent definition.definition_typeis that definition’s kind,Nonewhenagent_idnames no definition: a quick-launch pane’s “agent id” is its provider’s name, and no.mcp.jsonis written for it, so there is nothing to restart for.pane_modeis the pane’s ownagentMode, whichwriteagentconfiglaunched it by and the picker’s runtime override can set differently from the definition’s. - missing_
servers - The catalog (global) servers AgentMux launches an agent with that its CLI
doesn’t report (
reported, frombackend::mcp_observed), by name. That is a server bound or switched on after the agent started:.mcp.jsonis written at launch, so the agent needs a restart to get it. A server the CLI reports as failed is reported, so not missing. The agent’s own private servers are left out: the pane matches by name against catalog rows, and a private server can share a name with a catalog one. - overlay_
for_ agent overlay_mcp_serverswithagent_id’s effective servers (Store::effective_mcp_servers):refsholds the agent binds,catalogthe catalog and its reach switches. The picker path’s whole MCP step.- overlay_
mcp_ servers - Lay an agent’s effective MCP servers (
Store::effective_mcp_servers) over a.mcp.jsonthe frontend built (theagentmuxentry and the agent’s legacy blob), so a picker launch gets the same catalog servers asagent.open. Rows win over the blob on a name collision, as inagent_config::build_mcp_config_from_refs; theagentmuxentry is never replaced.Nonewhenmcp_jsonisn’t a JSON object with anmcpServersobject: the caller writes it unchanged.SPEC_CONNECTORS_MCP_WHAT_AGENTS_RUN_2026_10_10.md§2.2.