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

# Codex CLI

> Connect Codex CLI to Ref Plans.

[Codex MCP install docs](https://github.com/openai/codex/blob/main/docs/config.md#connecting-to-mcp-servers)

You can find your Ref API key at [ref.tools/keys](https://ref.tools/keys)

## Install

Codex is configured in a `config.toml` file. This typically lives at `~/.codex/config.toml`

To enable Ref Plans, update your `config.toml` to include:

```config.toml theme={null}
[mcp_servers.ref-plan]
url = "https://api.plan.ref.tools/mcp?apiKey=<your-api-key>"
```

For plan-specific mode:

```config.toml theme={null}
[mcp_servers.ref-plan]
url = "https://api.plan.ref.tools/mcp?plan=<PLAN_ID>&apiKey=<your-api-key>"
```

## Verify

Run the command:

```
codex mcp list
```

You should see `ref-plan` listed with the Ref Plans MCP URL.

## Get help

If you have any issues, please reach out to `help@ref.tools`. We're happy to help you get started!
