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

# OpenAI Codex

> Connect OpenAI Codex to Control Plane through the AI Plugin, the ChatGPT Plugin directory, or a direct MCP registration.

> [!TIP]
>
> We recommend the [Control Plane AI Plugin](https://docs.controlplane.com/ai/plugin.md) for Codex. It configures the MCP server on the `core` toolset profile and adds skills, agents, slash commands, and guardrails on top.

## Pick your Codex surface

Codex ships three clients, and how you connect Control Plane differs by surface:

| Surface | Control Plane AI Plugin | ChatGPT Plugin directory | Direct MCP registration |
| - | - | - | - |
| **Codex CLI** | Yes, `codex plugin marketplace add` | Yes, through `/plugins` | Yes, `codex mcp add` |
| **Codex in the ChatGPT desktop app** | No | Yes, install it in ChatGPT | No |
| **Codex IDE extension** | No | Yes, synced from ChatGPT | Yes, **Settings** → **MCP servers** |

## Prerequisites

> [card] OpenAI Codex
>
> Install [Codex CLI](https://openai.com/codex)

> [card] Control Plane account
>
> Sign up at [console.cpln.io](https://console.cpln.io) if you don't have an account yet

> [!NOTE]
>
> For the latest MCP configuration options, refer to the official [OpenAI Codex documentation](https://developers.openai.com/codex).

## Add Control Plane

> [tab] Codex CLI
>
> Register the remote MCP server, then sign in.
>
> **1. Register the server**
>
> Use the `codex mcp add` command:
>
> ```bash theme={null}
> codex mcp add controlplane --url https://mcp.cpln.io/mcp
> ```
>
> > [!NOTE]
> >
> > Connecting to the bare URL uses the default **`core`** toolset profile. Append `?toolsets=mk8s` to add BYOK Kubernetes tools, or `?toolsets=full` for everything. See [toolset profiles](https://docs.controlplane.com/ai/mcp.md#toolset-profiles).
>
> **2. Sign in**
>
> Run the login command:
>
> ```bash theme={null}
> codex mcp login controlplane
> ```
>
> Your browser opens:
>
> 1. Sign in to Control Plane (Google, GitHub, Microsoft, or SAML).
> 2. Select the orgs you want this Codex install to access.
> 3. Click **Authorize**.
>
> Your browser shows a success page. Close the tab and return to Codex.
>
> **3. Verify the registration**
>
> ```bash theme={null}
> codex mcp list
> ```
>
> You should see `controlplane` with **enabled** status and **OAuth** auth:
>
> ```text theme={null}
> Name          Url                      Bearer Token Env Var  Status   Auth
> controlplane  https://mcp.cpln.io/mcp  -                     enabled  OAuth
> ```
>
> **4. Verify live access**
>
> Launch Codex and ask: "list GVCs in org `<your-org>`" (using one of the orgs you authorized). You should see the GVCs in that org.
>
> > [!TIP]
> >
> > Codex CLI can also install Control Plane from the ChatGPT Plugin directory: start Codex, run `/plugins`, switch to the directory tab, and install **Control Plane**. That route is fixed on `core`, so use `codex mcp add` above for a wider profile. Details on [ChatGPT](https://docs.controlplane.com/ai/chatgpt.md).

> [tab] ChatGPT desktop app
>
> Codex running inside the ChatGPT desktop app uses ChatGPT's own plugin surface, not Codex CLI configuration. Install the Control Plane plugin once in ChatGPT and Codex picks it up there.
>
> **1. Install the plugin**
>
> Open [the Control Plane plugin listing](https://chatgpt.com/plugins/plugin_asdk_app_6a3345aed5b081918ae752ac49e4df0e) and click **Install plugin**. If that link doesn't open the listing, click **Plugins** in the left sidebar and search for **Control Plane**.
>
> **2. Authorize your orgs**
>
> When prompted to **Connect**, sign in to Control Plane, select the orgs you want to expose, and click **Authorize**.
>
> **3. Use it**
>
> Start a new Codex session in the desktop app, then type `@` and pick **Control Plane** to invoke it explicitly.
>
> > [!NOTE]
> >
> > The listing is fixed on the default **`core`** toolset profile and takes no query parameter. Full setup notes are on the [ChatGPT](https://docs.controlplane.com/ai/chatgpt.md) page.

> [tab] Codex IDE extension
>
> Open **Codex settings** → **Plugins**. A plugin you already installed in ChatGPT or the Codex app appears there as installed and enabled, so Control Plane needs no further setup on this surface.
>
> Register the MCP server directly when you want a toolset profile other than `core`.
>
> **1. Add the server**
>
> In the extension settings, select **MCP servers** → **Add server**, then fill in:
>
> | Field | Value |
> | - | - |
> | **Name** | `controlplane` |
> | **Type** | `Streamable HTTP` |
> | **URL** | `https://mcp.cpln.io/mcp` |
>
> > [!NOTE]
> >
> > Connecting to the bare URL uses the default **`core`** toolset profile. Append `?toolsets=mk8s` to add BYOK Kubernetes tools, or `?toolsets=full` for everything. See [toolset profiles](https://docs.controlplane.com/ai/mcp.md#toolset-profiles).
>
> **2. Restart**
>
> Save the server, then select **Restart**.
>
> **3. Sign in**
>
> On first use the extension opens your browser:
>
> 1. Sign in to Control Plane (Google, GitHub, Microsoft, or SAML).
> 2. Select the orgs you want this Codex install to access.
> 3. Click **Authorize**.
>
> **4. Verify live access**
>
> Ask Codex to "list GVCs in org `<your-org>`" (using one of the orgs you authorized).

## Example conversation

**1. Set Context**

```text theme={null}
Use org "my-org" and gvc "my-gvc" for context.
```

**2. Deploy a Workload**

```text theme={null}
Create a publicly accessible workload called "my-api" using nginx:latest on port 80.
```

**3. Get the Endpoint**

```text theme={null}
Monitor the readiness of my-api and give me the public endpoint once it's ready.
```

## Troubleshooting

> [accordion] Browser didn't open for sign-in
>
> Some terminal setups can't launch a browser. `codex mcp login controlplane` prints a fallback URL. Copy it into a browser on the same machine and complete sign-in there.

> [accordion] Need to change which orgs are authorized
>
> On Codex CLI, re-run `codex mcp login controlplane`, sign in again, and adjust your org selections on the consent screen. On the ChatGPT desktop app, click **Plugins** in the left sidebar, open **Control Plane**, disconnect it, then connect again.

> [accordion] Control Plane isn't listed in Codex CLI after installing it in ChatGPT
>
> Run `/plugins` in Codex CLI and install **Control Plane** from the directory tab there, or register the MCP server with `codex mcp add controlplane --url https://mcp.cpln.io/mcp`. Either way, start a new CLI session afterwards.

## Next steps

> [card] [AI Plugin](https://docs.controlplane.com/ai/plugin.md)
>
> Layer skills, agents, slash commands, and guardrails on top of the MCP server

> [card] [ChatGPT](https://docs.controlplane.com/ai/chatgpt.md)
>
> Install the Control Plane plugin for ChatGPT on the web, desktop, and mobile

> [card] [Usage Examples](https://docs.controlplane.com/ai/examples.md)
>
> Practical prompts for common Control Plane workflows

> [card] [Tools Reference](https://docs.controlplane.com/ai/tools.md)
>
> Every tool the MCP server exposes, grouped by resource
