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.
| Way | Use it when | Where 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 add | You do not use the CLIKA CLI. | In an environment variable Codex reads when it starts. |
| An entry by hand | You 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.
Register with the CLIKA CLI (recommended)
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
logincommand to run otherwise. - It adds a
[mcp_servers.clika-platform]table toconfig.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. ItsAuthorizationheader comes fromhttp_headers_helper: a command Codex runs to get the header, hereclika-cli --profile default mcp headers, which prints it from the CLIKA CLI profile. The API key never lands inconfig.toml, and a new key needs a newclika-cli loginand no change to the entry.
Useful flags:
| Flag | What it does |
|---|---|
--profile staging | Registers another deployment's profile. |
--name clika-staging | Picks the entry's name. |
--dry-run | Prints the entry without writing it. |
--insecure-tls | For 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-varnames an environment variable, and Codex sends its value as the bearer token each time it starts the server. The entry inconfig.tomlholds the variable's name,bearer_token_env_var = "CLIKA_API_KEY", not the key. - Set
CLIKA_API_KEYto your API key wherever Codex runs, for example withexport CLIKA_API_KEY=clika_your_api_keyin your shell's profile on macOS and Linux, orsetx CLIKA_API_KEY clika_your_api_keyon 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 addhas no option to skip certificate verification. On a deployment with a self-signed certificate, register withclika-cli mcp install codex --insecure-tlsinstead (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 installandmcp uninstallnever change or remove it. If it uses the nameclika-platform,mcp installrefuses 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 with | Remove with |
|---|---|
clika-cli mcp install | clika-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 add | codex mcp remove clika-platform, then unset CLIKA_API_KEY if nothing else uses it. |
| ChatGPT Desktop's Settings | ChatGPT Desktop (Remove it). |
| By hand | Delete 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.