pub struct MultiServerMcpClientConfig {
pub servers: HashMap<String, Connection>,
pub global_tool_prefix: Option<String>,
pub server_prefixes: HashMap<String, String>,
}Expand description
Configuration used to build a MultiServerMcpClient.
Fields§
§servers: HashMap<String, Connection>Named server connections.
global_tool_prefix: Option<String>Optional prefix applied to all aggregated tool names.
Per-server prefixes can be set via with_server_prefix.
server_prefixes: HashMap<String, String>Per-server tool name prefixes (override the global prefix for a specific server).
Implementations§
Source§impl MultiServerMcpClientConfig
impl MultiServerMcpClientConfig
Sourcepub fn with_server(
self,
name: impl Into<String>,
connection: Connection,
) -> Self
pub fn with_server( self, name: impl Into<String>, connection: Connection, ) -> Self
Adds a named server to the configuration.
Sourcepub fn with_server_prefix(
self,
server_name: impl Into<String>,
prefix: impl Into<String>,
) -> Self
pub fn with_server_prefix( self, server_name: impl Into<String>, prefix: impl Into<String>, ) -> Self
Sets a per-server tool name prefix.
Sourcepub fn with_global_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_global_prefix(self, prefix: impl Into<String>) -> Self
Sets the global tool name prefix applied to all servers that lack a per-server prefix.
Trait Implementations§
Source§impl Debug for MultiServerMcpClientConfig
impl Debug for MultiServerMcpClientConfig
Source§impl Default for MultiServerMcpClientConfig
impl Default for MultiServerMcpClientConfig
Source§fn default() -> MultiServerMcpClientConfig
fn default() -> MultiServerMcpClientConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MultiServerMcpClientConfig
impl RefUnwindSafe for MultiServerMcpClientConfig
impl Send for MultiServerMcpClientConfig
impl Sync for MultiServerMcpClientConfig
impl Unpin for MultiServerMcpClientConfig
impl UnsafeUnpin for MultiServerMcpClientConfig
impl UnwindSafe for MultiServerMcpClientConfig
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