Hyperliquid Trader Mcp
@patricleehua
About Hyperliquid Trader Mcp
一个封装了hyperliquid交易的mcp工具,可以给模型对hyperliquid进行交易
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"Q2h0Fx49bWV0wT0hzIvcA": {
"name": "hp交易",
"type": "streamableHttp",
"description": "",
"isActive": true,
"url": "http://0.0.0.0:9000/mcp",
"installSource": "unknown"
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Hyperliquid Trader Mcp?
A trading toolchain built on the Model Context Protocol (MCP). It wraps commonly used Hyperliquid Python SDK endpoints and exposes them as MCP tools for placing orders, fetching prices, and managing positions/balances on the Hyperliquid DEX.
How to use Hyperliquid Trader Mcp?
Install uv, create a virtual environment, sync dependencies, copy .env.example to .env, and fill in HL_ACCOUNT_ADDRESS, HL_SECRET_KEY, and HL_NETWORK. Run the server with uv run --env-file .env python -m app.mcp_server; optionally specify --transport streamable-http or --transport sse for HTTP/SSE hosting.
Key features of Hyperliquid Trader Mcp
- Fetch latest mark price for any symbol.
- Place perpetual market or limit orders (buy/sell).
- Cancel orders by ID.
- Retrieve current positions for perpetual or spot.
- Check balances and margin summaries.
- Switch between testnet and mainnet via
HL_NETWORK.
Use cases of Hyperliquid Trader Mcp
- Automating trade execution from an AI assistant.
- Monitoring positions and balances programmatically.
- Backtesting strategies on testnet before going live.
- Integrating Hyperliquid trading commands into custom MCP hosts.
FAQ from Hyperliquid Trader Mcp
What credentials are required?
You need a Hyperliquid API wallet address (HL_ACCOUNT_ADDRESS) and its private key (HL_SECRET_KEY). Use a wallet with trading-only permissions and never commit real keys.
How do I switch between testnet and mainnet?
Set the HL_NETWORK environment variable to testnet or mainnet. Ensure the account address and secret key match the chosen network.
Are spot orders supported?
Spot market and limit order tools exist (place_spot_market, place_spot_limit) but are not yet implemented in the current Hyperliquid SDK; calling them raises NotImplementedError.
What transport options are available?
The server defaults to stdin/stdout. For HTTP/remote access, use --transport streamable-http (default port 8000) or --transport sse (mounts at /sse). Environment variables MCP_TRANSPORT, FASTMCP_HOST, and FASTMCP_PORT are also supported.
How should I handle rate limits or timeouts?
Add retry or rate‑limit logic inside HLClient. Always test on testnet first before switching to mainnet.
Frequently asked questions
What credentials are required?
You need a Hyperliquid API wallet address (`HL_ACCOUNT_ADDRESS`) and its private key (`HL_SECRET_KEY`). Use a wallet with trading-only permissions and never commit real keys.
How do I switch between testnet and mainnet?
Set the `HL_NETWORK` environment variable to `testnet` or `mainnet`. Ensure the account address and secret key match the chosen network.
Are spot orders supported?
Spot market and limit order tools exist (`place_spot_market`, `place_spot_limit`) but are not yet implemented in the current Hyperliquid SDK; calling them raises `NotImplementedError`.
What transport options are available?
The server defaults to stdin/stdout. For HTTP/remote access, use `--transport streamable-http` (default port 8000) or `--transport sse` (mounts at `/sse`). Environment variables `MCP_TRANSPORT`, `FASTMCP_HOST`, and `FASTMCP_PORT` are also supported.
How should I handle rate limits or timeouts?
Add retry or rate‑limit logic inside `HLClient`. Always test on testnet first before switching to mainnet.
Basic information
More Other MCP servers
ghidraMCP
LaurieWiredMCP Server for Ghidra
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
Awesome Mlops
visengerA curated list of references for MLOps
ICSS
chokcoco不止于 CSS
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Comments