What Codex MCP configuration is Codex supports STDIO and Streamable HTTP MCP servers. You add them with the codex mcp CLI, the IDE extension settings, or by editing ~/.codex/config.toml or a project-scoped .codex/config.toml. OAuth login is supported with codex mcp login.
What it does How Codex MCP configuration plugs in: which agents run it and what it adds RUNS IN Your agent OpenAI Codex one host documented MCP SERVER · OFFICIAL Codex MCP configuration Connect the agent to tools, data… 5 install steps 1 permission note license: Apache-2.0 WHAT IT ADDS What it does Adds MCP servers with codex mcp a… Configures STDIO servers (command… Supports OAuth via codex mcp login Per-server tool allow/deny lists… agent → extension → new capability · from the official repository or docs Where Codex MCP configuration runs and what it adds, from its documentation Adds MCP servers with codex mcp add and lists them with codex mcp list Configures STDIO servers (command, args, env, env_vars, cwd) and Streamable HTTP servers (url, bearer token, headers) Supports OAuth via codex mcp login Per-server tool allow/deny lists and approval modes (auto, prompt, writes, approve) Startup and tool timeouts (defaults 10s and 60s) and a required flag
When to use it
Good fit You want Codex to call external tools or docs servers You need project-scoped MCP config checked into .codex/config.toml A remote server needs OAuth or bearer-token auth Not for Hosted ChatGPT web: it does not read local Codex configuration files
How to install Codex MCP configuration You need: Codex CLI or IDE extension
Install Codex CLI: npm install -g @openai/codex (or brew install --cask codex) Run: codex mcp add --env VAR=VALUE -- Example: codex mcp add context7 -- npx -y @upstash/context7-mcp Check servers with codex mcp list or /mcp in the TUI For OAuth servers run codex mcp login
Configuration example (from the official docs) Copy
codex mcp add context7 -- npx -y @upstash/context7-mcp
Permissions and security What it can access Launches local commands for STDIO servers; tool approval modes configurable per server/tool Security notes from the maintainers Bearer tokens can be read from an environment variable (bearer_token_env_var) rather than stored in config Review the source before granting an agent access to credentials or production systems. We document what the maintainers state; we do not audit code.
Limitations Local MCP servers and transports may not be available in cloud containers
Frequently asked questions How do I add an MCP server to Codex? Run codex mcp add -- , or add a [mcp_servers.] table to ~/.codex/config.toml. source
Does Codex support project-scoped MCP config? Yes, a project-scoped .codex/config.toml is supported alongside ~/.codex/config.toml. source
Which MCP transports does Codex support? STDIO and Streamable HTTP. source
How do I authenticate Codex to an OAuth MCP server? Run codex mcp login . source
Sources and gaps Not stated by the maintainers: docs/advanced.md returns 404; config.md only links to developers.openai.com; Official Codex plugin/skill catalog not read; last_release not visible.