OpenAI Codex

View as Markdown

Connect from OpenAI Codex

Codex CLI supports remote MCP servers with custom headers natively via a TOML config file.

Configuration File

Edit or create the Codex config:

  • User-global: ~/.codex/config.toml
  • Project-scoped: .codex/config.toml (in project root)
1[mcp_servers.atomicwork]
2url = "https://<your-subdomain>.atomicwork.com/api/mcp/sse"
3env_http_headers = { "X-Api-Key" = "ATOMICWORK_API_KEY" }

Then set the environment variable:

$export ATOMICWORK_API_KEY="your-api-key-here"

Using a Static Key

1[mcp_servers.atomicwork]
2url = "https://<your-subdomain>.atomicwork.com/api/mcp/sse"
3http_headers = { "X-Api-Key" = "<your-api-key>" }

Verify Connection

$codex mcp

Notes

  • Project-scoped config requires the project to be trusted by Codex.
  • You can set default_tools_approval_mode = "auto" to skip per-tool confirmation prompts.