Prerequisites
The MCP server is bundled with the Decibel CLI. You can run it directly withnpx (no global install required) or install the CLI first:
- A Node API token from Geomi
- An API wallet created at app.decibel.trade/api (for trading operations)
Setup with Claude Code
The fastest way to add the MCP server:DECIBEL_PRIVATE_KEY and DECIBEL_SUBACCOUNT_ADDRESS if you’ve already added a default account with decibel-cli account add.
Setup with JSON config
Add the following to your MCP client’s configuration file. For Claude Code, this is~/.claude.json (or run claude mcp add). For Claude Desktop, this is claude_desktop_config.json.
Environment variables
The MCP server uses the same environment variables as the CLI:Perpetual and spot trading tools use the same credentials: a signing key and subaccount address, supplied through environment variables or a stored account. Market data tools (
get_markets, get_price, get_orderbook, get_spot_markets, get_spot_price, get_spot_orderbook) only require DECIBEL_NODE_API_KEY. Spot account queries (get_spot_orders, get_spot_balances, get_spot_trade_history, get_spot_order_history) also need a subaccount address, but no signing key.Authentication
The MCP server supports the same authentication methods as the CLI, resolved in this order:- Environment variables (
DECIBEL_PRIVATE_KEY+DECIBEL_SUBACCOUNT_ADDRESS) - Default account from local storage (
~/.decibel/data.db)
decibel-cli account add first and the server will use the default account automatically.
Verify the connection
After configuring your MCP client, ask the AI agent to run a simple query:get_markets tool and return the list of available trading pairs.
To verify spot support, ask:
get_spot_markets. With a subaccount configured, ask it to show your spot holdings using get_spot_balances. These are read-only checks and do not place orders. Spot market availability depends on the selected network.
