home / mcp / hyperliquid mcp server
🚀 MCP Server para Hyperliquid DEX - Trade com Claude usando linguagem natural. Desenvolvido por Caio Vicentino para as comunidades Yield Hacker, Renda Cripto e Cultura Builder
Configuration
View docs{
"mcpServers": {
"caiovicentino-hyperliquid-mcp-server": {
"command": "mcp",
"args": [
"dev",
"server.py"
],
"env": {
"LOG_LEVEL": "INFO",
"WS_TIMEOUT": "60",
"HTTP_TIMEOUT": "30",
"RATE_LIMIT_WEIGHT": "1200",
"HYPERLIQUID_WS_URL": "wss://api.hyperliquid.xyz/ws",
"HYPERLIQUID_API_URL": "https://api.hyperliquid.xyz",
"HYPERLIQUID_NETWORK": "mainnet",
"HYPERLIQUID_PRIVATE_KEY": "YOUR_PRIVATE_KEY_PLACEHOLDER",
"HYPERLIQUID_ACCOUNT_ADDRESS": "YOUR_ACCOUNT_ADDRESS_PLACEHOLDER"
}
}
}
}The Hyperliquid MCP Server is a Python-based MCP server that lets you connect Claude Desktop to the Hyperliquid decentralized exchange. You can trade with natural language, analyze markets in real time, automate strategies, and retain full control of your keys and funds through a secure MCP setup.
Set up the MCP server and run it locally to enable Claude Desktop to interact with Hyperliquid. You will issue natural-language requests to trade, monitor markets, and manage your positions, while the MCP layer translates those requests into authenticated actions against Hyperliquid.
Prerequisites you need before installing: Python 3.8+ installed on your system, Claude Desktop installed and configured, and a Hyperliquid account with API credentials. This guide uses the official installation flow demonstrated here.
1. Clone the MCP server repository and enter the directory.
git clone https://github.com/seu-usuario/hyperliquid-mcp-server.git
cd hyperliquid-mcp-server2. Run the automatic setup script to create a Python virtual environment, install dependencies, generate configuration, and guide credential setup.
python3 setup.py3. Edit the generated .env file to add your Hyperliquid credentials and network information.
HYPERLIQUID_PRIVATE_KEY=0x...
HYPERLIQUID_ACCOUNT_ADDRESS=0x...
HYPERLIQUID_NETWORK=mainnet4. Restart Claude Desktop to apply the MCP configuration you created during setup.
5. Verify the server is ready by asking Claude what Hyperliquid tools are available.
Optional manual path to start the MCP server is shown in the testing steps if you prefer manual control.
Configuration and credentials: The server relies on environment variables defined in a .env file to securely store your private key, account address, and network. Keep this file local and do not commit it to version control.
Security best practices: Use testnet for experimentation, rotate credentials periodically, and prefer isolated margin when trading high-risk strategies. Never expose your private key and consider hardware wallets for added security.
Starting the server from the MCP CLI during testing: you will use the MCP command to start the local server script in dev mode.
If you encounter issues, consult troubleshooting steps for common problems like authentication failures, rate limits, and WebSocket connectivity.
Place a limit or market order for a trading instrument.
Submit multiple orders in a single batch.
Cancel a specific order by ID.
Cancel all open orders for a symbol or account.
Modify the price or size of an existing order.
Place a TWAP order to execute a large amount over time.
Adjust leverage for cross or isolated margin.
Manage isolated margin for supported positions.
Configure automatic safety for inactive connections.
Retrieve the complete state of your account.
Fetch all open positions with PnL.
List all currently open orders.
Access trade history for the user.
Access historical order data.
Analyze the full value of the portfolio.
Manage subaccounts under the main account.
Check current API rate limit status.
Fetch mid prices for all trading pairs.
Retrieve real-time L2 order book data.
Get historical OHLCV candles for a symbol.
Fetch recent trades.
Get current funding rates for perpetuals.
Retrieve market context and statistics.
Subscribe to account-related events.
Subscribe to live market data.
Subscribe to updates for orders.
Manage active subscriptions.