Skip to main content

Codex

Connect the Codex CLI or the Codex IDE extension to the CLIKA Platform and you can ask it about your devices and benchmarks while you work. Both read one config file, ~/.codex/config.toml ($CODEX_HOME/config.toml when CODEX_HOME is set, %USERPROFILE%\.codex\config.toml on Windows), and one entry there connects both. There are three ways to add it; pick one.

WayUse it whenWhere the API key lives
clika-cli mcp install (recommended)You use the CLIKA CLI.In your CLIKA CLI profile. config.toml holds no key.
codex mcp addYou do not use the CLIKA CLI.In an environment variable Codex reads when it starts.
An entry by handYou manage the config file yourself.In your CLIKA CLI profile.

Each needs an API key.

ChatGPT Desktop reads the same file. An entry added on this page shows up there too, and a server added in ChatGPT Desktop's Settings (ChatGPT Desktop) is one Codex uses as well.

With the CLIKA CLI installed and logged in (Get started with the CLI), one command registers the platform:

clika-cli mcp install codex

If a Codex session or ChatGPT Desktop is running, the command says so: restart it to load the server.

What the command does:

  • It first checks the profile's key with one request to the deployment. If the profile has no key or the deployment refuses it, the command offers to log in when it runs at a terminal, and prints the login command to run otherwise.
  • It adds a [mcp_servers.clika-platform] table to config.toml. Every other table and key in the file keeps its place and formatting.
  • The entry is an HTTP connection to <base-url>/api/mcp. Its Authorization header comes from http_headers_helper: a command Codex runs to get the header, here clika-cli --profile default mcp headers, which prints it from the CLIKA CLI profile. The API key never lands in config.toml, and a new key needs a new clika-cli login and no change to the entry.

Useful flags:

FlagWhat it does
--profile stagingRegisters another deployment's profile.
--name clika-stagingPicks the entry's name.
--dry-runPrints the entry without writing it.
--insecure-tlsFor a deployment with a self-signed certificate: the entry runs the CLIKA CLI as a local bridge (mcp --remote) instead of connecting over HTTP. Troubleshooting explains why.

The CLI reference lists every flag.

Add it with codex mcp add​

Without the CLIKA CLI, register the endpoint with Codex's own command:

codex mcp add clika-platform --url https://platform.clika.io/api/mcp --bearer-token-env-var CLIKA_API_KEY
  • Codex has no option to write the header itself. --bearer-token-env-var names an environment variable, and Codex sends its value as the bearer token each time it starts the server. The entry in config.toml holds the variable's name, bearer_token_env_var = "CLIKA_API_KEY", not the key.
  • Set CLIKA_API_KEY to your API key wherever Codex runs, for example with export CLIKA_API_KEY=clika_your_api_key in your shell's profile on macOS and Linux, or setx CLIKA_API_KEY clika_your_api_key on Windows and then a new terminal. The Codex IDE extension sees the variable only when the editor was started from an environment that has it.
  • A new key means changing the variable, with no change to the entry.
  • codex mcp add has no option to skip certificate verification. On a deployment with a self-signed certificate, register with clika-cli mcp install codex --insecure-tls instead (Troubleshooting).

Add the entry by hand​

Log in with the CLIKA CLI first (clika-cli --base-url https://platform.clika.io login). Then add the table to config.toml:

[mcp_servers.clika-platform]
url = "https://platform.clika.io/api/mcp"
http_headers_helper = "/usr/local/bin/clika-cli --profile default mcp headers"
  • Use the CLIKA CLI's absolute path. On Windows that is the path the installer printed after installed clika-cli to. A TOML literal string in single quotes keeps its backslashes as they are, for example 'C:\Users\you\AppData\Local\Programs\clika\bin\clika-cli.exe --profile default mcp headers'.
  • If a Codex session or ChatGPT Desktop is running, restart it.
  • An entry you write by hand is yours: mcp install and mcp uninstall never change or remove it. If it uses the name clika-platform, mcp install refuses that name and asks for --name.

A server added in ChatGPT Desktop​

ChatGPT Desktop saves the server as a [mcp_servers.clika-platform] table with the API key in its http_headers, in plain text. Like an entry written by hand, it is yours: mcp install and mcp uninstall never change or remove it, and mcp install refuses the name clika-platform while it exists and asks for --name.

Check the connection​

clika-cli mcp status reports, for each client, whether mcp install registered the server, under which name and profile, and which config file it read. Then start a Codex session and ask:

Which of my Clika Platform devices are online?

The answer comes from the device list tool, get_devices. If the tools do not appear, see Troubleshooting.

Remove it​

Remove the entry the way you added it:

Added withRemove with
clika-cli mcp installclika-cli mcp uninstall codex. It deletes the tables it added for the profile and leaves the rest of the file as it was.
codex mcp addcodex mcp remove clika-platform, then unset CLIKA_API_KEY if nothing else uses it.
ChatGPT Desktop's SettingsChatGPT Desktop (Remove it).
By handDelete the table from config.toml.

If a Codex session or ChatGPT Desktop is running, restart it. If no other client uses the API key, revoke it under Settings, then Developer access.