vike
Client setup

Gemini CLI

gemini mcp add on the default stdio transport, with the double dash that keeps --node on the vike-cli side of the command line.

Add the server

gemini mcp add vike-trader vike-cli mcp -- --node 127.0.0.1:7879

No --transport flag, because stdio is the default and that is what this server speaks. The form is gemini mcp add [options] <name> <command> [args...]: vike-trader is the name, vike-cli the command, and mcp its first argument. The -- before --node hands the remaining flags to vike-cli instead of letting gemini mcp add claim them.

Both vike-cli mcp flags are optional — --node <host:port> is the running vike-tradehub the live tools observe and control (no default), --addr <host:port> the vike-datahub the backtest tools use (default 127.0.0.1:7878). The shortest working entry is:

gemini mcp add vike-trader vike-cli mcp

which still gives you the four offline authoring tools; node_snapshot then returns a clean error naming the missing flag rather than failing obscurely. A write tool stays quiet about it — it previews unless a call carries both confirm: true and the preview_token its preview returned, so the missing-node error only ever appears on a fully confirmed call.

The node keys

Gemini CLI runs in your terminal, so an exported VIKE_TRADEHUB_OBSERVE_KEY / VIKE_TRADEHUB_CONTROL_KEY reaches the server. Each key falls back to <project>/settings/secrets.env — the same store the 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.

gemini mcp add also takes -e KEY=value to set a variable for one server alone. The environment wins over the store per key, so that pins one key without disturbing the other.

Verify

gemini mcp list

Then, 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. With a node configured, follow it with "show me the node snapshot" to prove the observe key.

Troubleshooting

The command is rejected as malformed. Check the argument order: options, then the server name, then the command and its arguments. If a flag meant for vike-cli is being rejected by gemini mcp add, it is on the wrong side of the --.

The server is added but never starts. Run vike-cli mcp by hand in the same directory: it reads newline-delimited JSON-RPC on stdin, so a missing binary or a rejected flag shows up at once — vike-cli mcp: unknown argument: <flag> on stderr, exit 1 — instead of as a silently absent server. Raw JSON-RPC has a one-line handshake you can paste.

The offline tools answer and the node tools do not. Two different errors, worded to be told apart: "no vike-tradehub node configured" means the --node flag never reached vike-cli, while "set neither in the process environment nor in the credential store" names a key and both places it looked. vike-cli secrets path prints the store; vike-cli secrets list shows key names, never values.

The data server too

Gemini CLI adds both Vike servers with the same subcommand — --transport http is the whole difference, and it is what the hosted data server needs. Data client setup → Gemini CLI has that command. The two names must differ: a second vike replaces the first.

On this page