MCP server and CLI capabilities
The MCP server provides 115 tools covering market data, spot trading, collateral trading, wallet operations, lending, sub-accounts, mining pool, and currency conversion. All tools are available to any connected AI client using natural language. The CLI provides 110+ commands covering the same API surface, designed for terminal use, scripting, and CI/CD pipelines. See MCP server and CLI for the full tool and command listings.Supported AI clients
The MCP server works with any client that supports the Model Context Protocol. Supported clients include:- Claude Code — global or project-scoped registration via
claude mcp add - Cursor — configuration via
~/.cursor/mcp.json - Claude Desktop — configuration via the application config file
- Codex — configuration via
~/.codex/config.toml - OpenClaw — configuration via the agent config file
API key security
API keys are supplied at connection time — asWHITEBIT_API_KEY and WHITEBIT_SECRET_KEY environment variables on the stdio transport, or as X-WB-Api-Key and X-WB-Secret-Key request headers on the HTTP transport — and are used only to sign outgoing WhiteBIT API requests. No tool takes an API key as a parameter. The MCP server does not store, log, or cache credentials. All processing happens locally — no data is sent to external services beyond WhiteBIT.
Public market data tools (tickers, order book, market info) query public endpoints and need no account credentials.
See Authentication for instructions on generating and managing API keys.
Trading MCP server vs documentation MCP
The WhiteBIT documentation portal has two separate MCP integrations that serve different purposes:
The trading MCP is a self-hosted server that requires cloning the whitebit-mcp repository and starting a local Docker container. See MCP server.
The documentation MCP is a Mintlify-hosted service. See Docs search via MCP.
Public market data without API keys
Public market data tools do not require a WhiteBIT account. On the stdio transport these tools answer with no credentials configured, so a market-data-only setup can leave the key variables empty. Example questions:- “What is the current BTC_USDT price?”
- “Show the order book for ETH_USDT”
- “List all available trading pairs”
CLI use in automation
The CLI is designed for scripting and automation:--jsonflag on every command outputs machine-readable JSON, compatible withjqand any data pipeline.--dry-runflag previews the exact API request payload without sending it — useful for validating scripts.- Exit codes (
0success,2auth error,5rate limit, etc.) allow precise error handling in shell scripts. - Multi-profile support enables switching between API keys with
--profile.
Safe account practices
Before connecting AI tools to a live account:- Create a dedicated sub-account with a separate API key for AI tool access.
- Fund the sub-account with only the amount allocated for AI-assisted trading.
- Generate API keys with the minimum permissions required — read-only keys are sufficient for balance and order queries.
- Enable IP whitelisting on the API key to restrict access to the machine running the MCP server.
- Test with small amounts before executing larger trades.
- Never provide API keys in the AI conversation — credentials belong in the AI client configuration that the setup command writes.
Report an issue
Report bugs or request features by opening an issue on the relevant GitHub repository:- whitebit-mcp issues — MCP server bugs and feature requests
- whitebit-cli issues — CLI bugs and feature requests
Related resources
- MCP server — Full setup guide for the WhiteBIT trading MCP server
- CLI — Full setup and command reference for the WhiteBIT CLI
- Docs search via MCP — Connect Cursor, VS Code, or Claude Desktop to the documentation search MCP
- Authentication — How to generate and manage WhiteBIT API keys