From hyperliquid-trading-agent
Help the user get the MCP server running. Two scopes — bootstrap (install uv + create the workspace .env so the plugin can auto-spawn the server) and configure (set runtime settings via update_settings). Use when the user says "set me up", "configure", "I just installed this", or runs /hta-setup.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hyperliquid-trading-agent:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The plugin **auto-spawns the MCP server as a local stdio subprocess** via `uvx` (declared in `plugin.json`), installing it straight from git — `uvx --from git+https://github.com/rsantamaria01/[email protected] hyperliquid-trading-mcp`. There is no server to host, no port, no auth token, no registry account. The server reads its wallet keys and per-workspace settings from the **work...
The plugin auto-spawns the MCP server as a local stdio subprocess via uvx (declared in plugin.json), installing it straight from git — uvx --from git+https://github.com/rsantamaria01/[email protected] hyperliquid-trading-mcp. There is no server to host, no port, no auth token, no registry account. The server reads its wallet keys and per-workspace settings from the workspace directory (CLAUDE_PROJECT_DIR — the folder Claude is open in). This plugin holds nothing sensitive.
Prerequisites for the auto-spawn to work:
uv is installed and uvx is on PATH (the Claude Code CLI sets this up for spawned servers).git is installed (uvx clones the server repo on first run)..env with the two wallet vars exists in the folder Claude runs in.Client support: the Claude Code CLI is the supported client — it sets CLAUDE_PROJECT_DIR and has uvx on PATH for spawned stdio servers. GUI clients (e.g. Cowork) may not put uvx/npx on the GUI app's PATH or set CLAUDE_PROJECT_DIR; that path is untested. If a GUI client can't launch the server, point it at an absolute path ($(which uvx)) or set PATH in the server's env block.
Try trading_mode(). If it succeeds, the server is up — skip to step 3.
uv isn't installed, uvx isn't on PATH, or the package can't resolve. Walk the user through bootstrap (step 2).Tell the user, in this order:
uv (provides uvx), then restart the client so it picks up PATH:
curl -LsSf https://astral.sh/uv/install.sh | sh
.env in the folder they open Claude in. The agent wallet must be created on Hyperliquid first (app.hyperliquid.xyz → Settings → API Wallets):
# .env (in the workspace root)
HYPERLIQUID_PRIVATE_KEY=0x... # agent wallet key (signer only, no funds)
HYPERLIQUID_VAULT_ADDRESS=0x... # main wallet address (the funded one)
chmod 600 .env
printf '.env\n.hl-mcp/\nlog.jsonl\n' >> .gitignore
(log.jsonl is the trade-loop event log — financial data, written in the workspace root.)uvx clones and builds hyperliquid-trading-mcp from git on first run (may take a few seconds). The server writes a startup banner to stderr:
hyperliquid-trading-mcp [DRY-RUN] — workspace: /path/to/workspace
[LIVE] there means real orders for this workspace.Refuse to accept the private key in chat. If the user starts pasting keys: stop them, tell them to put it in the .env file on disk, not in this conversation.
After they confirm uv is installed and .env exists, run trading_mode() again to verify.
Once the server is reachable, call get_settings() and show what the runtime config looks like. Highlight:
live_trading — should be false (dry-run) on first runnetwork — usually mainnetmax_position_pct, max_leverage, max_total_exposure_pctSettings persist per workspace in .hl-mcp/settings.json, so live_trading is scoped to this folder. Suggest: "When you're ready to trade for real, say 'go live' (I'll use update_settings to flip live_trading: true). To use testnet first, say 'switch to testnet'."
Run trading_mode() and report:
If signer doesn't decode, their HYPERLIQUID_PRIVATE_KEY is malformed. Tell them to recheck the .env file.
Suggest one: "Try /hta-positions to see your account, or /hta-analyze BTC for a market read."
.env the server reads./hta-settings, not via env files. Refer the user there if they want to adjust anything..env file..env on disk.trade-cycle's GO/NO gate still guards the first live order.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub rsantamaria01/hyperliquid-trading-agent --plugin hyperliquid-trading-agent