{
  "markdown": "# @qbtlabs/openmm-mcp\n\n[![smithery badge](https://smithery.ai/badge/qbtlabs/openmm-mcp)](https://smithery.ai/servers/qbtlabs/openmm-mcp)\n[![npm version](https://img.shields.io/npm/v/@qbtlabs/openmm-mcp.svg)](https://www.npmjs.com/package/@qbtlabs/openmm-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@qbtlabs/openmm-mcp.svg)](https://www.npmjs.com/package/@qbtlabs/openmm-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/QBT-Labs/OpenMM-MCP)\n\n**📚 [Documentation](https://docs.openmm.io)** · **🤖 [AI Skills Portal](https://agents.openmm.io)** · **🔌 [API Reference](https://api.openmm.io)**\n\nMCP server for [OpenMM](https://github.com/3rd-Eye-Labs/OpenMM) — exposes market data, account, trading, and strategy tools to AI agents via any MCP client.\n\n<a href=\"https://glama.ai/mcp/servers/QBT-Labs/openmm-mcp\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/QBT-Labs/openmm-mcp/badge\" alt=\"openmm-mcp MCP server\" />\n</a>\n\n## Two Ways to Use\n\n| Option | Best For | API Keys | Payments |\n|--------|----------|----------|----------|\n| **Local (npm)** | Full control, your own keys | Encrypted vault | Free |\n| **Hosted (mcp.openmm.io)** | No setup, pay-per-use | Not needed for public data | x402 USDC |\n\n---\n\n## Local Setup\n\n**Prerequisites:** Node.js 20 or later.\n\n### 1. Install and configure\n\n```bash\nnpm install -g @qbtlabs/openmm-mcp\nopenmm-mcp --setup\n```\n\nThe 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.\n\n### 2. Initialize encrypted vault\n\n```bash\nopenmm-init\n```\n\nThis 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.\n\n### 3. Start the server\n\n```bash\nopenmm serve\n```\n\nType your vault password once. The unified socket starts at `/tmp/openmm.sock` — all MCP clients connect here. No credentials exist in any config file.\n\n### Manual configuration\n\nIf you prefer to edit config files directly instead of using `--setup`:\n\n| Client | Config file |\n|--------|-------------|\n| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| Claude Code | `~/.claude.json` |\n| Cursor | `.cursor/mcp.json` |\n| Windsurf | `~/.codeium/windsurf/mcp_config.json` |\n\n```json\n{\n  \"mcpServers\": {\n    \"openmm\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/openmm-mcp/dist/index.js\"],\n      \"env\": {\n        \"MCP_TRANSPORT\": \"stdio\",\n        \"OPENMM_SOCKET\": \"/tmp/openmm.sock\",\n        \"PAYMENT_SERVER\": \"https://mcp.openmm.io\",\n        \"X402_TESTNET\": \"true\"\n      }\n    }\n  }\n}\n```\n\nReplace `/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.\n\n> **Tip:** Run `openmm-mcp --setup` instead — it writes the correct absolute paths automatically.\n\nNo API keys. No private keys. No passwords. Just the socket path.\n\n### Without vault (quick start)\n\nYou can skip the vault and pass API keys directly in the `env` block:\n\n```json\n{\n  \"mcpServers\": {\n    \"openmm\": {\n      \"command\": \"npx\",\n      \"args\": [\"@qbtlabs/openmm-mcp\"],\n      \"env\": {\n        \"MEXC_API_KEY\": \"your_key\",\n        \"MEXC_SECRET\": \"your_secret\"\n      }\n    }\n  }\n}\n```\n\nThe vault strengthens every scenario — nothing sensitive exists in any config file, process environment, or client memory.\n\n### Client compatibility\n\n| Client | Without vault | With vault |\n|--------|--------------|------------|\n| Claude Desktop | API keys in env | Only `OPENMM_SOCKET` |\n| Claude Code | API keys in env | Only `OPENMM_SOCKET` |\n| Cursor | API keys in env | Only `OPENMM_SOCKET` |\n| Windsurf | API keys in env | Only `OPENMM_SOCKET` |\n\nAll clients connect to the same running `openmm serve` — one vault, one socket, any client.\n\n---\n\n## Hosted Server with x402 Payments\n\nConnect to `mcp.openmm.io` — no local installation needed for public data.\nPay per tool call with USDC on Base.\n\n### How it works\n\n```\nAI Agent (Claude / Cursor / Windsurf)\n│  MCP stdio — no keys in config\n▼\nMCP Client Process\n(reads OPENMM_SOCKET — credentials never here)\n│  Unix socket /tmp/openmm.sock (mode 0600)\n▼\nopenmm serve — unified vault process\n┌──────────────────────────────────┐\n│  ~/.openmm/vault.enc             │\n│  AES-256-GCM + PBKDF2           │  ← wallet key + exchange keys, one vault\n│            │                     │\n│  Policy Engine                   │  ← maxPerTx, maxPerDay, allowedChains\n│  (checked before key is touched) │\n│            │                     │\n│  signAndWipe()                   │  ← key used inline, wiped from memory\n└──────────────────────────────────┘\n│  EIP-3009 signature only\n▼\nmcp.openmm.io → x402 verification → Base L2 settlement\n```\n\n### Security properties\n\n| Property | How |\n|----------|-----|\n| Keys encrypted at rest | AES-256-GCM + PBKDF2 in `~/.openmm/vault.enc` |\n| Keys never in client memory | MCP process only holds socket path |\n| Keys never in config files | No API keys, no private keys anywhere in config |\n| Process isolation | Signing happens in `openmm serve`, not in the AI agent process |\n| Policy enforcement | Spending limits checked before private key is accessed |\n| Memory safety | `signAndWipe()` — key used once, goes out of scope immediately |\n\n### Payment flow\n\n1. Agent calls a tool\n2. Server returns `402 Payment Required` with price\n3. `openmm serve` signs EIP-3009 authorization (gasless — no ETH needed)\n4. Server submits payment on-chain and returns data\n\n### Tool Pricing\n\n| Category | Tools | Price (USDC) |\n|----------|-------|--------------|\n| **Free** | `list_exchanges` | $0.00 |\n| **Read** | `get_ticker`, `get_orderbook`, `get_trades`, `get_ohlcv`, `get_balance`, `list_orders`, `get_cardano_price`, `discover_pools`, `get_strategy_status` | $0.001 |\n| **Write** | `create_order`, `cancel_order`, `cancel_all_orders`, `start_grid_strategy`, `stop_strategy` | $0.01 |\n\n---\n\n## Available Tools (15)\n\n| Tool | Description | Parameters |\n|------|-------------|------------|\n| **Market Data** |\n| `list_exchanges` | List supported exchanges | — |\n| `get_ticker` | Real-time price, bid/ask, spread, volume | `exchange`, `symbol` |\n| `get_orderbook` | Order book depth (bids/asks) | `exchange`, `symbol`, `limit?` |\n| `get_trades` | Recent trades with buy/sell summary | `exchange`, `symbol`, `limit?` |\n| `get_ohlcv` | OHLCV candlestick data | `exchange`, `symbol`, `timeframe?`, `limit?` |\n| **Account** |\n| `get_balance` | Account balances (all or filtered) | `exchange`, `asset?` |\n| `list_orders` | Open orders (all or by symbol) | `exchange`, `symbol?` |\n| **Trading** |\n| `create_order` | Place limit or market order | `exchange`, `symbol`, `type`, `side`, `amount`, `price?` |\n| `cancel_order` | Cancel order by ID | `exchange`, `symbol`, `orderId` |\n| `cancel_all_orders` | Cancel all orders for a pair | `exchange`, `symbol` |\n| **Cardano DEX** |\n| `get_cardano_price` | Aggregated token price from DEXes | `symbol` |\n| `discover_pools` | Discover liquidity pools | `symbol`, `minLiquidity?` |\n| **Strategy** |\n| `start_grid_strategy` | Start grid trading | `exchange`, `symbol`, `lowerPrice`, `upperPrice`, `gridLevels?`, `totalAmount` |\n| `stop_strategy` | Stop a running strategy | `strategyId`, `cancelOrders?` |\n| `get_strategy_status` | Get strategy status | `strategyId` |\n\n---\n\n## CLI Reference\n\n### Setup & Server\n\n| Command | Description |\n|---------|-------------|\n| `openmm-init` | Create vault, generate/import wallet, add exchanges |\n| `openmm-init --import <key>` | Create vault with an existing private key |\n| `openmm serve` | Unlock vault, start unified socket |\n| `openmm-status` | Show vault, socket, wallet, and exchange status (no password) |\n\n### Exchange Credentials\n\n| Command | Description |\n|---------|-------------|\n| `openmm-exchange list` | List configured exchanges |\n| `openmm-exchange add <id>` | Add exchange credentials |\n| `openmm-exchange remove <id>` | Remove exchange credentials |\n\nSupported exchanges: `mexc`, `gateio`, `bitget`, `kraken`, `binance`, `coinbase`, `okx`\n\n### Wallet\n\n| Command | Description |\n|---------|-------------|\n| `openmm-wallet info` | Show wallet address and chain |\n| `openmm-wallet set` | Set wallet credentials |\n| `openmm-wallet export` | Display private key (requires confirmation) |\n\n### Spending Policy\n\n| Command | Description |\n|---------|-------------|\n| `openmm-policy show` | Show current policy |\n| `openmm-policy set max-per-tx <amount>` | Max USDC per transaction |\n| `openmm-policy set max-per-day <amount>` | Max USDC per day |\n| `openmm-policy set allowed-chains <chains>` | Comma-separated chain IDs |\n| `openmm-policy reset` | Clear all policy limits |\n\n### Advanced\n\n| Command | Description |\n|---------|-------------|\n| `openmm-vault info` | Show vault metadata |\n| `openmm-vault change-password` | Change vault password |\n| `openmm-vault export` | Export all credentials (dangerous) |\n| `openmm-vault destroy` | Delete the vault |\n\n---\n\n## Example Usage\n\n**Check BTC price:**\n```\n\"Get me the BTC/USDT ticker on MEXC\"\n```\n\n**Place an order:**\n```\n\"Buy 0.1 ETH at $2400 on Kraken\"\n```\n\n**Start grid strategy:**\n```\n\"Start a grid strategy on MEXC for INDY/USDT between $0.10 and $0.15 with 10 levels and $500 total\"\n```\n\n**Check Cardano token:**\n```\n\"What's the current price of SNEK on Cardano DEXes?\"\n```\n\n---\n\n## Security\n\n- **Vault:** AES-256-GCM encrypted at `~/.openmm/vault.enc`\n- **Password:** Interactive terminal only — never in any config file, env var, or CLI flag\n- **Socket:** `/tmp/openmm.sock` mode `0600` — the socket is the authentication boundary\n- **Policy:** Spending limits enforced at the socket before the private key is touched\n- **Isolation:** Private key never enters any MCP client process memory — signing happens in the `openmm serve` process via IPC\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/QBT-Labs/openMM-MCP.git\ncd openMM-MCP\nnpm install\nnpm run typecheck\nnpm run lint\nnpm test\nnpm run build\n```\n\n---\n\n## Resources\n\n- [OpenMM SDK](https://github.com/3rd-Eye-Labs/OpenMM) — Underlying trading SDK\n- [x402 Package](https://www.npmjs.com/package/@qbtlabs/x402) — Payment integration\n- [MCP Specification](https://modelcontextprotocol.io) — Model Context Protocol docs\n- [Base Network](https://base.org) — L2 for USDC payments\n\n## License\n\nMIT\n\n## Hosted deployment\n\nA hosted deployment is available on [Fronteir AI](https://fronteir.ai/mcp/qbt-labs-openmm-mcp).\n\n",
  "bytes": 10690,
  "sha": "fab160822f2b0c804b9e57deb0a3fdde4392af9b6fb4b2140915ff2328a730d1",
  "repo_slug": "qbt-labs/openmm-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_qbt_labs_openmm_mcp_7aa70cb0/readme"
}