pub struct McpManager { /* private fields */ }Expand description
Manages connections to multiple MCP servers and their tools
Implementations§
Source§impl McpManager
impl McpManager
pub fn new( event_sender: Sender<McpClientEvent>, oauth_handler_factory: Option<OAuthHandlerFactory>, ) -> Self
pub fn with_aether_home(self, aether_home: impl Into<PathBuf>) -> Self
pub fn with_oauth_credential_store( self, store: Arc<dyn OAuthCredentialStorage>, ) -> Self
pub async fn add_mcps(&mut self, servers: Vec<McpServer>) -> Result<()>
pub fn get_client_for_tool( &self, namespaced_tool_name: &str, arguments_json: &str, ) -> Result<(Arc<RunningService<RoleClient, McpClient>>, CallToolRequestParams)>
pub fn tool_definitions(&self) -> Vec<ToolDefinition>
pub fn server_instructions(&self) -> Vec<ServerInstructions>
pub fn server_statuses(&self) -> &[McpServerStatusEntry]
pub async fn authenticate_server_task( &mut self, name: &str, ) -> Result<impl Future<Output = McpConnectAttempt> + Send + 'static>
pub async fn apply_connection_attempt(&mut self, attempt: McpConnectAttempt)
Sourcepub async fn list_prompts(&self) -> Result<Vec<Prompt>>
pub async fn list_prompts(&self) -> Result<Vec<Prompt>>
List all prompts from all connected MCP servers with namespacing
Sourcepub async fn get_prompt(
&self,
namespaced_prompt_name: &str,
arguments: Option<Map<String, Value>>,
) -> Result<GetPromptResult>
pub async fn get_prompt( &self, namespaced_prompt_name: &str, arguments: Option<Map<String, Value>>, ) -> Result<GetPromptResult>
Get a specific prompt by namespaced name
Sourcepub async fn shutdown_server(&mut self, server_name: &str) -> Result<()>
pub async fn shutdown_server(&mut self, server_name: &str) -> Result<()>
Shutdown a specific server by name
Trait Implementations§
Source§impl Drop for McpManager
impl Drop for McpManager
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