pub struct McpClient { /* private fields */ }Expand description
MCP client for communicating with MCP servers.
This provides the transport and protocol layer. Integration with
Converge’s ToolDefinition types stays in converge-provider.
Implementations§
Source§impl McpClient
impl McpClient
pub fn new(name: impl Into<String>, transport: McpTransport) -> McpClient
pub fn name(&self) -> &str
pub fn transport(&self) -> &McpTransport
pub fn is_connected(&self) -> bool
Sourcepub fn connect(&mut self) -> Result<&McpServerInfo, McpClientError>
pub fn connect(&mut self) -> Result<&McpServerInfo, McpClientError>
Connect to the MCP server.
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Disconnect from the MCP server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpClient
impl RefUnwindSafe for McpClient
impl Send for McpClient
impl Sync for McpClient
impl Unpin for McpClient
impl UnsafeUnpin for McpClient
impl UnwindSafe for McpClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request