Hyperliquid MCP Server
Click on "Install 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 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) |
🚀 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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/samklein952-hub/hyperliquid-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server