use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub enum McpServerConfig {
Stdio {
command: String,
args: Vec<String>,
env: std::collections::HashMap<String, String>,
},
Http {
url: String,
auth_token: Option<String>,
timeout_secs: Option<u64>,
},
Sse {
url: String,
auth_token: Option<String>,
timeout_secs: Option<u64>,
},
InProcess {
name: String,
},
}
impl McpServerConfig {
#[must_use]
pub const fn transport_kind(&self) -> &'static str {
match self {
Self::Stdio { .. } => "stdio",
Self::Http { .. } => "http",
Self::Sse { .. } => "sse",
Self::InProcess { .. } => "in-process",
}
}
}