Hyperliquid MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/YOUR_USERNAME/hyperliquid-mcp
cd hyperliquid-mcp
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "HL_WALLET_ADDRESS=${HL_WALLET_ADDRESS}" -e "HL_PRIVATE_KEY=${HL_PRIVATE_KEY}" hyperliquid-mcp -- python "<FULL_PATH_TO_HYPERLIQUID_MCP>/dist/index.js"

Replace <FULL_PATH_TO_HYPERLIQUID_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:HL_WALLET_ADDRESSHL_PRIVATE_KEY+ 2 optional
README.md

Trade perps, check positions, and manage risk via natural language

πŸš€ Hyperliquid MCP Server

The first MCP server for Hyperliquid β€” trade perps, check positions, and manage risk via natural language in Claude, ChatGPT, or any MCP-compatible AI agent.


⚑ What You Can Do

Ask Claude in plain English:

"What's my Hyperliquid portfolio worth?" "Show me my open positions and unrealized PnL" "What's the order book for ETH perp right now?" "Which perps have negative funding I can take advantage of?" "How far am I from liquidation on my BTC long?" "Paper trade: buy 0.1 ETH at market" "Set a stop-loss on my SOL position at $120"


πŸ› οΈ Tools

Tool Description
get_portfolio_value Account balance, equity, margin, unrealized PnL
get_positions All open perp positions with PnL and leverage
get_orderbook Live bid/ask for any market
get_funding_rates Current + predicted funding across all perps
get_liquidation_price Distance from liquidation for each position
place_order Market or limit order (paper trading by default)
cancel_order Cancel one or all open orders
set_stop_loss Set a reduce-only stop-loss trigger

πŸš€ Quick Start

1. Clone + Install

git clone https://github.com/YOUR_USERNAME/hyperliquid-mcp
cd hyperliquid-mcp
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

2. Configure

cp .env.example .env
# Edit .env with your wallet address
# Leave PAPER_TRADING=true until you're ready for live trading

3. Connect to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "hyperliquid": {
      "command": "python",
      "args": ["/absolute/path/to/hyperliquid-mcp/server.py"],
      "env": {
        "HL_WALLET_ADDRESS": "0xYOUR_WALLET_ADDRESS",
        "HL_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY",
        "HL_TESTNET": "true",
        "PAPER_TRADING": "true"
      }
    }
  }
}

Restart Claude Desktop. You'll see πŸ”¨ tools available in the input bar.


⚠️ Safety

PAPER_TRADING=true by default. In paper trading mode, all orders are logged but NEVER submitted to Hyperliquid. Safe for testing.

To enable live trading:

  1. Set PAPER_TRADING=false
  2. Set HL_TESTNET=false for mainnet
  3. Make sure HL_PRIVATE_KEY is set
  4. Understand: real money is at risk

The server will always show [PAPER TRADING] or [TESTNET] in tool descriptions so you know which mode you're in.

Never commit your private key. .env is in .gitignore by default.


πŸ’° Monetization (for the managed version)

Tier Price Features
Open Source Free Self-hosted, all tools
Cloud Hosted $29/mo We host it, no setup, auto-updates
Pro Templates $97 one-time Strategy templates + backtesting prompts
Custom Bot $500–$2,000 Done-for-you custom trading agent

πŸ—ΊοΈ Roadmap

  • Historical trade data tool
  • Portfolio P&L over time
  • Multi-account support
  • Telegram bot integration
  • Strategy backtesting tool
  • Automated rebalancing agent

πŸ“„ License

MIT β€” use it, fork it, build on it.


Built by AgentReady β€” making businesses and markets AI-agent ready.

Tools (8)

get_portfolio_valueAccount balance, equity, margin, unrealized PnL
get_positionsAll open perp positions with PnL and leverage
get_orderbookLive bid/ask for any market
get_funding_ratesCurrent + predicted funding across all perps
get_liquidation_priceDistance from liquidation for each position
place_orderMarket or limit order (paper trading by default)
cancel_orderCancel one or all open orders
set_stop_lossSet a reduce-only stop-loss trigger

Environment Variables

HL_WALLET_ADDRESSrequiredYour Hyperliquid wallet address
HL_PRIVATE_KEYrequiredYour Hyperliquid private key
HL_TESTNETSet to true to use testnet
PAPER_TRADINGSet to true to enable paper trading mode

Configuration

claude_desktop_config.json
{"mcpServers": {"hyperliquid": {"command": "python", "args": ["/absolute/path/to/hyperliquid-mcp/server.py"], "env": {"HL_WALLET_ADDRESS": "0xYOUR_WALLET_ADDRESS", "HL_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY", "HL_TESTNET": "true", "PAPER_TRADING": "true"}}}}

Try it

β†’What's my Hyperliquid portfolio worth?
β†’Show me my open positions and unrealized PnL
β†’What's the order book for ETH perp right now?
β†’Paper trade: buy 0.1 ETH at market
β†’Set a stop-loss on my SOL position at $120

Frequently Asked Questions

What are the key features of Hyperliquid MCP Server?

Real-time market data fetching. Portfolio value and position tracking. Paper trading mode for safe testing. Automated order execution and management. Risk management tools including stop-loss and liquidation monitoring.

What can I use Hyperliquid MCP Server for?

Monitoring crypto portfolio performance via natural language. Testing trading strategies in a safe paper-trading environment. Quickly checking market data and funding rates for perpetuals. Managing open positions and stop-losses without manual UI interaction.

How do I install Hyperliquid MCP Server?

Install Hyperliquid MCP Server by running: git clone https://github.com/YOUR_USERNAME/hyperliquid-mcp && cd hyperliquid-mcp && python -m venv venv && source venv/bin/activate && pip install -r requirements.txt

What MCP clients work with Hyperliquid MCP Server?

Hyperliquid MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Hyperliquid MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare