> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.it.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Connect OpenAI Codex to Automate It over remote MCP

Add one block to `~/.codex/config.toml` (or a project-level `.codex/config.toml`):

```toml theme={null}
[mcp_servers.automate-it]
url = "https://api.automate.it.com/mcp"
bearer_token_env_var = "AUTOMATE_IT_API_KEY"
```

`bearer_token_env_var` tells Codex to send `Authorization: Bearer $AUTOMATE_IT_API_KEY` — the key stays out of the config file. Export it where Codex runs:

```bash theme={null}
export AUTOMATE_IT_API_KEY="ak_your_key"
```

If you'd rather inline a static header:

```toml theme={null}
[mcp_servers.automate-it]
url = "https://api.automate.it.com/mcp"
http_headers = { "Authorization" = "Bearer ak_your_key" }
```

## Try it

Ask Codex to list Automate It tools or workspaces. The server exposes the full task lifecycle — creating tasks, one-shot content submission into the human review queue, revision after rejection, and published-post links. See [Worker mode](/guides/worker-mode) for the autonomous loop.
