Skip to content

OpenAI Codex

Connect AllMCP to OpenAI Codex — the CLI, the IDE extension, and the macOS desktop app. All three read the same ~/.codex/config.toml, so you set it up once and it works everywhere. The desktop app can also add AllMCP from its own settings UI.

Get your API key Browse providers

Codex reads MCP server config from ~/.codex/config.toml (shared by the CLI, IDE extension, and desktop app). Add AllMCP under the [mcp_servers] section:

  1. Open your Codex config

    The Codex CLI reads MCP server config from ~/.codex/config.toml.

  2. Add the allmcp server

    Add AllMCP under the [mcp_servers] section, replacing YOUR_API_KEY with your AllMCP key.

    ~/.codex/config.toml
    [mcp_servers.allmcp]
    url = "https://go.allmcp.co/mcp/"
    [mcp_servers.allmcp.http_headers]
    X-API-Key = "YOUR_API_KEY"

    If your client only supports a standard Authorization header, you can send the same key as a Bearer token instead:

    ~/.codex/config.toml
    [mcp_servers.allmcp.http_headers]
    Authorization = "Bearer YOUR_API_KEY"
  3. Verify it’s working

    Run the Codex CLI and ask it to list integrations — see Verify it’s working below.


The Codex desktop app (macOS) can add AllMCP from its settings — no file editing needed. It also picks up anything already in ~/.codex/config.toml.

  1. Open MCP settings

    Click the Settings gear (bottom left) and go to MCP Servers.

  2. Add a server

    Click Add server and choose Streamable HTTP.

  3. Fill in the details

    • URL: https://go.allmcp.co/mcp/
    • Header: X-API-Key set to your AllMCP key (allmcp_xxx).

    Save, and AllMCP is connected.


Run the Codex CLI and ask:

Terminal window
codex "List available AllMCP integrations"

Append ?user_id=your-user-id to the URL to scope credentials to a specific user.

~/.codex/config.toml
[mcp_servers.allmcp]
url = "https://go.allmcp.co/mcp/?user_id=your-user-id"
[mcp_servers.allmcp.http_headers]
X-API-Key = "YOUR_API_KEY"

To avoid hard-coding your key in config.toml, use env_http_headers — it maps a header name to the name of an environment variable, and Codex reads the value at connection time:

~/.codex/config.toml
[mcp_servers.allmcp]
url = "https://go.allmcp.co/mcp/"
[mcp_servers.allmcp.env_http_headers]
X-API-Key = "ALLMCP_API_KEY"

Then export the key in your shell before launching Codex:

Terminal window
export ALLMCP_API_KEY="allmcp_xxxxxxxxxxxx"