VS Code
The stdio entry in .vscode/mcp.json for GitHub Copilot, and why this file should never hold a node key.
Add the server
Create .vscode/mcp.json in the workspace and reload the window:
{
"servers": {
"vike-trader": {
"type": "stdio",
"command": "vike-cli",
"args": ["mcp", "--node", "127.0.0.1:7879"]
}
}
}Two details are easy to miss if you are copying a Cursor entry: the top-level key is servers, not
mcpServers, and each entry carries an explicit type. That type selects the rest of the shape —
stdio takes command and args, http takes url and headers. vike-cli mcp is a local
process VS Code launches and speaks stdio to, so stdio is the only correct value here.
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). Without either, the four offline authoring tools still work. If VS
Code cannot find the binary, give command an absolute path — an editor started from the desktop
does not inherit your shell's PATH.
Keep the node keys out of the repository
.vscode/mcp.json sits inside the workspace, so anything written into it is one git add away from
being committed. The good news is that this server needs nothing secret in the file at all.
vike-cli reads VIKE_TRADEHUB_OBSERVE_KEY and VIKE_TRADEHUB_CONTROL_KEY from the process
environment first and then from <project>/settings/secrets.env — the same store the
vike-tradehub daemon reads (crates/vike-cli/src/cmd/nodekeys.rs's resolve). A desktop-launched
editor passes on none of your terminal's exports, so the store is the source that actually reaches
the server, and it is also the source that keeps the workspace file clean.
⚠ A committed control key is worse than a committed API key: it places orders on a live node,
and there is no central console to revoke it from. The fix is to rotate the key in
<project>/settings/secrets.env and restart the daemon, which is a real interruption — so do not
put it here in the first place.
Verify
Open Copilot Chat in agent mode and ask:
list the vike strategy templates
list_templates runs offline, with no key, no node and no network, so it separates "is the
subprocess running" from every credential question. Copilot's tools picker should list the
vike-trader server; if the server is present but its tools are not offered, they may need enabling
for the conversation.
With a node configured, "show me the node snapshot" then proves the observe key.
Troubleshooting
The file was edited but nothing changed. Reload the window. MCP configuration is read at startup.
The server never appears. Check the file path (.vscode/mcp.json, in the workspace root VS Code
actually has open) and that the JSON parses — a trailing comma silently disables the whole file.
The server starts but the live tools error while the offline ones work. That is a node address
or a node key, not the MCP wiring, and the two are worded to be told apart: "no vike-tradehub node
configured" is the --node flag; "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 this project
resolves to; vike-cli secrets list shows whether the key is in it, by name.
The binary is not found. Run vike-cli mcp in a terminal first. It reads JSON-RPC on stdin and
writes every diagnostic to stderr — never stdout, because stdout is a protocol — so a PATH problem
or a rejected flag surfaces immediately.
The data server too
The same file holds both Vike servers: the hosted data server goes in beside this one as
a "type": "http" entry with a key header.
Data client setup → VS Code has its shape, and the warning above about
committing secrets applies with full force to that one — it does need a key in the file unless you
use VS Code's input-variable support. The names must differ; a second vike replaces the first.
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.
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.