Codex CLI
The one client whose config is TOML rather than JSON — an mcp_servers table in config.toml, or codex mcp add with the double dash that keeps --node on the vike-cli side.
Add the server
codex mcp add vike-trader -- vike-cli mcp --node 127.0.0.1:7879The form is codex mcp add <name> [--env KEY=VALUE] -- <command and its arguments>. Everything
after the -- is the stdio command Codex will launch, so --node lands on vike-cli rather than
being claimed by codex mcp add.
This client's config is TOML, not JSON
Codex is the odd one out on this page set. Every other client here keys a mcpServers JSON
object; Codex reads ~/.codex/config.toml, so the command + args block you would paste into
Cursor or Claude Desktop is not valid input here. Translate it rather than copying it.
Or edit the file
~/.codex/config.toml is the default; a trusted project can carry its own .codex/config.toml.
The server is a table named after it:
[mcp_servers.vike-trader]
command = "vike-cli"
args = ["mcp", "--node", "127.0.0.1:7879"]Both vike-cli mcp flags are optional, and both only widen what the tools reach. The shortest
working entry is the command alone:
[mcp_servers.vike-trader]
command = "vike-cli"
args = ["mcp"]which still gives you the four offline authoring tools — validate_strategy, discover_params,
list_templates, list_indicators. --addr <host:port> is the vike-datahub the backtest tools
ship profiles to (default 127.0.0.1:7878); --node <host:port> is the running vike-tradehub
the live tools observe and control, and it has no default.
If Codex reports the binary as not found, give command an absolute path — the same advice as
every other client here, for the same reason: nothing guarantees your shell's PATH.
The node keys
Codex CLI runs in your terminal, so an exported VIKE_TRADEHUB_OBSERVE_KEY /
VIKE_TRADEHUB_CONTROL_KEY reaches the server. Each key independently falls back to
<project>/settings/secrets.env — the same store the vike-tradehub daemon reads — when the
environment does not carry it, so on a configured box you usually need to export nothing at all.
The resolver that applies that order is crates/vike-cli/src/cmd/nodekeys.rs's resolve.
To pin one key for this server alone rather than exporting it, the config table takes an env
sub-table (and codex mcp add takes --env KEY=VALUE):
[mcp_servers.vike-trader]
command = "vike-cli"
args = ["mcp", "--node", "127.0.0.1:7879"]
[mcp_servers.vike-trader.env]
VIKE_TRADEHUB_OBSERVE_KEY = "..."The environment wins over the store per key, so setting one there leaves the other resolving from
the store. A control key is the expensive one to write into a file — it places orders — so
prefer the credential store, especially for a project-scoped .codex/config.toml that sits inside
a repository.
vike-cli secrets path prints which store a directory resolves to; vike-cli secrets list shows
whether a key is in it, by name — never values.
Verify
codex mcp listThen, in a session:
list the vike strategy templates
list_templates is the free check — offline, no key, no node, no network. If it answers, the
subprocess is running and the protocol is working, and anything still failing is an address or a
key rather than the setup. With a node configured, follow it with "show me the node snapshot" to
prove the observe key too.
Troubleshooting
The --node flag is rejected. It is on the wrong side of the --. Everything before the
double dash belongs to codex mcp add; everything after it belongs to vike-cli.
A JSON block was pasted into config.toml. See the callout above — this is the failure mode
this client has and the others do not, because every MCP setup snippet on the internet is JSON.
The offline tools work and the node tools do not. That is an address or a key, not the MCP
wiring, and the two failures are worded differently on purpose: "no vike-tradehub node configured"
means --node never arrived, while "set neither in the process environment nor in the credential
store" names a key and names both places it looked.
A write tool answered but nothing happened. That is not a Codex problem. A write executes only
when a call carries both confirm: true and the preview_token its own preview returned;
anything less comes back as another preview, with will_execute: false and no error. Live
node is the contract.
Where this shape came from
The config path, the [mcp_servers.<name>] table with command/args/env, and the
codex mcp add <name> --env … -- <command> form were read from OpenAI's own Codex MCP
documentation (developers.openai.com/codex/mcp, which now redirects into the ChatGPT docs) in
September 2026, not from memory. If Codex has changed since, that page is the authority and this
one is the copy.
The data server too
Codex holds both Vike servers in the same config.toml — the hosted data server as a
url-carrying table beside this one. Data client setup has its shape. Give the
two tables different names.
VS Code
The stdio entry in .vscode/mcp.json for GitHub Copilot, and why this file should never hold a node key.
Amazon Q Developer CLI
The mcpServers entry in ~/.aws/amazonq/mcp.json — global or per workspace, with the merge rule that decides which one wins and why the control key belongs in the credential store.