Connecting Codex CLI
Last reviewed: 28 Oct 2026
OpenAI's Codex CLI connects to Naetive through its own config file. On the Connect page, open the Codex row (under Add another agent if it is not connected yet) and press Make a key for Codex: the block then shows with Codex's own key filled in, once. 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 Codex's key as a bearer header. If the file already has a [mcp_servers.naetive] section, replace it rather than adding a second one:
[mcp_servers.naetive]
url = "{{GATEWAY_URL}}/mcp"
[mcp_servers.naetive.http_headers]
Authorization = "Bearer <the key shown on Connect>"
Copy the block from Connect rather than typing the key. It is shown once; if you lose it, make another, and the old one stops working.
Step 2: Restart and check
Restart Codex and run /mcp: naetive should be connected. After its first call, Codex shows under Your agents on Connect.
If Codex does not pick it up, some versions need the remote MCP client switched on. Add this at the top of ~/.codex/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 let it reach a project's files through Naetive as well, share the project once (naetive share --project <name>); the tunnel then starts by itself (on Windows, start it yourself), or run Codex on the Chats page. Add the one-time instruction from Start a project with your AI to AGENTS.md at the project root, or to ~/.codex/AGENTS.md, so every session starts grounded.