Skip to main content
Glama

@qbtlabs/openmm-mcp

npm version npm downloads License: MIT Ask DeepWiki

📚 ドキュメント · 🤖 AIスキルポータル · 🔌 APIリファレンス

OpenMM 用のMCPサーバー。マーケットデータ、アカウント、取引、戦略ツールを、あらゆるMCPクライアントを通じてAIエージェントに提供します。

2つの利用方法

オプション

最適な用途

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

これにより、ウォレットキーと取引所のAPI認証情報を含む暗号化されたボルトが ~/.openmm/vault.enc に作成されます。パスワードを設定し、ウォレットを生成(またはインポート)し、必要に応じて取引所のキーを追加します。

3. サーバーの起動

openmm serve

ボルトのパスワードを一度入力します。統合ソケットが /tmp/openmm.sock で起動し、すべてのMCPクライアントがここに接続します。設定ファイルには認証情報は一切含まれません。

手動設定

--setup を使用せずに設定ファイルを直接編集したい場合:

クライアント

設定ファイル

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Code

~/.claude.json

Cursor

.cursor/mcp.json

Windsurf

~/.codeium/windsurf/mcp_config.json

{
  "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の場合は、nvm/PATHの問題を避けるため、node へのフルパス(which node で確認可能)を使用してください。

ヒント: 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

envにAPIキー

OPENMM_SOCKET のみ

Claude Code

envにAPIキー

OPENMM_SOCKET のみ

Cursor

envにAPIキー

OPENMM_SOCKET のみ

Windsurf

envにAPIキー

OPENMM_SOCKET のみ

すべてのクライアントが実行中の openmm serve に接続します。1つのボルト、1つのソケットで、どのクライアントからでも利用可能です。


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

セキュリティ特性

特性

方法

キーの保存時暗号化

~/.openmm/vault.enc にて AES-256-GCM + PBKDF2

クライアントメモリにキーを保持しない

MCPプロセスはソケットパスのみを保持

設定ファイルにキーを保持しない

設定ファイルにはAPIキーや秘密鍵は一切なし

プロセスの分離

署名はAIエージェントプロセスではなく openmm serve で実行

ポリシーの強制

秘密鍵へのアクセス前に支出制限をチェック

メモリ安全性

signAndWipe() — キーは一度だけ使用され、即座にスコープ外へ

支払いフロー

  1. エージェントがツールを呼び出す

  2. サーバーが価格とともに 402 Payment Required を返す

  3. openmm serve がEIP-3009認証に署名する(ガス代不要 — ETH不要)

  4. サーバーがオンチェーンで支払いを送信し、データを返す

ツール価格

カテゴリ

ツール

価格 (USDC)

無料

list_exchanges

$0.00

読み取り

get_ticker, get_orderbook, get_trades, get_ohlcv, get_balance, list_orders, get_cardano_price, discover_pools, get_strategy_status

$0.001

書き込み

create_order, cancel_order, cancel_all_orders, start_grid_strategy, stop_strategy

$0.01


利用可能なツール (15)

ツール

説明

パラメータ

マーケットデータ

list_exchanges

対応取引所の一覧

—

get_ticker

リアルタイム価格、買値/売値、スプレッド、出来高

exchange, symbol

get_orderbook

オーダーブックの深さ(買値/売値)

exchange, symbol, limit?

get_trades

最近の取引と売買サマリー

exchange, symbol, limit?

get_ohlcv

OHLCVローソク足データ

exchange, symbol, timeframe?, limit?

アカウント

get_balance

アカウント残高(全資産または指定資産)

exchange, asset?

list_orders

未決済注文(全注文またはシンボル指定)

exchange, symbol?

取引

create_order

指値または成行注文の発注

exchange, symbol, type, side, amount, price?

cancel_order

IDによる注文キャンセル

exchange, symbol, orderId

cancel_all_orders

ペアの全注文をキャンセル

exchange, symbol

Cardano DEX

get_cardano_price

DEXからの集計トークン価格

symbol

discover_pools

流動性プールの検索

symbol, minLiquidity?

戦略

start_grid_strategy

グリッド取引の開始

exchange, symbol, lowerPrice, upperPrice, gridLevels?, totalAmount

stop_strategy

実行中の戦略を停止

strategyId, cancelOrders?

get_strategy_status

戦略ステータスの取得

strategyId


CLIリファレンス

セットアップとサーバー

コマンド

説明

openmm-init

ボルト作成、ウォレット生成/インポート、取引所追加

openmm-init --import <key>

既存の秘密鍵でボルトを作成

openmm serve

ボルトのロック解除、統合ソケットの起動

openmm-status

ボルト、ソケット、ウォレット、取引所のステータス表示(パスワード不要)

取引所の認証情報

コマンド

説明

openmm-exchange list

設定済み取引所の一覧

openmm-exchange add <id>

取引所の認証情報を追加

openmm-exchange remove <id>

取引所の認証情報を削除

対応取引所: mexc, gateio, bitget, kraken, binance, coinbase, okx

ウォレット

コマンド

説明

openmm-wallet info

ウォレットアドレスとチェーンを表示

openmm-wallet set

ウォレットの認証情報を設定

openmm-wallet export

秘密鍵を表示(確認が必要)

支出ポリシー

コマンド

説明

openmm-policy show

現在のポリシーを表示

openmm-policy set max-per-tx <amount>

トランザクションあたりの最大USDC

openmm-policy set max-per-day <amount>

1日あたりの最大USDC

openmm-policy set allowed-chains <chains>

カンマ区切りのチェーンID

openmm-policy reset

すべてのポリシー制限をクリア

高度な設定

コマンド

説明

openmm-vault info

ボルトのメタデータを表示

openmm-vault change-password

ボルトのパスワードを変更

openmm-vault export

すべての認証情報をエクスポート(危険)

openmm-vault destroy

ボルトを削除


使用例

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?"

セキュリティ

  • ボルト: ~/.openmm/vault.enc にて AES-256-GCM 暗号化

  • パスワード: インタラクティブなターミナルのみ — 設定ファイル、環境変数、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

リソース

ライセンス

MIT

ホスト型デプロイメント

ホスト型デプロイメントは Fronteir AI で利用可能です。

Available Tools

13 tools
cancel_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

    B3.4/5.0

    Scored across 13 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides cryptocurrency trading signals, market analysis, and portfolio management capabilities across 15+ exchanges with AI-enhanced technical analysis, arbitrage detection, and risk assessment tools.
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Trade, analyze, and automate Polymarket prediction markets via AI. 34 tools for direct trading, smart money flow, copy trading, backtest, and portfolio management.
      48
      115 npm
      20
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      7
      80 npm
      2
      MIT