pub struct McpConfig {
pub servers: Vec<McpServer>,
pub source: Option<McpSource>,
}Expand description
Complete MCP configuration containing multiple servers.
Fields§
§servers: Vec<McpServer>List of configured MCP servers
source: Option<McpSource>Source of this configuration
Implementations§
Source§impl McpConfig
impl McpConfig
Sourcepub fn add_server(&mut self, server: McpServer)
pub fn add_server(&mut self, server: McpServer)
Add a server to the configuration.
Sourcepub fn find_server(&self, name: &str) -> Option<&McpServer>
pub fn find_server(&self, name: &str) -> Option<&McpServer>
Find a server by name.
Sourcepub fn enabled_servers(&self) -> impl Iterator<Item = &McpServer>
pub fn enabled_servers(&self) -> impl Iterator<Item = &McpServer>
Get all enabled servers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpConfig
impl RefUnwindSafe for McpConfig
impl Send for McpConfig
impl Sync for McpConfig
impl Unpin for McpConfig
impl UnsafeUnpin for McpConfig
impl UnwindSafe for McpConfig
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