pub struct McpServerSpec {
pub name: String,
pub endpoint: String,
pub headers: Vec<(String, String)>,
pub tags: Vec<TrifectaTag>,
pub aauth: Option<bool>,
pub oauth: Option<McpOauthSpec>,
pub auth: Option<AuthSpec>,
pub service: Option<String>,
pub rate: Option<String>,
}Expand description
A declared MCP server. Serializable because it travels in the subagent spawn payload as the child’s scoped server subset.
The sole transport is a remote endpoint reached over
Streamable HTTP. There is no local process spawn, so no configuration path
can turn an MCP server into command execution on this host.
Fields§
§name: String§endpoint: StringRemote MCP endpoint — https://host[:port][/path] (loopback http://
for dev), reached over Streamable HTTP.
headers: Vec<(String, String)>Secret-FREE auth/framing header templates (e.g. ("Authorization", "Bearer {{secret:MCP_TOKEN}}")), resolved at connect time — no credential is
ever present in the spec, manifest, spawn payload or logs.
Operator-declared capability tags (--mcp-tags) for the Rule-of-Two
trifecta check. Travels in the spawn payload so a child’s narrowed grant
carries the same tags. Empty = untagged, and the check treats an
untagged server conservatively as untrusted_input — so forgetting to
tag a server can only tighten the gate, never loosen it.
aauth: Option<bool>Sign requests to THIS server with the AAuth agent identity.
Per-server opt-in: None inherits the global default (sign all when an
--aauth-provider is configured); Some(false) opts out; Some(true)
opts in even if the global default were off. Travels in the spawn payload.
oauth: Option<McpOauthSpec>OAuth 2.1 client-credentials for an endpoint behind an OAuth gateway:
a refreshing Authorization: Bearer … fetched from the
token endpoint. Secret-free (client_secret is a {{secret:…}}
template). Travels in the spawn payload; takes the request-signer seam
when set (mutually exclusive with per-server AAuth signing).
auth: Option<AuthSpec>The unified credential provider. When set it takes precedence over the
narrower oauth / aauth settings. Travels in the spawn payload.
service: Option<String>The services: catalog entry this server references. The credential
cache key becomes service:<name>, so every consumer of the
entry shares one cached login, and the per-instance rate: bucket is
keyed by it. Travels in the spawn payload.
rate: Option<String>The entry’s rate: (resolved at config load) — seeds the per-process
pace registry at connect time, so worker and subagent processes pace
their own in-loop calls too. Travels in the spawn payload.
Trait Implementations§
Source§impl Clone for McpServerSpec
impl Clone for McpServerSpec
Source§fn clone(&self) -> McpServerSpec
fn clone(&self) -> McpServerSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more