Skip to main content

What is the Decibel MCP server?

The Decibel MCP server implements the Model Context Protocol, allowing AI agents like Claude to trade on Decibel DEX programmatically. It exposes 36 tools covering:
  • Perpetuals trading - Place and cancel orders (limit, market, stop, TWAP), close positions, set TP/SL
  • Spot trading - Place limit and market orders, cancel individual orders or sweep open orders
  • Market data - Perpetual and spot prices, orderbook snapshots, and market listings
  • Account queries - Perpetual balances and positions, spot holdings and reservations, orders, and trading history
The MCP server requires a Node API token and an API wallet for trading operations. Get your API token from Geomi and create an API wallet at app.decibel.trade/api.
The MCP server is bundled with the Decibel CLI (@decibeltrade/cli). Installing the CLI gives you both the command-line interface and the MCP server.

Installation

Set up the MCP server with Claude Code, Claude Desktop, or other MCP clients.

Tool Reference

Full reference for all 36 tools with parameters and descriptions.

CLI Reference

The CLI exposes the same functionality for direct terminal use.

How it works

The MCP server runs as a local stdio process. An MCP-compatible client (like Claude Code or Claude Desktop) launches the server and communicates with it over stdin/stdout using the Model Context Protocol. Each MCP tool maps directly to a CLI action. The server validates inputs using Zod schemas, calls the Decibel SDK to execute on-chain transactions or query market data, and returns JSON results.

Available tools

The server exposes 36 tools organized by product and function: See the Tool Reference for complete details on each tool.

Using spot tools

Use get_spot_markets to discover spot symbols and the *_spot_* tools to trade them. The original market and order tools are for perpetuals. Spot orders accept buy or sell, not long or short, and have no leverage, reduce-only, stop, TP/SL, TWAP, or client order ID parameters. Spot market orders are IOC limit orders at a slippage-adjusted price, not a separate on-chain market order type. They never rest on the book; inspect get_spot_trade_history for fills and get_spot_order_history for the final state.
A placement result with pendingCbs: true means the order is queued, not placed. Do not infer completion from transaction success or an empty open-orders list. cancel_all_spot_orders cannot find queued orders; cancel them by ID with cancel_spot_order. Report partial cancellation results and errors accurately, and never remove a requested market filter without user approval.
See spot order behavior for the details agents must handle.