pub struct McpConfig {Show 14 fields
pub servers: Vec<McpServerConfig>,
pub allowed_commands: Vec<String>,
pub max_dynamic_servers: usize,
pub pruning: ToolPruningConfig,
pub trust_calibration: TrustCalibrationConfig,
pub tool_discovery: ToolDiscoveryConfig,
pub max_description_bytes: usize,
pub max_instructions_bytes: usize,
pub elicitation_enabled: bool,
pub elicitation_timeout: u64,
pub elicitation_queue_capacity: usize,
pub elicitation_warn_sensitive_fields: bool,
pub lock_tool_list: bool,
pub default_env_isolation: bool,
}Fields§
§servers: Vec<McpServerConfig>§allowed_commands: Vec<String>§max_dynamic_servers: usize§pruning: ToolPruningConfigDynamic tool pruning for context optimization.
trust_calibration: TrustCalibrationConfigTrust calibration settings (opt-in, disabled by default).
tool_discovery: ToolDiscoveryConfigEmbedding-based tool discovery (#2321).
max_description_bytes: usizeMaximum byte length for MCP tool descriptions. Truncated with “…” if exceeded. Default: 2048.
max_instructions_bytes: usizeMaximum byte length for MCP server instructions. Truncated with “…” if exceeded. Default: 2048.
elicitation_enabled: boolEnable MCP elicitation (servers can request user input mid-task). Default: false — all elicitation requests are auto-declined. Opt-in because it interrupts agent flow and could be abused by malicious servers.
elicitation_timeout: u64Timeout for user to respond to an elicitation request (seconds). Default: 120.
elicitation_queue_capacity: usizeBounded channel capacity for elicitation events. Requests beyond this limit are auto-declined with a warning to prevent memory exhaustion from misbehaving servers. Default: 16.
elicitation_warn_sensitive_fields: boolWhen true, warn the user before prompting for fields whose names match sensitive patterns (password, token, secret, key, credential, etc.). Default: true.
lock_tool_list: boolLock tool lists after initial connection for all servers.
When true, tools/list_changed refresh events are rejected for servers that have
completed their initial connection, preventing mid-session tool injection.
Default: false (opt-in, backward compatible).
default_env_isolation: boolDefault env isolation for all Stdio servers. Per-server env_isolation overrides this.
When true, spawned processes only receive a minimal base env + their declared env map.
Default: false (backward compatible).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for McpConfig
impl<'de> Deserialize<'de> for McpConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for McpConfig
impl Serialize for McpConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request