Prerequisites
The MCP server is bundled with the Decibel CLI. You can run it directly with npx (no global install required) or install the CLI first:
You’ll also need:
Setup with Claude Code
The fastest way to add the MCP server:
Replace the environment variable values with your own credentials. You can omit 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/settings.json. For Claude Desktop, this is claude_desktop_config.json.
Environment variables
The MCP server uses the same environment variables as the CLI:
DECIBEL_PRIVATE_KEY and DECIBEL_SUBACCOUNT_ADDRESS are required for trading tools (placing orders, cancelling, etc.). Market data tools (get_markets, get_price, get_orderbook) only require DECIBEL_NODE_API_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)
For the MCP server, environment variables are the most common approach since they’re set in the MCP client configuration. If you prefer stored accounts, run 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:
The agent should invoke the get_markets tool and return the list of available trading pairs.