pub struct McpConfig {Show 16 fields
pub chatgpt_base_url: String,
pub apps_mcp_product_sku: Option<String>,
pub codex_home: PathBuf,
pub mcp_oauth_credentials_store_mode: OAuthCredentialsStoreMode,
pub auth_keyring_backend_kind: AuthKeyringBackendKind,
pub mcp_oauth_callback_port: Option<u16>,
pub mcp_oauth_callback_url: Option<String>,
pub skill_mcp_dependency_install_enabled: bool,
pub approval_policy: Constrained<AskForApproval>,
pub codex_linux_sandbox_exe: Option<PathBuf>,
pub use_legacy_landlock: bool,
pub apps_enabled: bool,
pub prefix_mcp_tool_names: bool,
pub client_elicitation_capability: ElicitationCapability,
pub mcp_server_catalog: ResolvedMcpCatalog,
pub connector_snapshot: ConnectorSnapshot,
}Expand description
MCP runtime settings derived from codex_core::config::Config.
This struct should contain only long-lived configuration values that the
codex-mcp crate needs to construct server transports, enforce MCP
approval/sandbox policy, locate OAuth state, and merge plugin-provided MCP
servers. Request-scoped or auth-scoped state should not be stored here;
thread those values explicitly into runtime entry points such as
effective_mcp_servers and snapshot collection helpers so config objects
do not go stale when auth changes.
Fields§
§chatgpt_base_url: StringBase URL for ChatGPT-hosted app MCP servers, copied from the root config.
apps_mcp_product_sku: Option<String>Optional product SKU forwarded to the host-owned apps MCP server.
codex_home: PathBufCodex home directory used for MCP OAuth state and app-tool cache files.
mcp_oauth_credentials_store_mode: OAuthCredentialsStoreModePreferred credential store for MCP OAuth tokens.
auth_keyring_backend_kind: AuthKeyringBackendKindBackend used when MCP OAuth storage is configured for keyring-backed persistence.
mcp_oauth_callback_port: Option<u16>Optional fixed localhost callback port for MCP OAuth login.
mcp_oauth_callback_url: Option<String>Optional OAuth redirect URI override for MCP login.
skill_mcp_dependency_install_enabled: boolWhether skill MCP dependency installation prompts are enabled.
approval_policy: Constrained<AskForApproval>Approval policy used for MCP tool calls and MCP elicitation requests.
codex_linux_sandbox_exe: Option<PathBuf>Optional path to codex-linux-sandbox for sandboxed MCP tool execution.
use_legacy_landlock: boolWhether to use legacy Landlock behavior in the MCP sandbox state.
apps_enabled: boolWhether the app MCP integration is enabled by config.
ChatGPT auth is checked separately before a materialized host-owned Apps server can be used.
prefix_mcp_tool_names: boolWhether model-visible MCP tool namespaces should keep the legacy
mcp__ prefix.
client_elicitation_capability: ElicitationCapabilityClient-side elicitation capabilities advertised during MCP initialization.
mcp_server_catalog: ResolvedMcpCatalogResolved MCP registrations keyed by logical server name.
connector_snapshot: ConnectorSnapshotPlugin declarations used to attribute connector tools to plugin display names. MCP registrations retain their own package attribution in the catalog.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for McpConfig
impl !UnwindSafe for McpConfig
impl Freeze for McpConfig
impl Send for McpConfig
impl Sync for McpConfig
impl Unpin for McpConfig
impl UnsafeUnpin for McpConfig
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,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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