Harnesses

Connect your agent harness

Every supported harness speaks the Model Context Protocol. Add the multi MCP server once and your agent sees every perp venue at once — plus, with a key, routed trades, pair trades, and cross-chain funding.

Two transports work everywhere: local stdio (npx -y @multidex/mcp, reads your key from MULTI_API_KEY) and remote HTTP (https://multi-venym-labs.vercel.app/mcp, send your key in the Authorization header). Without a key, only public market-data tools are exposed.

New to MCP? Start with the MCP overview and the tool reference.

One-command install

@multidex/agent-kit writes (or merges) the multi MCP server into your harness's config file in one command — no hand-editing:

  1. 1
    Run init for your harness
    bash
    npx @multidex/agent-kit init claude-code --key multi_sk_live_...
    npx @multidex/agent-kit init cursor --key multi_sk_live_...
    
    # Flags:
    #   --remote     use the hosted HTTP endpoint instead of local stdio
    #   --readonly   register only read tools (sets MULTI_READONLY=1)
    #   --project    write the project-level config instead of the user-level one
    #   --dry-run    print the merged config without writing anything

    Supported harnesses: claude-code · claude-desktop · codex · opencode · cursor · windsurf · hermes · openclaw · gemini · generic (prints snippets).

  2. 2
    Verify the setup
    bash
    multi-agent doctor      # connectivity, key, and scope checks
    multi-agent tools       # tool catalog
    multi-agent harnesses   # list supported harnesses
Prefer to edit configs yourself? Every harness below documents the exact stdio and remote snippets the CLI would write.

Claude Code

Config file: .mcp.json (project) or ~/.claude.json (user) · official docs ↗

{
  "mcpServers": {
    "multi": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@multidex/mcp"],
      "env": { "MULTI_API_KEY": "multi_sk_live_..." }
    }
  }
}
Or run: claude mcp add multi --env MULTI_API_KEY=multi_sk_live_... -- npx -y @multidex/mcp. Verify with /mcp.

Codex CLI

Config file: ~/.codex/config.toml (or project .codex/config.toml) · official docs ↗

[mcp_servers.multi]
command = "npx"
args = ["-y", "@multidex/mcp"]

[mcp_servers.multi.env]
MULTI_API_KEY = "multi_sk_live_..."
Or run: codex mcp add multi --env MULTI_API_KEY=multi_sk_live_... -- npx -y @multidex/mcp. Verify with codex mcp list.

OpenCode

Config file: opencode.json (project) or ~/.config/opencode/opencode.json · official docs ↗

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "multi": {
      "type": "local",
      "command": ["npx", "-y", "@multidex/mcp"],
      "enabled": true,
      "environment": { "MULTI_API_KEY": "multi_sk_live_..." }
    }
  }
}

Hermes Agent

Config file: ~/.hermes/config.yaml · official docs ↗

mcp_servers:
  multi:
    command: "npx"
    args: ["-y", "@multidex/mcp"]
    env:
      MULTI_API_KEY: "multi_sk_live_..."
    enabled: true
    supports_parallel_tool_calls: true   # market reads only
Or run hermes mcp install and pick multi from the catalog.

OpenClaw

Config file: ~/.openclaw/openclaw.json · official docs ↗

{
  "mcp": {
    "servers": {
      "multi": {
        "command": "npx",
        "args": ["-y", "@multidex/mcp"],
        "env": { "MULTI_API_KEY": "multi_sk_live_..." }
      }
    }
  }
}

Cursor

Config file: ~/.cursor/mcp.json (or project .cursor/mcp.json) · official docs ↗

{
  "mcpServers": {
    "multi": {
      "command": "npx",
      "args": ["-y", "@multidex/mcp"],
      "env": { "MULTI_API_KEY": "multi_sk_live_..." }
    }
  }
}

Windsurf

Config file: ~/.codeium/windsurf/mcp_config.json · official docs ↗

{
  "mcpServers": {
    "multi": {
      "command": "npx",
      "args": ["-y", "@multidex/mcp"],
      "env": { "MULTI_API_KEY": "multi_sk_live_..." }
    }
  }
}

Gemini CLI

Config file: ~/.gemini/settings.json (or project .gemini/settings.json) · official docs ↗

{
  "mcpServers": {
    "multi": {
      "command": "npx",
      "args": ["-y", "@multidex/mcp"],
      "env": { "MULTI_API_KEY": "multi_sk_live_..." }
    }
  }
}

Tell your coding agent about multi

Drop this into your project's AGENTS.md or CLAUDE.md so an agent working in your repo knows the contract:

markdown
## multi (cross-platform perp DEX aggregator)
- MCP server `multi` is configured (tools: get_orderbook, get_candles, execute_order,
  open_pair_position, swap_quote, ...). Prefer MCP tools over raw HTTP.
- For code, use @multidex/sdk (TS) or the `multidex-sdk` pip package (Python).
- API base: https://multi-venym-labs.vercel.app/api. Public reads need no key; execution uses
  MULTI_API_KEY (scoped, risk-limited). Always pass an Idempotency-Key on retries.
- Docs: https://multi-venym-labs.vercel.app/docs · llms.txt: https://multi-venym-labs.vercel.app/llms.txt