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

# Codex

> Connect OpenAI Codex to the Poix MCP server

Codex supports remote MCP servers over Streamable HTTP, configured as TOML in `~/.codex/config.toml` — either by editing the file directly or using the `codex mcp add` CLI command.

<Steps>
  <Step title="Get a Poix Token">
    If you don't already have one, create a `poix-` Token in the [Dashboard](https://app.poix.io/mcp). See [Authentication](/mcp/authentication) for details.
  </Step>

  <Step title="Add the Poix server">
    Use the Codex CLI:

    ```bash theme={null}
    codex mcp add poix --url https://mcp.poix.io --bearer-token-env-var POIX_TOKEN
    ```

    Or add it directly to `~/.codex/config.toml`:

    ```toml config.toml theme={null}
    [mcp_servers.poix]
    url = "https://mcp.poix.io"
    bearer_token_env_var = "POIX_TOKEN"
    ```
  </Step>

  <Step title="Set your token">
    Export your Poix Token as the environment variable Codex reads:

    ```bash theme={null}
    export POIX_TOKEN="poix-…"
    ```

    Replace `poix-…` with your actual Token, then restart Codex.
  </Step>

  <Step title="Verify the connection">
    Ask Codex to list its available tools — `poix`'s tools (search, video/channel details, captions, and more) should appear. You can now ask it to look up YouTube data directly.
  </Step>
</Steps>

<Note>
  Codex's TOML config also supports `env_http_headers`, which can pass a full `Authorization` header directly instead of using `bearer_token_env_var`.
</Note>
