vike
Client setup

Claude Code

One claude mcp add, with the double dash that hands vike-cli its own flags — and the one client that does inherit your shell's exports.

Add the server

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

The -- is what makes this work: everything after it is the command line Claude Code launches, so --node is parsed by vike-cli rather than claimed by claude mcp add. There is no --transport flag here — the trader server is a local subprocess, which is the default shape.

Two optional flags scope what the tools reach — --node <host:port>, the running vike-tradehub the live tools observe and control (no default), and --addr <host:port>, the vike-datahub the backtest tools use (default 127.0.0.1:7878). With neither, the four offline authoring tools still work:

claude mcp add vike-trader -- vike-cli mcp

The node keys

Unlike a GUI client, Claude Code is started from your terminal and inherits its environment, so an exported VIKE_TRADEHUB_OBSERVE_KEY / VIKE_TRADEHUB_CONTROL_KEY does reach the server. Absent from the environment, each key falls back to <project>/settings/secrets.env — the same store the daemon reads — resolved by walking up from the working directory, which for a subprocess of Claude Code is where you started it.

That last clause is the one to hold on to: unless VIKE_SETTINGS_DIR names a directory outright, which store answers depends on where you launched Claude Code. vike-cli secrets path prints the store a given directory resolves to, and vike-cli secrets list shows whether the key is in it, by name.

Scopes

Claude Code stores MCP servers per scope — local, project, or user — and claude mcp add takes a --scope flag to choose. Check claude mcp list after adding, to confirm the session you are in can see it.

If you scope the server to a project, its configuration lands in a file that may be committed. That is fine here, because the entry carries no secret: keep the node keys in the credential store (or your shell) rather than in args, and there is nothing in the entry worth hiding.

Restart any Claude Code session that was already open. Sessions read the server list at start.

Verify

claude mcp list

vike-trader should appear with its command. Then, in a session:

list the vike strategy templates

calls list_templates, which needs no key, no node and no network — so it isolates "is the binary being launched and speaking the protocol" from every credential and address question. With a node configured, "show me the node snapshot" then proves the observe key.

Removing or replacing it

claude mcp remove vike-trader

To rotate a node key, change it in the credential store (or your shell) and restart the session — the entry itself carries no secret, so it does not need rewriting.

Troubleshooting

Nothing happens when you ask. Check claude mcp list first. If the server is absent, the add command wrote to a scope the session is not reading; re-add naming the scope explicitly.

The server fails to start. Run the command by hand — vike-cli mcp --node 127.0.0.1:7879 — in the same directory. It reads JSON-RPC on stdin and answers on stdout, so a binary that is not on PATH, or a flag it rejects (unknown argument, exit 1), surfaces immediately rather than as a silently absent server.

The trade tools return "set neither in the process environment nor in the credential store". That is a node key. The message names both places on purpose, so check the one you expected to answer: vike-cli secrets path for the store, echo $VIKE_TRADEHUB_CONTROL_KEY for the shell. The wording is Server::missing_key in crates/vike-cli/src/cmd/mcp.rs.

The node tools return "no vike-tradehub node configured". That is the --node flag, not a key. The check happens before any socket is opened, so it means the flag never reached vike-cli — most often a missing -- in the add command. The read and write connections check separately, in Server::ensure_observe and Server::ensure_control (crates/vike-cli/src/cmd/mcp.rs), so the tail of the message tells you which one you hit.

The data server too

Claude Code can hold both Vike servers. The hosted data server is a URL and needs --transport http plus an API-key header — Data client setup → Claude Code has that command. Give the two entries different names; Claude Code keys servers by name, so adding both as vike leaves you with one.

On this page