Connect Codex

Works for the Codex CLI, the IDE extension and the Codex app. This is also how ChatGPT users connect.

Before you start

  1. Open Gadwal and click AI & MCP in the sidebar of the Connections window (⌘2). The same page is also a tab in Gadwal › Settings (⌘,).
  2. Turn on MCP server. The Address line shows http://127.0.0.1:55183/mcp (you can change the port below it). The server only listens on this Mac.
  3. Check each connection's AI level: Off, Read-only, Ask before write or Full. Production connections start at Read-only. The AI only sees connections that aren't Off. See AI levels and hidden columns.
  4. Keep Gadwal open. The server runs inside the app, so AI tools stop working when you quit it.

AI tools need an active trial or the lifetime unlock. After the trial, turning the server on opens Unlock, and a server that is still running answers every tool call with a message saying so.

In Gadwal

Find the Codex row under AI Apps on the AI & MCP page. Its button reads Copy config.toml Block, and How to connect under it lists the same steps as this page.

The Home window's AI & MCP page in dark mode: a sidebar with Connections, AI & MCP (Off), Backups and Settings, and the page “Connect your AI apps” with the MCP server switch, the address http://127.0.0.1:55183/mcp, port 55183, and AI Apps rows for Claude Desktop (Install), Claude Code (Copy Command), Codex (Copy config.toml Block) and Cursor (Install), each with “How to connect”.
The AI & MCP page (⌘2). Each AI app has a row with its status, its button and “How to connect”.
The Home window's AI & MCP page in light mode: a sidebar with Connections, AI & MCP (Off), Backups and Settings, and the page “Connect your AI apps” with the MCP server switch, the address http://127.0.0.1:55183/mcp, port 55183, and AI Apps rows for Claude Desktop (Install), Claude Code (Copy Command), Codex (Copy config.toml Block) and Cursor (Install), each with “How to connect”.
The AI & MCP page (⌘2). Each AI app has a row with its status, its button and “How to connect”.

Add the server

  1. On the AI & MCP page, under AI Apps, click Copy config.toml Block on the Codex row. You get:

    [mcp_servers.gadwal]
    url = "http://127.0.0.1:55183/mcp"
    http_headers = { "Authorization" = "Bearer <token>" }
  2. Open ~/.codex/config.toml in a text editor (create it if it doesn’t exist) and paste the block at the end.

  3. Restart Codex. In the CLI, /mcp lists gadwal; the Codex app and the IDE extension read the same file.

  4. Ask it to list your Gadwal connections.

The token is written in the header on purpose. Codex can also read a token from an environment variable, but the Codex app started from the Dock doesn’t see variables set in your shell profile.