Skip to main content

McpServerSpec

Struct McpServerSpec 

Source
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: String

Remote 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.

§tags: Vec<TrifectaTag>

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

Source§

fn clone(&self) -> McpServerSpec

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for McpServerSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for McpServerSpec

Source§

fn default() -> McpServerSpec

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for McpServerSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for McpServerSpec

Source§

impl PartialEq for McpServerSpec

Source§

fn eq(&self, other: &McpServerSpec) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for McpServerSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for McpServerSpec

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more