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

# Codex

> Connect ContentHero to Codex over the hosted OAuth MCP server.

Codex supports remote MCP servers natively over HTTP.

## Add the server

```bash theme={null}
codex mcp add contenthero --url https://mcp.contenthero.ai
```

This writes a `[mcp_servers.contenthero]` block to `~/.codex/config.toml`. You can also add it by hand:

```toml theme={null}
[mcp_servers.contenthero]
url = "https://mcp.contenthero.ai"
```

## Authorize

```bash theme={null}
codex mcp login contenthero
```

This opens the OAuth consent page in your browser. Sign in with your ContentHero account and approve. Codex stores and refreshes the token, so you authorize once. No API key needed.

## Verify

Start Codex and ask it to read your ContentHero balance. It calls `get_balance` and returns your credits.

<Note>
  Native remote MCP needs a current Codex CLI. If `codex mcp add --url` or `codex mcp login` is not recognized, update Codex. As a fallback for older builds, bridge over stdio: set the server `command` to `npx` with args `["-y", "mcp-remote", "https://mcp.contenthero.ai"]`.
</Note>
