pub struct McpManager { /* private fields */ }Expand description
MCP Manager for managing multiple MCP servers
Implementations§
Source§impl McpManager
impl McpManager
Sourcepub async fn register_server(&self, config: McpServerConfig)
pub async fn register_server(&self, config: McpServerConfig)
Register a server configuration
Sourcepub async fn disconnect(&self, name: &str) -> Result<()>
pub async fn disconnect(&self, name: &str) -> Result<()>
Disconnect from a server
Sourcepub async fn get_all_tools(&self) -> Vec<(String, McpTool)>
pub async fn get_all_tools(&self) -> Vec<(String, McpTool)>
Get all MCP tools with server prefix
Returns tools with names like mcp__github__create_issue
Sourcepub async fn call_tool(
&self,
full_name: &str,
arguments: Option<Value>,
) -> Result<CallToolResult>
pub async fn call_tool( &self, full_name: &str, arguments: Option<Value>, ) -> Result<CallToolResult>
Call an MCP tool by full name
Full name format: mcp__<server>__<tool>
Sourcepub async fn get_status(&self) -> HashMap<String, McpServerStatus>
pub async fn get_status(&self) -> HashMap<String, McpServerStatus>
Get status of all servers
Sourcepub async fn is_connected(&self, name: &str) -> bool
pub async fn is_connected(&self, name: &str) -> bool
Check if a server is connected
Sourcepub async fn list_connected(&self) -> Vec<String>
pub async fn list_connected(&self) -> Vec<String>
List connected server names
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for McpManager
impl !RefUnwindSafe for McpManager
impl Send for McpManager
impl Sync for McpManager
impl Unpin for McpManager
impl UnsafeUnpin for McpManager
impl !UnwindSafe for McpManager
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