Local MCP

Run the 6MM MCP server locally so AI clients can access market, account, and future trading tools while credentials remain on the user machine.
View as Markdown

Local MCP is the recommended setup when an AI client needs private account context or future controlled trading tools.

The MCP server runs on the user’s machine. The AI client calls local 6MM tools, and the local server communicates with 6MM APIs using credentials configured by the user.

What your AI client can do

With Local MCP, an AI client can use 6MM tools in a controlled way:

  • Fetch live and historical market data.
  • Read account balances, positions, open orders, fills, and funding records when read-only credentials are enabled.
  • Explain portfolio exposure, margin usage, and liquidation risk.
  • Preview orders before any real order is placed.
  • In later controlled-trading phases, create or cancel orders only after explicit permission and risk checks.

Use Local MCP when credentials should stay on the user’s machine.

Architecture

AI client
-> local 6mm-mcp process
-> 6MM REST / WebSocket API

Example configuration

1{
2 "mcpServers": {
3 "6mm": {
4 "command": "uvx",
5 "args": ["6mm-mcp"],
6 "env": {
7 "SIXMM_ENVIRONMENT": "testnet",
8 "SIXMM_API_KEY": "your_api_key",
9 "SIXMM_API_SECRET": "your_api_secret"
10 }
11 }
12 }
13}
TierToolsNotes
Public dataMarkets, ticker, orderbook, klines, trades, fundingNo private account access.
Account readBalances, positions, open orders, fillsRequires read-only API key scope.
Trading previewPreview order, margin impact, fee estimateDoes not place orders.
Controlled tradingCreate, cancel, amend ordersRequires explicit permission, confirmation, and risk controls.

First setup checklist

  1. Install the MCP package.
  2. Create or configure a read-only API key.
  3. Start in testnet.
  4. Add the MCP server to the AI client configuration.
  5. Ask the client to list available 6MM tools.
  6. Run a public market data query.
  7. Only then add account-read credentials if needed.

Example prompts

Use 6MM to list available perpetual markets.
Use 6MM testnet to check my open positions and explain liquidation risk.
Preview a small BTC long order on 6MM testnet and explain margin impact. Do not place the order.

Security notes

Local MCP should default to read-only and testnet. Trading tools should require preview, user confirmation, idempotency keys, notional limits, and service-side risk checks.