pub struct McpProxyClient { /* private fields */ }Expand description
Single upstream MCP server connection.
Implementations§
Source§impl McpProxyClient
impl McpProxyClient
Sourcepub async fn connect(
name: &str,
url: &str,
tool_prefix: Option<&str>,
token: Option<&SecretString>,
auth_type: &str,
transport: ProxyTransport,
) -> Result<Self>
pub async fn connect( name: &str, url: &str, tool_prefix: Option<&str>, token: Option<&SecretString>, auth_type: &str, transport: ProxyTransport, ) -> Result<Self>
Connect to an upstream MCP server, perform initialize handshake, fetch tools.
Sourcepub async fn fetch_tools(&mut self) -> Result<()>
pub async fn fetch_tools(&mut self) -> Result<()>
Fetch tools/list from upstream. Call this before using prefixed_tools().
Sourcepub fn prefixed_tools(&self) -> Vec<ToolDefinition>
pub fn prefixed_tools(&self) -> Vec<ToolDefinition>
Return upstream tools with prefixed names.
Sourcepub fn raw_upstream_tools(&self) -> &[ToolDefinition]
pub fn raw_upstream_tools(&self) -> &[ToolDefinition]
Return the raw upstream tool catalogue (without prefixing).
Used by the signature matcher to compare upstream definitions against the local
tool registry. Empty until fetch_tools() has been called.
Auto Trait Implementations§
impl !Freeze for McpProxyClient
impl !RefUnwindSafe for McpProxyClient
impl Send for McpProxyClient
impl Sync for McpProxyClient
impl Unpin for McpProxyClient
impl UnsafeUnpin for McpProxyClient
impl !UnwindSafe for McpProxyClient
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