pub fn build_mcp_config(
user_mcp_content: Option<&str>,
agent_name: &str,
agent_bus_id: &str,
) -> Option<String>Expand description
Build .mcp.json content with the auto-injected AgentMux MCP server entry.
The AgentMux server is always present as mcpServers.agentmux.
If user_mcp_content is Some, its mcpServers entries are merged on top
(user entries win over the auto-injected entry if the key collides).
If the user content is not valid JSON the auto-injected-only config is
returned and no error is propagated (mirrors TS behavior).
Returns None only if serialization unexpectedly fails (should never happen).
Mirrors buildMcpConfig() in frontend/app/view/agent/agent-model.ts.