use std::collections::HashMap; use serde::Deserialize; #[derive(Debug, Deserialize, Clone)] pub struct McpServerConfig { pub name: String, pub transport: McpTransport, /// stdio only: the executable to spawn. pub command: Option, /// stdio only: arguments passed to the command. pub args: Option>, /// stdio only: extra environment variables (values support `${VAR}` interpolation). pub env: Option>, /// http only: base URL of the MCP server. pub url: Option, /// http only: API key sent as `Authorization: Bearer ` (supports `${VAR}` interpolation). pub api_key: Option, /// stdio only: when `Some(container)`, the command runs INSIDE that Docker /// container via `docker exec -i` instead of on the host. Set at runtime by /// the manager (per-user connectors, blueprint §7), never parsed from config. #[serde(skip)] pub launch_in: Option, } #[derive(Debug, Deserialize, Clone)] #[serde(rename_all = "snake_case")] pub enum McpTransport { Stdio, /// Streamable HTTP (remote MCP servers — previously called SSE). Http, /// Alias kept for backwards compatibility. Sse, }