pub struct GatewayServer {
pub name: String,
pub transport: TransportKind,
pub enabled: bool,
pub command: String,
pub args: Vec<String>,
pub env: BTreeMap<String, String>,
pub binary_sha256: String,
pub url: String,
pub headers: BTreeMap<String, String>,
pub capabilities: Option<AddonCapabilities>,
}Expand description
A single downstream MCP server entry ([[gateway.servers]]).
Flat shape (rather than an internally-tagged enum) so it round-trips
cleanly through TOML array-of-tables. Validated into a ResolvedTransport
via GatewayServer::resolve before use.
Fields§
§name: StringStable identifier; becomes the catalog namespace (name::tool).
transport: TransportKindstdio (spawn command) or http (connect to url).
enabled: boolPer-server switch; lets you keep an entry but skip it.
command: StringExecutable to spawn (stdio transport).
args: Vec<String>Arguments passed to command.
env: BTreeMap<String, String>Extra environment variables for the child process.
binary_sha256: StringOptional SHA-256 pin of the stdio command binary (P3). When set, the
spawn point (crate::core::gateway::client) verifies the resolved
binary’s hash and refuses to launch a swapped executable. Empty =
unpinned (legacy behaviour). Part of the wiring, so it is covered by the
install-time integrity hash (crate::core::addons::integrity).
url: StringStreamable-HTTP endpoint (http transport).
headers: BTreeMap<String, String>Extra request headers (e.g. auth) for the http transport.
capabilities: Option<AddonCapabilities>Declared capabilities (P1). None keeps the legacy addons.sandbox
behaviour; Some enforces a per-server OS sandbox + env allowlist
derived from the declared permissions at the spawn point. Carried here so
the live [[gateway.servers]] config — the single source of truth for
what runs — also records what each server is allowed to do.
Implementations§
Source§impl GatewayServer
impl GatewayServer
Sourcepub fn resolve(&self) -> Result<ResolvedTransport, String>
pub fn resolve(&self) -> Result<ResolvedTransport, String>
Validate the entry and produce a usable transport, or a human-readable reason why it cannot be used.
Trait Implementations§
Source§impl Clone for GatewayServer
impl Clone for GatewayServer
Source§fn clone(&self) -> GatewayServer
fn clone(&self) -> GatewayServer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GatewayServer
impl Debug for GatewayServer
Source§impl Default for GatewayServer
impl Default for GatewayServer
Source§impl<'de> Deserialize<'de> for GatewayServerwhere
GatewayServer: Default,
impl<'de> Deserialize<'de> for GatewayServerwhere
GatewayServer: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for GatewayServer
Source§impl PartialEq for GatewayServer
impl PartialEq for GatewayServer
Source§fn eq(&self, other: &GatewayServer) -> bool
fn eq(&self, other: &GatewayServer) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for GatewayServer
impl Serialize for GatewayServer
impl StructuralPartialEq for GatewayServer
Auto Trait Implementations§
impl Freeze for GatewayServer
impl RefUnwindSafe for GatewayServer
impl Send for GatewayServer
impl Sync for GatewayServer
impl Unpin for GatewayServer
impl UnsafeUnpin for GatewayServer
impl UnwindSafe for GatewayServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more