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

# Codex

> Add Postinger to Codex, with OAuth or an API key.

Add the server:

```bash theme={"system"}
codex mcp add postinger --url https://api.postinger.dev/mcp
```

Then sign in:

```bash theme={"system"}
codex mcp login postinger
```

This writes the following to `~/.codex/config.toml`:

```toml ~/.codex/config.toml theme={"system"}
[mcp_servers.postinger]
url = "https://api.postinger.dev/mcp"
```

To use an API key instead of OAuth, read it from an environment variable:

```toml ~/.codex/config.toml theme={"system"}
[mcp_servers.postinger]
url = "https://api.postinger.dev/mcp"
bearer_token_env_var = "POSTINGER_API_KEY"
```

Codex's [MCP documentation](https://developers.openai.com/codex/mcp) covers the file format.

For what each credential means, and what to do when connecting fails, see [Setup](https://docs.postinger.dev/mcp/setup.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.