PUBLIC LAUNCH · 1 DEC 2026

Docs · MCP usage

DOCS · MCP

MCP usage

The SDK ships an stdio MCP server built on the official @modelcontextprotocol/sdk. Any agent can read public Hyperliquid data, simulate against a supplied book and check receipts. It is keyless and has no order tool.

The 12 tools

Registered tool names, in list order:

ToolWhat it does
marketsList perpetual markets from the public info endpoint.
order_bookRead a capped order book and its data age.
fundingRead funding, mark and open interest for one coin.
positionsRead positions for one address.
feesRead the address fee rates and their data age.
simulateSimulate a closed-bar decision on a supplied book. Result is SIMULATED.
funding_extremesZ-score of the public hourly funding rate against a trailing window.
book_imbalanceBid depth divided by ask depth inside a public-book band.
get_limitsRead the owner limits and the remaining headroom.
trigger_kill_switchLatch the kill switch. A tool call cannot clear it.
get_cost_breakdownRecompute the execution-cost breakdown from a simulation receipt. Result is SIMULATED.
verify_receiptCheck a simulation receipt against its manifest and inputs bytes: verified and reproducible.

submit_order and any other order tool is refused.

Connect a client

Run cd ts/mcp-server && npm ci once in your clone (Node 22.6 or newer). Then add this block, with the absolute path to your clone:

Claude Desktop

{
  "mcpServers": {
    "perpbrain": {
      "command": "node",
      "args": ["/absolute/path/to/perpbrain-sdk/bin/perpbrain-mcp.mjs"],
      "env": {
        "PERPBRAIN_HL_NETWORK": "mainnet"
      }
    }
  }
}

Cursor

In Cursor Settings → MCP, add a server with the same shape (stdio, no secrets).

A first prompt flow

  1. Call get_limits and note the headroom.
  2. Call simulate on a supplied book. The result is labelled SIMULATED.
  3. Call get_cost_breakdown on the receipt for fees, slippage and funding.
  4. Call verify_receipt. A match reports VERIFIED.

The offline version of this flow is node --experimental-strip-types examples/mcp-fixtures.ts.

Agent-first, owner-controlledThe agent reads, simulates and checks. Only you set limits, and only you clear a kill switch. Limits you set; losses are still possible.