Skip to main content

overlay_mcp_servers

Function overlay_mcp_servers 

Source
pub fn overlay_mcp_servers(
    mcp_json: &str,
    servers: &[McpServer],
) -> Option<String>
Expand description

Lay an agent’s effective MCP servers (Store::effective_mcp_servers) over a .mcp.json the frontend built (the agentmux entry and the agent’s legacy blob), so a picker launch gets the same catalog servers as agent.open. Rows win over the blob on a name collision, as in agent_config::build_mcp_config_from_refs; the agentmux entry is never replaced. None when mcp_json isn’t a JSON object with an mcpServers object: the caller writes it unchanged. SPEC_CONNECTORS_MCP_WHAT_AGENTS_RUN_2026_10_10.md §2.2.