pub struct McpServerConfig {
pub name: String,
pub transport: TransportKind,
pub command: String,
pub args: Vec<String>,
pub env: Vec<(String, String)>,
pub url: Option<String>,
pub auth_token: Option<String>,
pub headers: Vec<(String, String)>,
pub tier: Tier,
pub timeout_ms: u64,
pub disabled: bool,
}Expand description
Configuration for a single MCP server connection.
Fields§
§name: StringUnique name for this server, used in tool names as mcp.{name}.{tool}.
transport: TransportKindTransport protocol: stdio, http, or sse.
command: Stringstdio: the executable command to spawn.
args: Vec<String>stdio: command-line arguments passed to the executable.
env: Vec<(String, String)>stdio: environment variables for the subprocess.
url: Option<String>http/sse: the server URL to connect to.
auth_token: Option<String>http/sse: bearer token for authentication.
headers: Vec<(String, String)>http/sse: custom HTTP headers.
tier: TierApproval tier applied to all tools from this server.
timeout_ms: u64Connection initialization timeout in milliseconds.
disabled: boolIf true, skip this server at startup.
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
pub fn stdio( name: impl Into<String>, command: impl Into<String>, args: Vec<String>, tier: Tier, timeout_ms: u64, ) -> Self
pub fn http( name: impl Into<String>, url: impl Into<String>, auth_token: Option<String>, tier: Tier, timeout_ms: u64, ) -> Self
pub fn sse( name: impl Into<String>, url: impl Into<String>, auth_token: Option<String>, tier: Tier, timeout_ms: u64, ) -> Self
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§fn clone(&self) -> McpServerConfig
fn clone(&self) -> McpServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpServerConfig
impl Debug for McpServerConfig
Source§impl Documented for McpServerConfig
impl Documented for McpServerConfig
Source§impl DocumentedFields for McpServerConfig
impl DocumentedFields for McpServerConfig
Source§const FIELD_NAMES: &'static [&'static str]
const FIELD_NAMES: &'static [&'static str]
Field names, as accepted by
Self::get_field_docs. Read moreSource§const FIELD_DOCS: &'static [&'static str]
const FIELD_DOCS: &'static [&'static str]
The static doc comments on each field or variant of this type, indexed
by field/variant order.
Auto Trait Implementations§
impl Freeze for McpServerConfig
impl RefUnwindSafe for McpServerConfig
impl Send for McpServerConfig
impl Sync for McpServerConfig
impl Unpin for McpServerConfig
impl UnsafeUnpin for McpServerConfig
impl UnwindSafe for McpServerConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.