Hyperliquid Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Hyperliquid Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that provides comprehensive tools for interacting with the Hyperliquid decentralized exchange. This server enables AI assistants to perform trading operations, manage accounts, and retrieve market data through a standardized interface.
# Run with stdio (default)
uvx hyperliquid-mcp
# Run with HTTP transport
uvx hyperliquid-mcp --transport http --port 3000
# Run with SSE transport
uvx hyperliquid-mcp --transport sse --port 3000uv add hyperliquid-mcp
uv run hyperliquid-mcppip install hyperliquid-mcp
hyperliquid-mcphyperliquid-mcp [OPTIONS]
Options:
--transport, -t {stdio,http,sse} Transport type (default: stdio)
--host HOST Host to bind to (default: localhost)
--port, -p PORT Port to listen on (default: 3000)
--log-level, -l {debug,info,warn,error} Log level (default: info)
--version, -v Show version and exitConfigure the following environment variables:
# Required for trading operations
export HYPERLIQUID_PRIVATE_KEY="your_private_key_here"
# Optional: Specify a different user address for queries (defaults to wallet address)
export HYPERLIQUID_USER_ADDRESS="0x1234567890123456789012345678901234567890"
# Optional: Use testnet instead of mainnet (default: false)
export HYPERLIQUID_TESTNET="true"
# Optional: Show detailed logs for debugging (default: false)
export HYPERLIQUID_MCP_SHOW_LOGS="false"⚠️ Security Warning: Never share your private key. The server will warn if the key is missing but will still start in read-only mode for market data.
#### Environment Variable Details
"true" to use Hyperliquid's testnet for development and testing"true" to enable detailed logging for debugging and developmentThe server supports querying data for different users:
HYPERLIQUID_PRIVATE_KEYHYPERLIQUID_USER_ADDRESS to query a different addressuser parameter to query specific addressesUse cases:
For development and testing, you can use Hyperliquid's testnet:
HYPERLIQUID_TESTNET=true💡 Tip: Always test your trading strategies on testnet before using real funds on mainnet.
Add to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"hyperliquid": {
"command": "uvx",
"args": ["--no-progress","hyperliquid-mcp"],
"env": {
"HYPERLIQUID_PRIVATE_KEY": "your_private_key_here",
"HYPERLIQUID_USER_ADDRESS": "0x1234567890123456789012345678901234567890",
"HYPERLIQUID_TESTNET": "false",
"HYPERLIQUID_MCP_SHOW_LOGS": "false"
},
"transport": "stdio"
}
}
}#### Using uv directly:
{
"mcpServers": {
"hyperliquid": {
"command": "uv",
"args": ["run", "--with", "hyperliquid-mcp", "hyperliquid-mcp"],
"env": {
"HYPERLIQUID_PRIVATE_KEY": "your_private_key_here",
"HYPERLIQUID_USER_ADDRESS": "0x1234567890123456789012345678901234567890",
"HYPERLIQUID_TESTNET": "false",
"HYPERLIQUID_MCP_SHOW_LOGS": "false"
},
"transport": "stdio"
}
}
}#### HTTP transport (for remote/multi-client setups):
⚠️ Note: Environment variables (HYPERLIQUID_PRIVATE_KEY, etc.) must be exported in the shell where the server is started — they are not passed via the client config like with stdio.# 1. Export env vars in your terminal
export HYPERLIQUID_PRIVATE_KEY="your_private_key_here"
export HYPERLIQUID_TESTNET="false"
# 2. Start the server
hyperliquid-mcp --transport http --port 3000Then configure your MCP client to connect:
{
"mcpServers": {
"hyperliquid": {
"url": "http://localhost:3000/mcp"
}
}
}#### Local development:
{
"mcpServers": {
"hyperliquid": {
"command": "uv",
"args": ["run", "hyperliquid-mcp"],
"cwd": "/path/to/hyperliquid-mcp",
"env": {
"HYPERLIQUID_PRIVATE_KEY": "your_private_key_here",
"HYPERLIQUID_USER_ADDRESS": "0x1234567890123456789012345678901234567890",
"HYPERLIQUID_TESTNET": "true",
"HYPERLIQUID_MCP_SHOW_LOGS": "true"
},
"transport": "stdio"
}
}
}#### get_positions Get current trading positions and margin information.
user (optional) - Ethereum address to query (defaults to HYPERLIQUID_USER_ADDRESS or wallet address)#### update_leverage Modify leverage settings for a specific asset.
asset, leverage (1-100), is_isolated (boolean)#### withdraw Withdraw USDC to an external wallet.
destination (Ethereum address), amount (minimum $1.01)#### get_spot_user_state Get spot trading account balances and state.
user (optional) - Ethereum address to query#### get_user_fees Get user's current fee structure and rates.
user (optional) - Ethereum address to query#### get_market_data Get current market data for a specific asset.
asset - Asset symbol (e.g., "BTC", "ETH")#### get_candle_data Get historical OHLCV candlestick data.
asset, interval (1m, 5m, 1h, 1d, etc.), start_time, end_time#### get_l2_orderbook Get Level 2 order book depth data.
asset, significant_figures (optional, 1-10)#### get_funding_rates Retrieve current and historical funding rates for perpetual contracts.
asset (optional), include_history (boolean), start_time (optional)#### calculate_min_order_size Calculate minimum order size for an asset to meet value requirements.
asset, min_value_usd (default: $10)#### place_order Place a new trading order on the exchange.
asset - Asset symbolis_buy - Order direction (boolean)size - Order quantityorder_type - "market", "limit", or "trigger"price - Order price (required for limit/trigger)time_in_force - "GTC", "IOC", or "ALO"reduce_only - Reduce-only flag (boolean)take_profit - Take profit price (optional)stop_loss - Stop loss price (optional)#### cancel_order Cancel an existing order.
asset, order_id#### modify_order Modify price, size, or time-in-force of an existing order.
asset, order_id, new_price (optional), new_size (optional), new_time_in_force (optional)#### get_open_orders Retrieve all currently open orders.
user (optional) - Ethereum address to query#### get_order_status Check the status of a specific order.
order_id, user (optional)#### bulk_cancel_orders Cancel multiple orders in a single request.
orders - List of orders with asset and order_id#### cancel_all_orders Cancel all open orders, optionally filtered by asset.
asset (optional) - Filter by specific asset#### get_user_fills Get recent trade executions (fills).
user (optional) - Ethereum address to query#### get_user_fills_by_time Get user's trade fills within a specific time range.
start_time, end_time (optional), user (optional)The project includes comprehensive tests covering all tools:
# Run all tests
make test
# Run with coverage
make test-cov
# Run specific test categories (use direct command for specific targets)
uv run pytest tests/test_server.py::TestAccountTools -v# Clone the repository
git clone https://github.com/midodimori/hyperliquid-mcp.git
cd hyperliquid-mcp
# Install with development dependencies
make install-dev
# Run tests
make test
# Format and lint code
make format
# Check code style and types
make lint
# Run the server locally
make run
# See all available commands
make helphyperliquid-mcp/
├── src/hyperliquid_mcp/
│ ├── __init__.py
│ ├── __main__.py # CLI entry point (argparse)
│ ├── server.py # Server factory (create_server)
│ ├── config.py # Pydantic configuration models
│ ├── models.py # Request/response models
│ ├── logging_config.py # Logging configuration
│ ├── capabilities/ # MCP tool registrations
│ │ ├── account.py # Account tools (5)
│ │ ├── market.py # Market data tools (5)
│ │ └── order.py # Order management tools (9)
│ ├── clients/ # Hyperliquid API clients
│ │ ├── base_client.py # Base client & connection
│ │ ├── account.py # Account operations
│ │ ├── market.py # Market data operations
│ │ └── order.py # Order operations
│ └── transports/ # Transport runners
│ ├── stdio.py # stdio transport (default)
│ ├── http.py # Streamable HTTP transport
│ └── sse.py # SSE transport
├── tests/
│ ├── test_server.py # Tool function tests
│ └── test_mcp_integration.py # MCP integration tests
├── pyproject.toml # Project configuration
└── README.mdSupported intervals: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 3d, 1w, 1M
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
This software is provided for educational and informational purposes only. Trading cryptocurrencies involves substantial risk and may result in significant financial losses. The authors are not responsible for any trading losses incurred through the use of this software. Always conduct your own research and consider consulting with a qualified financial advisor before making trading decisions.
For questions, issues, or contributions:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.