pub enum McpNetMode {
Inherit,
Restricted,
BroadAudited,
Off,
}Expand description
How an MCP server’s outbound network is scoped.
Variants§
Inherit
No per-server policy and no proxy — the default.
NOT “inherits entitlements.network.outbound.allow_hosts”, despite the
name. That list is enforced in-process (a DNS guard on the runtime’s own
HTTP client, plus the B0 gate on the agent’s network.* tools), and a
spawned server never runs either. What a server here actually inherits
is the OS sandbox — which restricts by PORT, with the host left open.
So an agent whose allow_hosts names one API still lets an Inherit
server reach any host on an allowed port. Use Restricted to bound a
server by host. The variant keeps its name because it is a serialized
wire value; the lie was the doc, and it is fixed here rather than
migrated.
Restricted
Allow only allow_hosts, routed through the runtime egress proxy.
BroadAudited
Allow ALL hosts EXCEPT deny_hosts, routed through the runtime egress
proxy, with every CONNECT audited. For trusted-but-broad tools (e.g. a
web-research browser) that cannot enumerate their destinations. Requires
explicit operator consent (records authorization); downgraded to
Inherit on import (lowest trust). Advisory enforcement (see egress_proxy).
Off
No outbound for this server at all.
Trait Implementations§
Source§impl Clone for McpNetMode
impl Clone for McpNetMode
Source§fn clone(&self) -> McpNetMode
fn clone(&self) -> McpNetMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for McpNetMode
Source§impl Debug for McpNetMode
impl Debug for McpNetMode
Source§impl Default for McpNetMode
impl Default for McpNetMode
Source§fn default() -> McpNetMode
fn default() -> McpNetMode
Source§impl<'de> Deserialize<'de> for McpNetMode
impl<'de> Deserialize<'de> for McpNetMode
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 McpNetMode
Source§impl PartialEq for McpNetMode
impl PartialEq for McpNetMode
Source§impl Serialize for McpNetMode
impl Serialize for McpNetMode
impl StructuralPartialEq for McpNetMode
Auto Trait Implementations§
impl Freeze for McpNetMode
impl RefUnwindSafe for McpNetMode
impl Send for McpNetMode
impl Sync for McpNetMode
impl Unpin for McpNetMode
impl UnsafeUnpin for McpNetMode
impl UnwindSafe for McpNetMode
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§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.