Connecting Codex CLI

Last reviewed: 16 Sep 2026

OpenAI's Codex CLI connects to Naetive through its own config file. The Connect page shows the exact block with your key filled in; this page is what it means.


Step 1: Add Naetive to Codex's config

Codex configures MCP servers in ~/.codex/config.toml. Add a naetive server with the gateway address and your key as a bearer header:

[mcp_servers.naetive]
url = "{{GATEWAY_URL}}/mcp"

[mcp_servers.naetive.http_headers]
Authorization = "<the value shown on Connect>"

Copy the block from Connect rather than typing the key.

Step 2: Restart and check

Restart Codex and run /mcp: naetive should be connected. After its first call, the Codex row on Connect shows as set up.

If Codex does not pick it up, some versions need the remote MCP client switched on. Add this at the top of config.toml and restart:

experimental_use_rmcp_client = true

Files on your machine

Codex runs in your terminal, so it can already read the folder it is started in. To have that work show up on Work and act through Naetive on a project, start the tunnel in the project folder, or run Codex inside the platform's Terminal page. Add the one-time instruction from Start a project with your AI to AGENTS.md so every session starts grounded.