# Codex

Codex reads MCP servers from `~/.codex/config.toml`, and takes the bearer token from an environment variable:

```toml title="~/.codex/config.toml"
[mcp_servers.postflow]
url = "https://postflow.biz.id/api/mcp"
bearer_token_env_var = "POSTFLOW_API_KEY"
```

```sh
export POSTFLOW_API_KEY=pf_...
codex
```

Or from the command line: `codex mcp add postflow --url https://postflow.biz.id/api/mcp --bearer-token-env-var POSTFLOW_API_KEY`.
Codex can also sign in with OAuth: add the server without a token and run `codex mcp login postflow`.
Run `/mcp` inside Codex to check the tools are there.