pub struct McpProxy { /* private fields */ }Expand description
MCP Proxy - Routes between internal HTTP and external SSE
Implementations§
Source§impl McpProxy
impl McpProxy
Sourcepub fn new(config: McpProxyConfig) -> Self
pub fn new(config: McpProxyConfig) -> Self
Create new MCP proxy
Sourcepub async fn list_tools_async(&self) -> Result<Vec<Tool>, ProtocolError>
pub async fn list_tools_async(&self) -> Result<Vec<Tool>, ProtocolError>
List tools from all servers (async version)
Sourcepub async fn call_tool_async(
&self,
name: &str,
arguments: Option<Value>,
) -> Result<CallToolResult, ProtocolError>
pub async fn call_tool_async( &self, name: &str, arguments: Option<Value>, ) -> Result<CallToolResult, ProtocolError>
Call tool (async version)
Sourcepub async fn health_check_all(&self) -> HashMap<String, bool>
pub async fn health_check_all(&self) -> HashMap<String, bool>
Health check all servers
Trait Implementations§
Source§impl ToolProvider for McpProxy
impl ToolProvider for McpProxy
Source§fn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>
fn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>
List tools from this provider
Source§fn call_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
_arguments: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
_arguments: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ProtocolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute tool via this provider
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