pub struct HttpMcpClient { /* private fields */ }Expand description
An MCP client that communicates with a remote server via Streamable HTTP.
Implementations§
Trait Implementations§
Source§impl McpClient for HttpMcpClient
impl McpClient for HttpMcpClient
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to the configured MCP server and perform the initialize handshake.
Source§fn list_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<McpTool>, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<McpTool>, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Discover all tools exposed by the server.
Source§fn call_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<McpToolResult, McpError>> + 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,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<McpToolResult, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Invoke a tool by name with the given arguments.
Auto Trait Implementations§
impl !Freeze for HttpMcpClient
impl !RefUnwindSafe for HttpMcpClient
impl !UnwindSafe for HttpMcpClient
impl Send for HttpMcpClient
impl Sync for HttpMcpClient
impl Unpin for HttpMcpClient
impl UnsafeUnpin for HttpMcpClient
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