openmm-mcp
@qbtlabs/openmm-mcp
OpenMM 的 MCP 服务器 —— 通过任何 MCP 客户端向 AI 代理提供市场数据、账户、交易和策略工具。
两种使用方式
选项 | 适用场景 | API 密钥 | 支付 |
本地 (npm) | 完全控制,使用自己的密钥 | 加密保险库 | 免费 |
托管 (mcp.openmm.io) | 无需设置,按需付费 | 公共数据无需密钥 | x402 USDC |
Related MCP server: polymarket-trader-mcp
本地设置
先决条件: Node.js 20 或更高版本。
1. 安装与配置
npm install -g @qbtlabs/openmm-mcp
openmm-mcp --setup设置向导会为您的客户端(Claude Desktop、Claude Code、Cursor、Windsurf)写入正确的 MCP 配置。配置文件中不会存储任何凭据 —— 仅存储套接字路径。
2. 初始化加密保险库
openmm-init这将在 ~/.openmm/vault.enc 处创建一个加密保险库,其中包含您的钱包密钥和交易所 API 凭据。您将设置密码、生成(或导入)钱包,并可选择添加交易所密钥。
3. 启动服务器
openmm serve输入一次您的保险库密码。统一套接字将在 /tmp/openmm.sock 启动 —— 所有 MCP 客户端都连接到此处。任何配置文件中都不会存在凭据。
手动配置
如果您更喜欢直接编辑配置文件而不是使用 --setup:
客户端 | 配置文件 |
Claude Desktop |
|
Claude Code |
|
Cursor |
|
Windsurf |
|
{
"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"
}
}
}
}将 /path/to/openmm-mcp 替换为实际的安装路径。对于 Claude Desktop,请使用 node 的完整路径(例如通过 which node 获取),以避免 nvm/PATH 问题。
提示: 请改用
openmm-mcp --setup—— 它会自动写入正确的绝对路径。
没有 API 密钥。没有私钥。没有密码。只有套接字路径。
无保险库模式(快速启动)
您可以跳过保险库,直接在 env 块中传递 API 密钥:
{
"mcpServers": {
"openmm": {
"command": "npx",
"args": ["@qbtlabs/openmm-mcp"],
"env": {
"MEXC_API_KEY": "your_key",
"MEXC_SECRET": "your_secret"
}
}
}
}保险库增强了每一种场景的安全性 —— 任何配置文件、进程环境或客户端内存中都不会存在敏感信息。
客户端兼容性
客户端 | 无保险库 | 有保险库 |
Claude Desktop | 环境中的 API 密钥 | 仅 |
Claude Code | 环境中的 API 密钥 | 仅 |
Cursor | 环境中的 API 密钥 | 仅 |
Windsurf | 环境中的 API 密钥 | 仅 |
所有客户端都连接到同一个运行中的 openmm serve —— 一个保险库,一个套接字,适用于任何客户端。
带有 x402 支付的托管服务器
连接到 mcp.openmm.io —— 公共数据无需本地安装。
使用 Base 链上的 USDC 按工具调用次数付费。
工作原理
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安全属性
属性 | 实现方式 |
静态密钥加密 |
|
密钥从不进入客户端内存 | MCP 进程仅持有套接字路径 |
配置文件中无密钥 | 配置中没有任何 API 密钥或私钥 |
进程隔离 | 签名发生在 |
策略执行 | 在访问私钥前检查支出限额 |
内存安全 |
|
支付流程
代理调用工具
服务器返回
402 Payment Required及价格openmm serve签署 EIP-3009 授权(无 Gas 费 —— 无需 ETH)服务器在链上提交支付并返回数据
工具定价
类别 | 工具 | 价格 (USDC) |
免费 |
| $0.00 |
读取 |
| $0.001 |
写入 |
| $0.01 |
可用工具 (15)
工具 | 描述 | 参数 |
市场数据 | ||
| 列出支持的交易所 | — |
| 实时价格、买入/卖出价、点差、成交量 |
|
| 订单簿深度(买单/卖单) |
|
| 近期交易及买卖汇总 |
|
| OHLCV K 线数据 |
|
账户 | ||
| 账户余额(全部或筛选) |
|
| 未结订单(全部或按交易对) |
|
交易 | ||
| 下限价单或市价单 |
|
| 按 ID 取消订单 |
|
| 取消某交易对的所有订单 |
|
Cardano DEX | ||
| 从 DEX 聚合的代币价格 |
|
| 发现流动性池 |
|
策略 | ||
| 启动网格交易 |
|
| 停止运行中的策略 |
|
| 获取策略状态 |
|
CLI 参考
设置与服务器
命令 | 描述 |
| 创建保险库,生成/导入钱包,添加交易所 |
| 使用现有私钥创建保险库 |
| 解锁保险库,启动统一套接字 |
| 显示保险库、套接字、钱包和交易所状态(无需密码) |
交易所凭据
命令 | 描述 |
| 列出已配置的交易所 |
| 添加交易所凭据 |
| 移除交易所凭据 |
支持的交易所:mexc, gateio, bitget, kraken, binance, coinbase, okx
钱包
命令 | 描述 |
| 显示钱包地址和链 |
| 设置钱包凭据 |
| 显示私钥(需要确认) |
支出策略
命令 | 描述 |
| 显示当前策略 |
| 每笔交易的最大 USDC |
| 每天的最大 USDC |
| 逗号分隔的链 ID |
| 清除所有策略限制 |
高级
命令 | 描述 |
| 显示保险库元数据 |
| 更改保险库密码 |
| 导出所有凭据(危险) |
| 删除保险库 |
使用示例
检查 BTC 价格:
"Get me the BTC/USDT ticker on MEXC"下单:
"Buy 0.1 ETH at $2400 on Kraken"启动网格策略:
"Start a grid strategy on MEXC for INDY/USDT between $0.10 and $0.15 with 10 levels and $500 total"检查 Cardano 代币:
"What's the current price of SNEK on Cardano DEXes?"安全性
保险库: AES-256-GCM 加密,位于
~/.openmm/vault.enc密码: 仅限交互式终端 —— 绝不出现在任何配置文件、环境变量或 CLI 标志中
套接字:
/tmp/openmm.sock模式0600—— 套接字是身份验证边界策略: 在接触私钥之前,在套接字处强制执行支出限额
隔离: 私钥绝不会进入任何 MCP 客户端进程内存 —— 签名通过 IPC 在
openmm serve进程中完成
开发
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资源
OpenMM SDK — 底层交易 SDK
x402 Package — 支付集成
MCP Specification — 模型上下文协议文档
Base Network — 用于 USDC 支付的 L2 网络
许可证
MIT
托管部署
可在 Fronteir AI 上进行托管部署。
Available Tools
13 toolscancel_all_ordersAInspect
Cancel all open orders for a trading pair on a supported exchange
Inputs: exchange (required), symbol (required).
cancel_orderAInspect
Cancel a specific order by ID on a supported exchange
Inputs: exchange (required), symbol (required), orderId (required).
create_orderBInspect
Create a new order (limit or market) on a supported exchange
Inputs: exchange (required), symbol (required), type (required), side (required), +2 more.
discover_poolsAInspect
Discover Cardano DEX liquidity pools for a native token via Iris API
Inputs: symbol (required).
get_balanceAInspect
Get account balances for all assets (or a specific asset) on a supported exchange
Inputs: exchange (required), asset.
get_cardano_priceAInspect
Get aggregated price for a Cardano native token from DEX liquidity pools (TOKEN/USDT via ADA bridge)
Inputs: symbol (required).
get_orderbookBInspect
Fetch order book depth (bids and asks) for a trading pair on a supported exchange
Inputs: exchange (required), symbol (required), limit.
get_strategy_statusAInspect
Get current grid strategy status: open orders, current price, and P&L estimate
Inputs: exchange (required), symbol (required).
get_tickerAInspect
Get real-time price, bid/ask, spread, and volume for a trading pair on a supported exchange
Inputs: exchange (required), symbol (required).
get_tradesCInspect
Get recent trades for a trading pair on a supported exchange
Inputs: exchange (required), symbol (required), limit.
list_ordersAInspect
List open orders on a supported exchange, optionally filtered by trading pair symbol
Inputs: exchange (required), symbol.
start_grid_strategyBInspect
Calculate and optionally place grid trading orders around the current price
Inputs: exchange (required), symbol (required), levels, spacing, +5 more.
stop_strategyAInspect
Cancel all open orders for a trading pair, effectively stopping any running grid strategy
Inputs: exchange (required), symbol (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have distinct purposes, such as create_order for order creation and get_ticker for price data. However, cancel_all_orders and stop_strategy both involve canceling orders for a trading pair, which could cause confusion in selection, though stop_strategy is tied to grid strategies.
The naming follows a consistent verb_noun pattern with snake_case throughout, such as get_balance and list_orders. Minor deviations exist, like discover_pools using 'discover' instead of 'get' or 'list', but overall the pattern is clear and readable.
With 13 tools, the count is well-scoped for a trading and strategy automation server. Each tool serves a specific function, from order management to price fetching and strategy control, without feeling excessive or insufficient for the domain.
The toolset covers core trading operations like order CRUD, balance checks, and market data, plus grid strategy management. A minor gap is the lack of tools for modifying existing orders (e.g., update_order) or detailed strategy configuration, but agents can work around this with the available tools.
Maintenance
Related MCP Connectors
AI prediction market trading — real-time data, CLOB exchange, Prop Desk, 40+ tools
Non-custodial DeFi tools for AI agents on Solana: swaps, perps, lending, staking, equities.
AI crypto signals, whale positions, 19 technical indicators, derivatives, screener and backtests
Crypto market signals and portfolio telemetry. 6 tools pay-per-call in USDC, no API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides cryptocurrency trading signals, market analysis, and portfolio management capabilities across 15+ exchanges with AI-enhanced technical analysis, arbitrage detection, and risk assessment tools.2MIT
- AlicenseAqualityDmaintenanceTrade, analyze, and automate Polymarket prediction markets via AI. 34 tools for direct trading, smart money flow, copy trading, backtest, and portfolio management.48115 npm20MIT

Haiku DeFi MCPofficial
AlicenseAqualityDmaintenanceMCP server for DeFi execution — lets AI agents swap, provide liquidity, lend, bridge, and run yield strategies across 22 chains in a single transaction. 7 tools for token discovery, portfolio analysis, quoting, and execution via the Haiku API.780 npm2MIT- AlicenseNot gradedqualityDmaintenanceEnables AI-powered cryptocurrency trading and analytics across multiple exchanges and blockchains, with integrated Telegram bot and live trading capabilities.3MIT