The openmm-mcp server exposes cryptocurrency trading and market data tools to AI agents (via Claude Desktop, Cursor, Windsurf, etc.) across supported exchanges (MEXC, Bitget, Gate.io, Kraken) and Cardano DEX, through 13 tools:
Market Data
get_ticker— Real-time price, bid/ask, spread, and volume for any trading pairget_orderbook— Order book depth (bids/asks) with configurable limitget_trades— Recent trade history with configurable limit
Account Management
get_balance— View balances for all assets or a specific assetlist_orders— List open orders, optionally filtered by trading pair
Trading
create_order— Place limit or market buy/sell orderscancel_order— Cancel a specific order by IDcancel_all_orders— Cancel all open orders for a trading pair
Automated Grid Strategy
start_grid_strategy— Deploy grid trading orders around the current price, with linear/geometric spacing and flat/pyramidal sizing models; includes dry-run preview modestop_strategy— Stop a running strategy by cancelling all its ordersget_strategy_status— Check strategy status, open orders, current price, and P&L estimate
Cardano DEX
get_cardano_price— Aggregated token prices from Cardano DEX liquidity pools (INDY, SNEK, MIN, NIGHT)discover_pools— Discover Cardano DEX liquidity pools for a native token
The server also provides structured resources (supported exchanges, grid strategy docs, example profiles) and pre-built prompts for market analysis, portfolio overview, and grid setup. It supports stdio and HTTP transport modes and can be run locally, via Docker, or as a hosted remote server.
Allows access to aggregated Cardano token prices and liquidity pool discovery from decentralized exchanges (DEXes) via on-chain data.
@qbtlabs/openmm-mcp
📚 Documentation · 🤖 AI Skills Portal · 🔌 API Reference
MCP (Model Context Protocol) server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents via Claude Desktop, Claude Code, Cursor, Windsurf, and other MCP clients.
Two Ways to Use OpenMM MCP
Option | Best For | API Keys | Payments |
🏠 Local (npm) | Full control, your own keys | Stored locally | Free |
☁️ Hosted (mcp.openmm.io) | No setup, pay-per-use | Not needed for public data | x402 USDC |
🏠 Option 1: Local Installation (Your Keys, Full Control)
Run the MCP server locally with your own exchange API keys.
Quick Start
# Install globally
npm install -g @qbtlabs/openmm-mcp
# Run setup wizard
npx @qbtlabs/openmm-mcp setupThe setup wizard will:
Configure your MCP client (Claude Desktop, Claude Code, Cursor, Windsurf)
Prompt for exchange API credentials
Automatically update config files
Manual Configuration
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_mexc_api_key",
"MEXC_SECRET": "your_mexc_secret",
"GATEIO_API_KEY": "your_gateio_key",
"GATEIO_SECRET": "your_gateio_secret",
"KRAKEN_API_KEY": "your_kraken_key",
"KRAKEN_SECRET": "your_kraken_secret",
"BITGET_API_KEY": "your_bitget_key",
"BITGET_SECRET": "your_bitget_secret",
"BITGET_PASSPHRASE": "your_bitget_passphrase"
}
}
}
}Claude Code
claude mcp add openmm -- npx @qbtlabs/openmm-mcpOr edit ~/.claude.json:
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_key",
"MEXC_SECRET_KEY": "your_secret",
"KRAKEN_API_KEY": "your_key",
"KRAKEN_SECRET": "your_secret"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_key",
"MEXC_SECRET": "your_secret"
}
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_key",
"MEXC_SECRET": "your_secret"
}
}
}
}Exchange API Keys
Exchange | Required Environment Variables |
MEXC |
|
Gate.io |
|
Kraken |
|
Bitget |
|
How to get API keys:
MEXC API — Enable Spot trading
Gate.io API — Enable Spot trading
Kraken API — Enable trading permissions
Bitget API — Enable Spot trading + passphrase
☁️ Option 2: Hosted Server with x402 Payments
Connect to mcp.openmm.io — no local installation, no API keys for public data. Pay per tool call with USDC on Base.
How It Works
Your AI Agent → x402 Proxy → mcp.openmm.io → Data
↓
Signs USDC payment
↓
On-chain settlement (Base)Agent calls a tool
Server returns
402 Payment Requiredwith priceYour wallet signs an EIP-3009 authorization (gasless for you)
Server submits payment on-chain and returns data
Setup with x402 Proxy
# Install the x402 package
npm install -g @qbtlabs/x402
# Configure Claude Code with the proxyEdit ~/.claude.json:
{
"mcpServers": {
"openmm-x402": {
"command": "qbtlabs-x402",
"env": {
"TARGET_URL": "https://mcp.openmm.io/mcp",
"PRIVATE_KEY": "0x_your_wallet_private_key",
"CHAIN": "base-sepolia"
}
}
}
}Wallet Setup
Create a wallet for your AI agent (MetaMask, etc.)
Fund with USDC on Base Sepolia (testnet) or Base (mainnet)
Export private key and add to config
Testnet faucets:
Base Sepolia ETH: Coinbase Faucet
USDC: Use Circle Faucet or bridge from Sepolia
Tool Pricing
Category | Tools | Price (USDC) |
Free |
| $0.00 |
Read |
| $0.001 |
Write |
| $0.01 |
Payment Response
Every paid tool returns payment confirmation:
{
"result": {
"content": [{"type": "text", "text": "...data..."}],
"_payment": {
"received": true,
"txHash": "0x9720bcf1b81f9f11c2a5657722ddec77fc2c...",
"explorer": "https://basescan.org/tx/0x9720bcf...",
"amount": "$0.0010"
}
}
}Environment Variables
Variable | Description | Required |
| MCP server URL | Yes |
| Wallet private key (for signing) | Yes |
|
| Yes |
Available Tools (15)
Tool | Description | Parameters |
Market Data | ||
| List supported exchanges | — |
| Real-time price, bid/ask, spread, volume |
|
| Order book depth (bids/asks) |
|
| Recent trades with buy/sell summary |
|
| OHLCV candlestick data |
|
Account | ||
| Account balances (all or filtered) |
|
| Open orders (all or by symbol) |
|
Trading | ||
| Place limit or market order |
|
| Cancel order by ID |
|
| Cancel all orders for a pair |
|
Cardano DEX | ||
| Aggregated token price from DEXes |
|
| Discover liquidity pools |
|
Strategy | ||
| Start grid trading |
|
| Stop a running strategy |
|
| Get strategy status |
|
Example Usage
Check BTC price:
"Get me the BTC/USDT ticker on MEXC"Place an order:
"Buy 0.1 ETH at $2400 on Kraken"Start grid strategy:
"Start a grid strategy on MEXC for INDY/USDT between $0.10 and $0.15 with 10 levels and $500 total"Check Cardano token:
"What's the current price of SNEK on Cardano DEXes?"Architecture
┌─────────────────────────────────────────────────────────────┐
│ Your AI Agent │
│ (Claude Code, Cursor, etc.) │
└─────────────────────────┬───────────────────────────────────┘
│
┌───────────────┴───────────────┐
▼ ▼
┌─────────────────────┐ ┌─────────────────────────────┐
│ 🏠 LOCAL (npm) │ │ ☁️ HOSTED (mcp.openmm.io) │
│ │ │ │
│ npx @qbtlabs/ │ │ x402 Proxy (stdio) │
│ openmm-mcp │ │ │ │
│ │ │ │ ▼ │
│ ▼ │ │ HTTPS + EIP-3009 payment │
│ Your API Keys │ │ │ │
│ (env variables) │ │ ▼ │
│ │ │ │ Cloudflare Worker │
│ ▼ │ │ (15 tools, always online) │
│ Direct exchange │ │ │ │
│ API calls │ │ ▼ │
│ │ │ Exchange APIs │
└─────────────────────┘ └─────────────────────────────┘Self-Hosting the HTTP Server
Run your own hosted instance:
Option A: Cloudflare Workers
git clone https://github.com/QBT-Labs/openmm-mcp-worker.git
cd openmm-mcp-worker
# Add secrets
wrangler secret put X402_EVM_ADDRESS
wrangler secret put X402_PRIVATE_KEY
wrangler secret put MEXC_API_KEY
wrangler secret put MEXC_SECRET
# ... add other exchange keys
# Deploy
wrangler deployOption B: Node.js HTTP Server
MCP_TRANSPORT=http PORT=3000 npx @qbtlabs/openmm-mcpPOST /mcp— MCP JSON-RPC endpointGET /health— Health check
Option C: Docker
docker build -t openmm-mcp .
docker run -p 3000:3000 \
-e MCP_TRANSPORT=http \
-e MEXC_API_KEY=your_key \
-e MEXC_SECRET=your_secret \
openmm-mcpDevelopment
git clone https://github.com/QBT-Labs/openMM-mcp-agent.git
cd openMM-mcp-agent
npm install
cp .env.example .env # Edit with your API keys
npm run typecheck # Type checking
npm run lint # Linting
npm run format:check # Format checking
npm test # Run tests
npm run build # Build to dist/Security
Local mode: API keys stay on your machine, never leave your environment
Hosted mode: No exchange API keys needed for public market data
x402 payments: Sign transactions locally; private key never sent to server
EIP-3009: Gasless signatures — you only need USDC, not ETH
Resources
OpenMM SDK — Underlying trading SDK
x402 Package — Payment integration
MCP Specification — Model Context Protocol docs
Base Network — L2 for USDC payments
License
MIT