Skip to main content

Using Codex with Marrow

Use Codex when you want an OpenAI coding agent that can read your synced Marrow store and ad data. Recommended: connect via OAuth from AI Platforms. Use MCP only if you prefer a key-based config or OAuth is unavailable for your setup.

Prerequisites

  • At least one data source connected in Integrations and syncing in Data Explorer
  • A Codex account (CLI, IDE extension, or ChatGPT desktop Codex — they share MCP config)
  • For MCP: an MCP key from AI Platforms
  1. In Marrow, open AI Hub → AI Platforms.
  2. Under Quick connection: OAuth, select Codex.
  3. Click Connect and complete the authorization steps.
  4. Confirm a session appears under OAuth sessions.
If Codex is already connected via OAuth, you do not need to add Marrow again via MCP.

Option B: MCP

Step 1: Get Marrow credentials

From AI Platforms:
  • MCP server URL: https://mcp.marrow.ai/mcp/v1
  • Create an MCP key and copy it (shown only once)

Step 2: Add the Marrow MCP server

Add this to ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):
Then set the environment variable to your MCP key (do not hard-code the key in the file):
Alternatively, you can use static headers:

Step 3: Reload Codex

Restart your Codex session (or reload the IDE extension) so it picks up the new server.

Step 4: Test the connection

If Codex returns real numbers from your synced accounts, you are connected.

Security

  • Marrow is read-only — it never posts or changes store/ad settings.
  • Prefer bearer_token_env_var over pasting keys into committed config files.
  • Revoke the OAuth session or rotate the MCP key from AI Platforms when needed.