pub struct McpProxy { /* private fields */ }Expand description
The MCP security proxy (TCP transport).
Listens for incoming MCP connections, intercepts tool call requests, runs them through the policy engine, and forwards allowed requests to the upstream MCP server.
Implementations§
Source§impl McpProxy
impl McpProxy
Sourcepub fn new(engine: Engine, config: ProxyConfig) -> Self
pub fn new(engine: Engine, config: ProxyConfig) -> Self
Creates a new proxy with the given engine and configuration.
Sourcepub fn with_audit(
engine: Engine,
config: ProxyConfig,
audit: AuditLogger,
) -> Self
pub fn with_audit( engine: Engine, config: ProxyConfig, audit: AuditLogger, ) -> Self
Creates a new proxy with a custom audit logger.
Sourcepub fn config(&self) -> &ProxyConfig
pub fn config(&self) -> &ProxyConfig
Returns a reference to the proxy configuration.
Sourcepub fn stats(&self) -> &Arc<ProxyStats>
pub fn stats(&self) -> &Arc<ProxyStats>
Returns a reference to the proxy stats.
Sourcepub async fn replace_engine(&self, new_engine: Engine)
pub async fn replace_engine(&self, new_engine: Engine)
Replaces the engine with a new one (for hot-reload).
Auto Trait Implementations§
impl Freeze for McpProxy
impl !RefUnwindSafe for McpProxy
impl Send for McpProxy
impl Sync for McpProxy
impl Unpin for McpProxy
impl UnsafeUnpin for McpProxy
impl !UnwindSafe for McpProxy
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
Mutably borrows from an owned value. Read more