← Back to Docs

MCP Setup Guide

Connect OpenMM to your favorite AI client

⚡ Quick Setup (Recommended)

Install, set up your vault, start the server, then configure your client:

npm install -g @qbtlabs/openmm-mcp
openmm-init
openmm serve
openmm-mcp --setup

openmm-mcp --setup writes your client config with OPENMM_SOCKET, PAYMENT_SERVER, and transport settings — no credentials leave the vault.

Important: Run openmm serve before launching your MCP client. The server must be running for the socket connection to work.

What is MCP?

The Model Context Protocol (MCP) is an open standard that allows AI agents to connect to external tools and data sources. OpenMM provides an MCP server that gives your agent access to trading tools across multiple exchanges.

Choose Your Client

Run the setup wizard and select Claude Desktop:

openmm-mcp --setup

The wizard writes to claude_desktop_config.json using node with absolute path — no API keys in config.

After setup:

Restart Claude Desktop. You should see OpenMM tools available in the tools panel.

Best Integration: OpenClaw provides the most seamless experience with OpenMM skills, running locally on your machine with full MCP support.

Option A: Install Skills via ClawHub (Easiest)

clawhub install openmm
clawhub install openmm-exchange-setup
clawhub install openmm-grid-trading
clawhub install openmm-portfolio

This installs OpenMM skills directly into OpenClaw, making all tools available in your sessions.

Option B: Configure MCP Server

Run the setup wizard and select Claude Code (OpenClaw uses the same config):

openmm-mcp --setup

Restart the OpenClaw gateway

openclaw gateway restart

Verify Your Setup

Once configured, test that OpenMM is working by asking your agent:

"Get the BTC/USDT price on MEXC"
"Show the ETH/USDT orderbook on Gate.io"
"What are my balances on all exchanges?"

Troubleshooting

Tools not appearing?

  • • Make sure openmm serve is running before you launch your client
  • • Restart your AI client after running openmm-mcp --setup
  • • Check that Node.js 18+ is installed and in your PATH
  • • Run openmm-status to verify the socket is active

Authentication errors?

  • • Run openmm-exchange list to check configured exchanges
  • • Use openmm-exchange add mexc to re-enter credentials
  • • Check that API trading permissions are enabled on the exchange

Still having issues?

Open an issue on GitHub or reach out on X/Twitter

Config File Paths

The setup wizard writes to these files. Useful for manual editing or debugging:

ClientConfig File Path
Cursor~/.cursor/mcp.json
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%/Claude/claude_desktop_config.json
Claude Code~/.claude/settings.json
Windsurf~/.codeium/windsurf/mcp_config.json
OpenClaw~/.claude/settings.json (same as Claude Code)

Ready to Trade

Your agent now has access to 30+ trading tools across 4+ exchanges