pub struct McpServerConfig {
pub command: Option<String>,
pub args: Option<Vec<String>>,
pub env: Option<BTreeMap<String, String>>,
pub cwd: Option<String>,
pub url: Option<String>,
pub headers: Option<BTreeMap<String, String>>,
pub transport: Option<McpServerTransport>,
pub auth: Option<McpClientCredentials>,
pub prefix: Option<String>,
pub tool_filters: Option<SerializableMcpToolFilters>,
pub disabled: bool,
pub continue_on_error: Option<bool>,
}Expand description
One server entry of a config file or map (McpServerConfig).
Give command (stdio) or url (streamable HTTP or SSE). Without transport it is detected
from the fields present. String fields support ${VAR} and ${env:VAR} placeholders.
Fields§
§command: Option<String>The command to spawn (stdio).
args: Option<Vec<String>>Its arguments.
env: Option<BTreeMap<String, String>>Variables for the child process, over the default environment.
cwd: Option<String>The working directory of the child process.
url: Option<String>The server URL (streamable HTTP or SSE).
headers: Option<BTreeMap<String, String>>Headers sent with every request.
transport: Option<McpServerTransport>The transport; detected from command or url when absent.
auth: Option<McpClientCredentials>OAuth client credentials (streamable HTTP only).
prefix: Option<String>Prefix for agent-facing tool names.
tool_filters: Option<SerializableMcpToolFilters>Filters applied to tool names.
disabled: boolSkips this server.
continue_on_error: Option<bool>Skips config and connection failures and overlong prefixed names with warnings.
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
Sourcepub fn builder() -> McpServerConfigBuilder
pub fn builder() -> McpServerConfigBuilder
Create an instance of McpServerConfig using the builder syntax
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§impl Debug for McpServerConfig
impl Debug for McpServerConfig
Source§impl Default for McpServerConfig
impl Default for McpServerConfig
Source§impl<'de> Deserialize<'de> for McpServerConfig
impl<'de> Deserialize<'de> for McpServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for McpServerConfig
Source§impl PartialEq for McpServerConfig
impl PartialEq for McpServerConfig
impl StructuralPartialEq for McpServerConfig
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more