@qbtlabs/openmm-mcp
๐ Documentation ยท ๐ค AI Skills Portal ยท ๐ API Reference
MCP server for OpenMM โ exposes market data, account, trading, and strategy tools to AI agents via any MCP client.
Two Ways to Use
Local Setup
Prerequisites: Node.js 20 or later.
1. Install and configure
npm install -g @qbtlabs/openmm-mcp
openmm-mcp --setup
The setup wizard writes the correct MCP config for your client (Claude Desktop, Claude Code, Cursor, Windsurf). No credentials are stored in config files โ only the socket path.
2. Initialize encrypted vault
openmm-init
This creates an encrypted vault at ~/.openmm/vault.enc containing your wallet key and exchange API credentials. You'll set a password, generate (or import) a wallet, and optionally add exchange keys.
3. Start the server
openmm serve
Type your vault password once. The unified socket starts at /tmp/openmm.sock โ all MCP clients connect here. No credentials exist in any config file.
Manual configuration
If you prefer to edit config files directly instead of using --setup:
{
"mcpServers": {
"openmm": {
"command": "node",
"args": ["/path/to/openmm-mcp/dist/index.js"],
"env": {
"MCP_TRANSPORT": "stdio",
"OPENMM_SOCKET": "/tmp/openmm.sock",
"PAYMENT_SERVER": "https://mcp.openmm.io",
"X402_TESTNET": "true"
}
}
}
}
Replace /path/to/openmm-mcp with the actual install path. For Claude Desktop, use the full path to node (e.g. from which node) to avoid nvm/PATH issues.
Tip: Run
openmm-mcp --setupinstead โ it writes the correct absolute paths automatically.
No API keys. No private keys. No passwords. Just the socket path.
Without vault (quick start)
You can skip the vault and pass API keys directly in the env block:
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_key",
"MEXC_SECRET": "your_secret"
}
}
}
}
The vault strengthens every scenario โ nothing sensitive exists in any config file, process environment, or client memory.
Client compatibility
All clients connect to the same running openmm serve โ one vault, one socket, any client.
Hosted Server with x402 Payments
Connect to mcp.openmm.io โ no local installation needed for public data.
Pay per tool call with USDC on Base.
How it works
AI Agent (Claude / Cursor / Windsurf)
โ MCP stdio โ no keys in config
โผ
MCP Client Process
(reads OPENMM_SOCKET โ credentials never here)
โ Unix socket /tmp/openmm.sock (mode 0600)
โผ
openmm serve โ unified vault process
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ~/.openmm/vault.enc โ
โ AES-256-GCM + PBKDF2 โ โ wallet key + exchange keys, one vault
โ โ โ
โ Policy Engine โ โ maxPerTx, maxPerDay, allowedChains
โ (checked before key is touched) โ
โ โ โ
โ signAndWipe() โ โ key used inline, wiped from memory
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EIP-3009 signature only
โผ
mcp.openmm.io โ x402 verification โ Base L2 settlement
Security properties
Payment flow
- Agent calls a tool
- Server returns
402 Payment Requiredwith price openmm servesigns EIP-3009 authorization (gasless โ no ETH needed)- Server submits payment on-chain and returns data
Tool Pricing
Available Tools (15)
CLI Reference
Setup & Server
Exchange Credentials
Supported exchanges: mexc, gateio, bitget, kraken, binance, coinbase, okx
Wallet
Spending Policy
Advanced
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?"
Security
- Vault: AES-256-GCM encrypted at
~/.openmm/vault.enc - Password: Interactive terminal only โ never in any config file, env var, or CLI flag
- Socket:
/tmp/openmm.sockmode0600โ the socket is the authentication boundary - Policy: Spending limits enforced at the socket before the private key is touched
- Isolation: Private key never enters any MCP client process memory โ signing happens in the
openmm serveprocess via IPC
Development
git clone https://github.com/QBT-Labs/openMM-MCP.git
cd openMM-MCP
npm install
npm run typecheck
npm run lint
npm test
npm run build
Resources
- OpenMM SDK โ Underlying trading SDK
- x402 Package โ Payment integration
- MCP Specification โ Model Context Protocol docs
- Base Network โ L2 for USDC payments
License
MIT
Hosted deployment
A hosted deployment is available on Fronteir AI.