pub struct McpServer {
pub command: Option<Vec<String>>,
pub url: Option<String>,
pub env: BTreeMap<String, String>,
pub env_from: Vec<String>,
}Expand description
One MCP server, as declared for an agent.
Exactly one of command and url must be given. They are separate optional fields rather
than an untagged enum because deny_unknown_fields — which is what catches a typo like
comand — cannot be combined with a flattened enum, and silently accepting a misspelt field
would leave an agent without the server it thinks it has.
Fields§
§command: Option<Vec<String>>Command and arguments, for a server spoken to over stdio.
url: Option<String>Endpoint, for a server spoken to over HTTP.
env: BTreeMap<String, String>Non-secret environment variables, set literally.
For values that are safe in a committed file: a cluster name, a region, a default
database. Anything that authenticates belongs in McpServer::env_from.
env_from: Vec<String>Names of variables forwarded from the Tower’s own environment.
The Tower reads these at spawn time and passes them through. The value never appears in
layover.toml, so the file stays committable.