# Use Adquimo in Codex

Add Adquimo to OpenAI Codex with codex mcp add or config.toml, sign in with codex mcp login or an API key, and check the connection.

Updated: 2026-12-03
Status: Private beta. Open to a small group of design partners while we test it. Details may change before general availability.
Canonical: https://adquimo.com/docs/ai-tools/codex

Codex keeps its MCP servers in `~/.codex/config.toml`, shared by the Codex CLI and the Codex extensions for code editors. Add Adquimo once and it's available in both.

## Requirements

- A current version of Codex. Update it first if `codex mcp` isn't available.
- An Adquimo account in the private beta.

## Set up with OAuth

Add the server from a terminal:

```bash
codex mcp add adquimo --url https://mcp.adquimo.com/mcp
```

Then sign in:

```bash
codex mcp login adquimo
```

Codex opens Adquimo's sign-in in your browser. Sign in with your email code, review what Codex may do in your workspace and approve it.

## Set up in config.toml

The command above writes this entry, which you can also add by hand to `~/.codex/config.toml`:

```toml
[mcp_servers.adquimo]
url = "https://mcp.adquimo.com/mcp"
```

Building a campaign can take longer than Codex's default tool timeout. Give Adquimo more time:

```toml
[mcp_servers.adquimo]
url = "https://mcp.adquimo.com/mcp"
tool_timeout_sec = 120
```

## Set up with an API key instead

For scheduled or headless runs, create an API key in the Adquimo app, store it in an environment variable, and point Codex at the variable:

```toml
[mcp_servers.adquimo]
url = "https://mcp.adquimo.com/mcp"
bearer_token_env_var = "ADQUIMO_API_KEY"
```

## Check it works

List the configured servers, then ask in a Codex session:

```bash
codex mcp list
```

```text
Which ad accounts can you see in Adquimo?
```

Codex lists the ad accounts connected to your workspace, or says none are connected yet.

## Recommended tool permissions

Keep Codex's approval prompts on for Adquimo's tools that change something. Adquimo also shows its own preview and waits for your yes before anything goes live or spends more.

## Troubleshooting

| What you see | What to do |
| --- | --- |
| Adquimo shows as not logged in | Run `codex mcp login adquimo` again. |
| A long build stops with a timeout | Raise `tool_timeout_sec` as shown above. Don't retry the build: ask Codex to check what was created first. |
| `401` errors with an API key | The variable named in `bearer_token_env_var` isn't set where Codex runs, or the key was revoked. |

## Remove Adquimo

```bash
codex mcp remove adquimo
```

Then remove Codex under AI tools in **Access** in the Adquimo app, or revoke the API key you used.

## Related

- [Add Adquimo to your AI tool](https://adquimo.com/docs/add-adquimo-to-your-ai)
- [Use Adquimo in any MCP client](https://adquimo.com/docs/ai-tools/any-mcp-client)
