hyperliquid-mcp

by erscoder

Not rated
GitHub

About

Control your Hyperliquid perps from Claude (or any MCP client) using natural language.

Details

Author
erscoder
Categories
Productivity, Other

Setup

Install hyperliquid-mcp in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/erscoder/hyperliquid-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Control your Hyperliquid perps from Claude (or any MCP client) using natural language.

"What's my BTC PnL?"→ Claude fetches your positions and answers in seconds.
"Buy 0.1 ETH at market"→ Claude places the order via Hyperliquid API.

Built with theModel Context Protocol— the open standard for connecting AI to external tools.

Open~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows) and add:

Read-only mode(positions, prices, history — no private key needed):

{ "mcpServers": { "hyperliquid": { "command": "uvx", "args": ["hyperliquid-mcp"], "env": { "HL_WALLET_ADDRESS": "0xYourWalletAddressHere" } } } }

Trading mode(place orders, cancel, close positions):

{ "mcpServers": { "hyperliquid": { "command": "uvx", "args": ["hyperliquid-mcp"], "env": { "HL_PRIVATE_KEY": "0xYourPrivateKeyHere" } } } }

⚠️Never share your private key.It stays on your machine — this server runs locally via stdio, no data is sent anywhere except Hyperliquid's official API.

3. Restart Claude Desktop and start chatting

What are my open positions? What's the ETH funding rate this week? Place a limit order to buy 0.5 SOL at $150
git clone https://github.com/erscoder/hyperliquid-mcp cd hyperliquid-mcp pip install -e . cp .env.example .env # Edit .env with your wallet address or private key
{ "mcpServers": { "hyperliquid": { "command": "python", "args": ["-m", "hyperliquid_mcp"], "cwd": "/path/to/hyperliquid-mcp", "env": { "HL_WALLET_ADDRESS": "0xYourWalletAddressHere" } } } }

- Your keys never leave your machine.The server runs locally via stdio transport.
- Read-only by default.Set onlyHL_WALLET_ADDRESSif you don't want trading enabled.
- Trading requiresHL_PRIVATE_KEY.Without it, all trading tools return an error.
- Use adedicated trading walletwith limited funds for extra safety.

MCP is not just for chat clients. Use hyperliquid-mcp as the trading layer inside any autonomous agent.

from langchain_mcp_adapters.client import MultiServerMCPClient client = MultiServerMCPClient({ "hyperliquid": { "command": "uvx", "args": ["hyperliquid-mcp"], "transport": "stdio", "env": {"HL_WALLET_ADDRESS": "0xYourWallet"} } }) tools = await client.get_tools() # tools now includes hl_get_user_state, hl_get_orderbook, etc. # Pass them to any LangChain agent or LangGraph node
from crewai import Agent from crewai_tools import MCPTool hl_tools = MCPTool.from_server( command="uvx", args=["hyperliquid-mcp"], env={"HL_WALLET_ADDRESS": "0xYourWallet"} ) trader = Agent( role="Trading Analyst", goal="Monitor Hyperliquid positions and funding rates", tools=hl_tools )
from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client server_params = StdioServerParameters( command="uvx", args=["hyperliquid-mcp"], env={"HL_WALLET_ADDRESS": "0xYourWallet"} ) async with stdio_client(server_params) as (read, write): async with ClientSession(read, write) as session: await session.initialize() result = await session.call_tool("hl_get_user_state", {}) print(result.content)

- Portfolio monitor that alerts when funding rates spike above threshold
- Risk manager that auto-closes positions when drawdown exceeds limit
- Arbitrage scanner comparing funding across assets
- Morning briefing agent that summarizes overnight PnL and open positions

- Claude Desktop— see Quick Start above
- VS Code(Copilot) — add to.vscode/mcp.json
- Cursor— add to MCP settings
- Continue.dev— add to config

MIT — free to use, fork, and contribute.

If this saved you time, a ⭐ goes a long way!

Manage Uniswap and Aerodrome liquidity positions with automated rebalancing and leverage.

Provides structured access to Aster DEX market data, including candlesticks, order books, trades, and funding rates.

Interact with the Borrow Automated Market Maker (BAMM) protocol on the Fraxtal blockchain.

Baozi bet MCP server to allow agents create their own prediction markets

Risk Intelligence MCP Server for crypto agents — 52 tools, 72B AI model, 560+ signals, derivatives, on-chain, autonomous trading

On-chain automated trading strategies (DEX) for AI agents. Create limit orders, range orders, recurring buy-low-sell-high strategies, and concentrated liquidity positions across Ethereum, Sei, Celo, TAC, and COTI. Unlike traditional AMMs and liquidity pools, Carbon lets you set asymmetric price ranges - your buy and sell orders are independent, not mirrored. Backtest any strategy against historical prices before going on-chain, explore market liquidity, find discount entry points, and swap tokens against Carbon DeFi's maker liquidity. 25 tools. Returns unsigned transactions — agents never hold funds or private keys. Zero gas on fills.

Cross-chain cryptocurrency swaps via Chainflip. Get quotes, execute swaps, and track progress.

Crypto data & trading MCP with 42+ tools: prices, DeFi, NFTs, Solana swaps

About An MCP server that gives AI agents direct access to Polymarket Crypto prediction markets, enriched with live spot prices. Discover markets, analyze order books, paper trade strategies, track activity, and execute live trades.

Pool data, swap rates, and liquidity info on Curve Finance.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.