profiles for "codex mcp" mode: enable "codex mcp --profile=[model profile key defined in config.toml]"
Resolved 💬 3 comments Opened Aug 27, 2025 by neurostream Closed Jan 24, 2026
What feature would you like to see?
please allow codex running in MCP server mode ("codex mcp") to use the "profile" scheme already supported by the TUI and EXEC modes.
codex mcp --help
Experimental: run Codex as an MCP server
Usage: codex mcp [OPTIONS]
Options:
-c, --config <key=value>
Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as JSON. If it fails to parse as JSON, the raw string is used as a literal.
Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
-h, --help
Print help (see a summary with '-h')
if I run the codex TUI (the MCP _CLIENT_ in this scenario) with a config.toml entry like:
[mcp_servers.codex]
env = { "CODEX_HOME" = "/home/codex/mcp/codex" }
command = "codex"
args = [ "mcp", "--profile", "gpt-oss" ]
then the codex mcp server should read ${CODEX_HOME}/config.toml where a [profiles.gpt-oss] block is defined - instead of having break it out as "-c" options in the command line.
or, is there a design reason why "codex mcp" isn't supporting the same config.toml scheme that "codex [tui]" and "codex exec" does?
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗