pub struct McpServerConfig {Show 16 fields
pub transport: McpServerTransportConfig,
pub auth: McpServerAuth,
pub environment_id: String,
pub enabled: bool,
pub required: bool,
pub supports_parallel_tool_calls: bool,
pub disabled_reason: Option<McpServerDisabledReason>,
pub startup_timeout_sec: Option<Duration>,
pub tool_timeout_sec: Option<Duration>,
pub default_tools_approval_mode: Option<AppToolApproval>,
pub enabled_tools: Option<Vec<String>>,
pub disabled_tools: Option<Vec<String>>,
pub scopes: Option<Vec<String>>,
pub oauth: Option<McpServerOAuthConfig>,
pub oauth_resource: Option<String>,
pub tools: HashMap<String, McpServerToolConfig>,
}Fields§
§transport: McpServerTransportConfig§auth: McpServerAuthAuthentication flow to use when no configured authorization resolves.
environment_id: StringEffective environment id for where Codex should start this MCP server.
enabled: boolWhen false, Codex skips initializing this MCP server.
required: boolWhen true, codex exec exits with an error if this MCP server fails to initialize.
supports_parallel_tool_calls: boolWhen true, every tool from this server is advertised as safe for parallel tool calls.
disabled_reason: Option<McpServerDisabledReason>Reason this server was disabled after applying requirements.
startup_timeout_sec: Option<Duration>Startup timeout in seconds for initializing MCP server & initially listing tools.
tool_timeout_sec: Option<Duration>Default timeout for MCP tool calls initiated via this server.
default_tools_approval_mode: Option<AppToolApproval>Approval mode for tools in this server unless a tool override exists.
enabled_tools: Option<Vec<String>>Explicit allow-list of tools exposed from this server. When set, only these tools will be registered.
disabled_tools: Option<Vec<String>>Explicit deny-list of tools. These tools will be removed after applying enabled_tools.
scopes: Option<Vec<String>>Optional OAuth scopes to request during MCP login.
oauth: Option<McpServerOAuthConfig>Optional OAuth client settings for MCP login.
oauth_resource: Option<String>Optional OAuth resource parameter to include during MCP login (RFC 8707).
tools: HashMap<String, McpServerToolConfig>Per-tool approval settings keyed by tool name.
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
pub fn is_local_environment(&self) -> bool
pub fn oauth_client_id(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§fn clone(&self) -> McpServerConfig
fn clone(&self) -> McpServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpServerConfig
impl Debug 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>,
Source§impl PartialEq for McpServerConfig
impl PartialEq for McpServerConfig
Source§impl Serialize for McpServerConfig
impl Serialize for McpServerConfig
impl StructuralPartialEq for McpServerConfig
Source§impl TryFrom<RawMcpServerConfig> for McpServerConfig
impl TryFrom<RawMcpServerConfig> 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<T> AsTypeStaticRegistered for T
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<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<T> HasTyVTable for Twhere
T: ?Sized,
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