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 ServerShow my current positions and P&L"
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 🚀
Model Context Protocol (MCP) server for Hyperliquid — 48 tools for trading, monitoring, risk management, and security on the Hyperliquid perpetual DEX.
Built on the official hyperliquid-python-sdk with production-grade error handling.
Features
📡 Tier 1 — Monitoring (15 tools)
Real-time user state, positions, balances
Open orders, trade history, funding history
Market data: mid prices, L2 order book, candlesticks
Sub-accounts, staking, fee structure
💹 Tier 2 — Trading (10 tools)
Limit, market, and trigger orders
Bracket orders (entry + TP + SL)
Position management: modify, close, leverage
Funding rate impact calculator
⚠️ Tier 3 — Risk Management (10 tools)
Order risk validation before execution
Liquidation price estimation
Margin health monitoring
Portfolio health check & simulation
Auto leverage adjustment
🔒 Tier 4 — Security (8 tools)
Wallet & configuration validation
Preflight checks before trading
API Wallet / Agent Mode setup
Trading limits, rate limiting
Audit trail & emergency stop
📊 Bonus Analytics (5 tools)
Position analysis with P&L and risk scoring
Performance metrics (win rate, Sharpe, drawdown)
Multi-coin comparison
Strategy backtesting (MA/RSI/Momentum)
Market sentiment analysis
Related MCP server: perp-cli
Quick Start
1. Install
git clone https://github.com/samimiair/hyperliquid-mcp.git
cd hyperliquid-mcp
pip install -r requirements.txt2. Configure
cp .env.example .env
# Edit .env with your wallet details:
# HYPERLIQUID_PRIVATE_KEY=your_64_char_hex_key
# HYPERLIQUID_ACCOUNT_ADDRESS=0xYourWalletAddress3. Run
./run.shOr run directly with Hermes:
hermes mcp add hyperliquid --command /path/to/hyperliquid-mcp/run.sh
hermes config set mcp_servers.hyperliquid.cwd /path/to/hyperliquid-mcp
hermes config set mcp_servers.hyperliquid.timeout 120Environment Variables
Variable | Required | Description |
| ✅ | Your wallet private key (64 hex chars) |
| ✅ | Your wallet address (0x...) |
| ❌ | API wallet for Agent Mode |
| ❌ | Set to |
Architecture
hyperliquid-mcp/
├── main.py # MCP server entry point (48 tools)
├── api_client.py # Hyperliquid API wrapper (SDK-based)
├── trading.py # Order placement & management
├── monitoring.py # Market data & state queries
├── risk_mgmt.py # Risk validation & simulation
├── security.py # Wallet & configuration checks
├── validators.py # Input validation
├── rate_limiter.py # API rate limiting
├── alert_manager.py # Error & alert handling
├── wallet.py # (Deprecated) Legacy wallet code
├── run.sh # Startup script with env validation
├── .env.example # Configuration template
└── requirements.txt # DependenciesSecurity
Never commit your
.envfile — it's in.gitignoreAll secrets are read from environment variables
The
run.shscript validates required env vars before startingUse API Wallet / Agent Mode to limit trading permissions
Emergency stop tool (
emergency_stop) closes all positions instantly
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Hyperliquid MCP server: query OHLCV, funding and positioning data in plain language with a free API key.
Research-only MCP server: your AI as a quant research desk. 90 tools, no trades, no brokers.
MCP server for Mudrex futures trading enabling AI agents to securely access data and risk tools.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Related MCP Servers
- AlicenseBqualityFmaintenanceAn MCP server implementation that integrates with Hyperliquid exchange, providing access to crypto market data including mid prices, historical candles, and L2 order books.311 npm44MIT
- AlicenseAqualityCmaintenanceMulti-DEX perpetual futures trading MCP server (Pacifica, Hyperliquid, Lighter). 18 tools for market data, trade execution with dry-run safety, funding rate arbitrage, and portfolio analytics.1823 npm36MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server for the Hyperliquid decentralized exchange, enabling AI assistants to perform trading operations, manage accounts, and retrieve market data.3MIT
- AlicenseBqualityCmaintenance基于FastMCP的HyperLiquid交易MCP服务器,为AI助手提供市价/限价订单、仓位管理、市场数据等工具,支持与HyperLiquid永续合约和现货交易平台交互。243MIT