kraken— the CLIkraken-mcp— the MCP server for AI agentskraken-shell— an interactive shell
GitHub
Source, releases, and changelog
MCP server
Give AI agents 152 MCP tools from the CLI
Install
~/.cargo/bin (or $CARGO_HOME/bin if you set it) and adds that folder to your PATH for new terminals only. Open a new terminal window, or run source "$HOME/.cargo/env". If an AI agent or editor was already running, quit it and start it again from a new terminal.
Verify the install:
What it covers
188 commands across 15 groups. Six asset classes in one install:
Spot is the default:
kraken order buy, kraken balance. Futures commands are explicit: kraken futures order buy.
Command groups
The command catalog lists every command with its arguments. It is generated from the code, so it always matches the release.
Paper trading
The CLI’s built-in paper trading engine runs against live prices with no authentication required. It is the recommended way to test strategies and integrations.kraken paper buy with kraken order buy and provide credentials. Pass --type when you switch: paper buy defaults to a market order and order buy to a limit order.
When a paper workspace has the evidence, kraken workspace promote checks the promotion checklist and switches the workspace to live execution on the real account. It is a dangerous command: it needs credentials and asks for confirmation.
Sessions and recipes
Record a session in a paper workspace, explain its P&L, then package it so it can run again:Scripting and automation
Every command supports-o json. Exit code 0 means success, 1 a runtime failure (with a JSON error envelope on stdout), and 2 a usage error. This makes the CLI composable in shell scripts and CI pipelines:
Account management
Dead man’s switch
Cancel all open orders if your process stops sending heartbeats:Authentication
Sign in once in the browser:--valid-for. --read-only creates a key that cannot trade. It needs a terminal, so run it yourself; a script or an AI agent cannot create a key.
To use a key you created yourself, generate it at Settings → API for Spot, or in the Futures interface for Derivatives, and store it with the setup wizard. Run it in a normal terminal, because it reads your input:
- Command-line flags (
--api-key,--api-secret) - Environment variables (
KRAKEN_API_KEY,KRAKEN_API_SECRET, andKRAKEN_FUTURES_API_KEY,KRAKEN_FUTURES_API_SECRETfor futures) - The active stored key in
config.toml(~/.config/kraken/on Linux,~/Library/Application Support/kraken/on macOS): the API key fromkraken setuporkraken auth set, or the sign-in key fromkraken auth login
kraken auth show tells you which stored key is active, and kraken auth switch api-key or kraken auth switch sign-in changes it. Grant only the permissions your workflow needs. Never paste API keys into an AI chat.