@qbtlabs/openmm-mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**📚 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
| Option | Best For | API Keys | Payments |
|--------|----------|----------|----------|
| **Local (npm)** | Full control, your own keys | Encrypted vault | Free |
| **Hosted (mcp.openmm.io)** | No setup, pay-per-use | Not needed for public data | x402 USDC |
---
Local Setup
**Prerequisites:** Node.js 20 or later.
1. Install and configure
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
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
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:
| Client | Config file |
|--------|-------------|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json |
| Cursor | .cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
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 --setup instead — 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:
The vault strengthens every scenario — nothing sensitive exists in any config file, process environment, or client memory.
Client compatibility
| Client | Without vault | With vault |
|--------|--------------|------------|
| Claude Desktop | API keys in env | Only OPENMM_SOCKET |
| Claude Code | API keys in env | Only OPENMM_SOCKET |
| Cursor | API keys in env | Only OPENMM_SOCKET |
| Windsurf | API keys in env | Only OPENMM_SOCKET |
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
Security properties
| Property | How |
|----------|-----|
| Keys encrypted at rest | AES-256-GCM + PBKDF2 in ~/.openmm/vault.enc |
| Keys never in client memory | MCP process only holds socket path |
| Keys never in config files | No API keys, no private keys anywhere in config |
| Process isolation | Signing happens in openmm serve, not in the AI agent process |
| Policy enforcement | Spending limits checked before private key is accessed |
| Memory safety | signAndWipe() — key used once, goes out of scope immediately |
Payment flow
1. Agent calls a tool
2. Server returns 402 Payment Required with price
3. openmm serve signs EIP-3009 authorization (gasless — no ETH needed)
4. Server submits payment on-chain and returns data
Tool Pricing
| Category | Tools | Price (USDC) |
|----------|-------|--------------|
| **Free** | list_exchanges | $0.00 |
| **Read** | get_ticker, get_orderbook, get_trades, get_ohlcv, get_balance, list_orders, get_cardano_price, discover_pools, get_strategy_status | $0.001 |