Hyperliquid MCP Server

Hyperliquid MCP Server

MCP server for Hyperliquid perpetual DEX with 48 tools for trading, monitoring, risk management, and security. Enables real-time market data, order management, risk validation, and automated trading strategies.

Category
Visit Server

README

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

Quick Start

1. Install

git clone https://github.com/samimiair/hyperliquid-mcp.git
cd hyperliquid-mcp
pip install -r requirements.txt

2. Configure

cp .env.example .env
# Edit .env with your wallet details:
#   HYPERLIQUID_PRIVATE_KEY=your_64_char_hex_key
#   HYPERLIQUID_ACCOUNT_ADDRESS=0xYourWalletAddress

3. Run

./run.sh

Or 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 120

Environment Variables

Variable Required Description
HYPERLIQUID_PRIVATE_KEY āœ… Your wallet private key (64 hex chars)
HYPERLIQUID_ACCOUNT_ADDRESS āœ… Your wallet address (0x...)
HYPERLIQUID_API_WALLET āŒ API wallet for Agent Mode
HYPERLIQUID_TESTNET āŒ Set to "true" for testnet (default: mainnet)

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   # Dependencies

Security

  • Never commit your .env file — it's in .gitignore
  • All secrets are read from environment variables
  • The run.sh script validates required env vars before starting
  • Use API Wallet / Agent Mode to limit trading permissions
  • Emergency stop tool (emergency_stop) closes all positions instantly

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured