LabscoMCP early access ↗
erscoderMCP SERVER

Hyperliquid MCP

Read Hyperliquid positions and the book with a wallet address alone — add a private key and it trades.

by erscoder ↗Trading Execution & BrokerageCommunity

LABSCO SUMMARY

Read-only is a real mode here, not a promise in a prompt.

Set the wallet address and the trading tools cannot work, whatever the model decides to try; the private key is what turns them on. Once it is on, this executes rather than advises — placing an order, cancelling everything and closing a position are each one call.

What it is

A Hyperliquid client with seventeen tools: mid prices, the order book, candles and funding; your positions, open orders and fills; and orders placed and cancelled, positions closed and leverage set. Two configurations, and the difference matters — a wallet address alone is read-only, and the trading tools return an error until a private key is present.

What you get

  • Limit and market orders placed, one order cancelled, or every open order cancelled with an optional coin filter — hl_place_order, hl_cancel_order, hl_cancel_all_orders
  • A whole position closed in one call, and leverage set cross or isolated — hl_close_position, hl_set_leverage
  • Market data deep enough to trade on — mid prices for every asset, the L2 book, OHLCV candles from 1m to 1d, and each market's leverage and tick size — hl_get_all_mids, hl_get_orderbook, hl_get_candles, hl_get_meta
  • Funding history, predicted next-8h funding across venues, and mark, oracle, open interest and 24h change for BTC, ETH, XRP and SOL — hl_get_funding_history, hl_get_predicted_fundings, hl_get_asset_contexts
  • Positions, equity, margin and PnL, and the open orders against them — hl_get_user_state, hl_get_open_orders
  • Trade history, or the fills for one coin with win rate and PnL, plus the live tape with its buy/sell imbalance — hl_get_fills, hl_get_user_fills_by_coin, hl_get_recent_trades

Requirements

Python and a clone of this repository, installed with pip install -e . from inside it. For reading only, set HL_WALLET_ADDRESS and nothing else. Trading needs HL_PRIVATE_KEY, which stays on your machine — the server runs locally over stdio and talks only to Hyperliquid's API. With the key present, an order placed is a live order, so the project's own advice is a dedicated trading wallet with limited funds.

Setup effort

Build from source — git clone https://github.com/erscoder/hyperliquid-mcp