Hyperliquid MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hyperliquid MCP Server Show me my open positions and unrealized PnL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ฎ Hyperliquid MCP Server
The first MCP server for DeFi perpetual futures trading. Let AI agents trade on Hyperliquid โ the #1 decentralized derivatives exchange ($50B+ weekly volume).
Trade perps, check positions, manage risk โ all through natural language via Claude, GPT, or any MCP-compatible AI agent.
โก Features
Tool | Description |
| Wallet balance, margin, withdrawable funds |
| All available perpetual futures markets |
| Price, funding rate, OI, 24h volume |
| Live orderbook with configurable depth |
| All pending orders |
| Open positions with PnL & liquidation price |
| Limit or market orders |
| Cancel by order ID |
| Set leverage (cross or isolated) |
| Close positions (market or limit) |
Related MCP server: hyperliquid-mcp
๐ Quick Start
1. Install
pip install -e .Or install dependencies directly:
pip install "mcp[server]" hyperliquid-python-sdk python-dotenv2. Configure
cp .env.example .envEdit .env:
HYPERLIQUID_PRIVATE_KEY=your_private_key_here
HYPERLIQUID_WALLET_ADDRESS=0xYourAddress
HYPERLIQUID_TESTNET=trueโ ๏ธ Start with testnet! Set
HYPERLIQUID_TESTNET=truefor paper trading.
3. Run
hyperliquid-mcp
# or
python -m hyperliquid_mcp.server๐ค Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"hyperliquid": {
"command": "python",
"args": ["-m", "hyperliquid_mcp.server"],
"cwd": "/path/to/hyperliquid-mcp",
"env": {
"HYPERLIQUID_PRIVATE_KEY": "your_key",
"HYPERLIQUID_WALLET_ADDRESS": "0xYourAddress",
"HYPERLIQUID_TESTNET": "true"
}
}
}
}Or if installed via pip:
{
"mcpServers": {
"hyperliquid": {
"command": "hyperliquid-mcp",
"env": {
"HYPERLIQUID_PRIVATE_KEY": "your_key",
"HYPERLIQUID_WALLET_ADDRESS": "0xYourAddress",
"HYPERLIQUID_TESTNET": "true"
}
}
}
}๐ฌ Example Prompts
Once connected, try asking your AI agent:
"What's the current BTC funding rate on Hyperliquid?"
"Show me the ETH orderbook, top 5 levels"
"Set leverage to 5x on SOL and buy 10 SOL at market"
"What are my open positions and total PnL?"
"Close my ETH position at market price"
"List all available markets and their max leverage"
๐ Security
Never commit your
.envfile โ it contains your private keyStart with testnet โ always test with paper money first
Review orders before confirming โ AI agents can make mistakes
Private keys are only used locally โ never transmitted except to Hyperliquid's API
๐ Requirements
Python 3.10+
A Hyperliquid wallet (testnet or mainnet)
An MCP-compatible client (Claude Desktop, etc.)
License
MIT
Available Tools
10 toolscancel_orderB
Cancel an open order by order ID
Inputs: symbol (required), order_id (required).
close_positionB
Close an open position (market close or limit close)
Inputs: symbol (required), price.
get_account_infoA
Get wallet balance, margin summary, and withdrawable funds
Inputs: no named parameters.
get_market_infoB
Get current price, funding rate, open interest, and 24h volume for a perpetual market
Inputs: symbol (required).
get_open_ordersB
List all open orders for the connected wallet
Inputs: no named parameters.
get_orderbookB
Get the orderbook (bids and asks) for a perpetual market
Inputs: symbol (required), depth.
get_positionsA
List all open positions with unrealized PnL, leverage, and liquidation price
Inputs: no named parameters.
list_marketsA
List all available perpetual futures markets on Hyperliquid
Inputs: no named parameters.
place_orderC
Place a limit or market order on Hyperliquid perps
Inputs: symbol (required), side (required), size (required), price, +2 more.
set_leverageC
Set leverage for a perpetual market
Inputs: symbol (required), leverage (required), is_cross.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose in the trading lifecycle. Orders (place, cancel, get_open) are cleanly separated from positions (get, close), and market data tools (list_markets, get_market_info, get_orderbook) serve different information needs without overlap.
Excellent consistency throughout. All tools use snake_case with clear verb_noun or get_noun patterns (e.g., place_order, get_account_info, list_markets). The verb choices (place, cancel, close, get, list, set) are precise and predictable.
Ten tools is a reasonable scope for active trading operations, covering account, market data, orders, and positions. While the count is appropriate, a comprehensive trading surface might additionally include order history or modification tools, making it slightly lean.
Covers the core trading lifecycle well (account balance, market data, order management, position closing). Minor gaps include order history/fills, the ability to modify existing orders, and funding rate historyโthough agents can work around these by canceling/replacing orders and using current market data.
Maintenance
Related MCP Connectors
Build, backtest and paper-run Hyperliquid strategies from your AI assistant.
AI research desk for Hyperliquid: ranked opportunities and trade theses. You confirm every trade.
Trade Hyperliquid perps, stocks, gold, oil and pre-IPO from AI agents. Hosted; keys can't withdraw.
Trade Hyperliquid perpetual futures from your Ask Gina wallet. Moves real funds.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables interaction with the Hyperliquid DEX for retrieving market data, managing positions, and executing trades. Supports both testnet and mainnet operations with comprehensive trading tools including order placement, cancellation, and portfolio management.11MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely trade on Hyperliquid perpetual exchange, including order placement, position management, market data retrieval, and vault operations via natural language.23 PyPI24MIT
- AlicenseBqualityDmaintenanceIntegrates with Hyperliquid DEX to enable trading, account management, and market data queries through natural language.1220 npm3MIT
- AlicenseAqualityDmaintenanceEnables natural language control of Hyperliquid perpetual futures, including querying positions, prices, orderbook, and executing trades like market and limit orders, all from MCP-compatible clients.13MIT