---
title: Codex
description: Connect Codex to Brilliant. It registers when ~/.codex exists. Restart Codex and run codex mcp list. One entry serves the CLI and ChatGPT desktop app.
section: agents
order: 5
featured: false
related: solutions/design-engineers, agents/overview, developers/blueprint
---

# Codex

Brilliant registers itself with Codex when it starts and finds `~/.codex`, or you check Codex CLI / ChatGPT app in Settings, MCP connections. Restart your Codex session. The one entry in `~/.codex/config.toml` serves both the Codex CLI and the ChatGPT desktop app.

Checked against [OpenAI's Codex docs](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) on November 6, 2026.

## How do I connect Codex to Brilliant?

Four steps, once per machine. Keep Brilliant open while Codex works.

<DocStep n="1" title="Enable Codex in Brilliant.">

Open Settings (Cmd+, on macOS, Ctrl+, on Windows) and choose MCP connections. Codex CLI / ChatGPT app is already checked when `~/.codex` existed at startup. Otherwise check it.

</DocStep>

<DocStep n="2" title="Restart your Codex session.">

Brilliant wrote the entry shown below. Restart the CLI session, or the ChatGPT desktop app.

</DocStep>

<DocStep n="3" title="Verify the connection.">

Run codex mcp list in a terminal, or type /mcp in the Codex CLI or in the composer of the ChatGPT desktop app. brilliant is in the list.

</DocStep>

<DocStep n="4" title="Send a first prompt.">

Ask Codex: "Design a three-tier pricing section in Brilliant." Native, editable elements land on your canvas.

</DocStep>

## What does Brilliant write to Codex's config?

Brilliant writes a [mcp_servers.brilliant] table in `~/.codex/config.toml`, with the address in url. The CLI, the IDE extension and the ChatGPT desktop app all read this file.

| Detail | Value |
|---|---|
| File on macOS | `~/.codex/config.toml` |
| File on Windows | `%USERPROFILE%\.codex\config.toml` |
| Server key | [mcp_servers.brilliant] |
| Entry fields | url |

```text title="~/.codex/config.toml"
[mcp_servers.brilliant]
url = "http://127.0.0.1:3333/mcp"
```

A checked tool follows Brilliant's port on every start, so you never toggle again. By hand, use the address at the bottom of MCP connections: 3333, or 3334 or 3335 when 3333 is taken.

By hand, paste the table into the file, or run `codex mcp add` with `--url`.

```text title="Terminal"
codex mcp add brilliant --url http://127.0.0.1:3333/mcp
```

## How do I connect Codex to brilliant.design?

Run this once, open brilliant.design in Chrome, Edge or Firefox with WebGPU, and start Codex. It needs Node 20 or later. The same entry reaches the desktop app when it is open. Read more in [browser setup](/docs/agents/overview).

```text title="Terminal"
codex mcp add brilliant -- npx -y @brilliant-hq/mcp
```

## What if Codex doesn't see Brilliant?

Restart your Codex session and send a message. Codex starts the connection when a session starts.

| What you see | What to do |
|---|---|
| You restarted and nothing changed | Start a Codex session and ask it anything. |
| Brilliant did not add the entry | Run Codex once so `~/.codex` exists, then reopen Brilliant, or check the row. |
| An unchecked row is checked again | Brilliant registers Codex at each start while `~/.codex` exists. |
| Calls fail or the connection is refused | Open Brilliant. Its local server runs only while the app is open. |
| The row reads Another Brilliant instance owns this config | Check the row in the copy of Brilliant you are using, then restart the tool. |
| The row is unchecked, but the file has a brilliant entry | Check the row. It rewrites the address. |

### Does this work in ChatGPT on the web?

Not through this Codex entry: use the ChatGPT desktop app for that. It reads `~/.codex/config.toml`, and ChatGPT on the web does not read local Codex config files. To design in ChatGPT on the web, add Brilliant Design from the ChatGPT app directory. See [Brilliant for ChatGPT](/chatgpt).

## Where next?

- Compare every tool on [the Use with AI agents overview](/docs/agents/overview).
- See [what the AI can do](/docs/ai/what-the-ai-can-do) once it is connected.
- Prefer no setup? Try [Brilliant's built-in AI chat](/docs/ai/overview).
- Still stuck? Read the [troubleshooting guide](/docs/workspace/troubleshooting).
