Drive a real Hyperliquid backtest engine from Claude.
Keel lets Claude propose, compose, and backtest Hyperliquid trading strategies through a local MCP server. Claude doesn't trade your account — it builds the strategy with you. The compiled artifact runs deterministically against its schedule, with the same Hyperliquid execution path you backtested against.
Three framings for Claude on Hyperliquid. Only one survives contact with live.
Searches for Claude + crypto trading turn up two pitches: an autonomous wallet bot, or a one-off Python script. Keel does neither — Claude is your strategy copilot, and a deterministic engine runs the trades.
The assumption when people hear 'Claude trades Hyperliquid'. LLMs hallucinate, they can't run a deterministic backtest in their head, and they can't manage funding accrual or buffered rebalancing in a tight loop. Asking Claude 'what should I trade right now?' every 15 minutes is gambling, not systematic trading.
Claude stays in the strategy-development loop, not the execution loop. It proposes a thesis and composes the strategy; the compiled artifact runs against its schedule with no agent in the path.
Claude writes a one-off Python script that calls the Hyperliquid REST API. No engine underneath, no portfolio simulation, no funding model, no slippage, no parity to live. Every new strategy starts from a blank file and re-invents the same plumbing badly.
Claude composes against a typed component graph the engine knows how to validate, backtest, and deploy. The same compiled artifact runs in backtest and live — no translation layer where silent bugs hide.
How Keel positions it. Claude reads the typed component library, composes a strategy graph, calls a real Hyperliquid-native backtest, and returns a share URL. You review the numbers. You iterate with Claude. You deploy. The strategy runs without Claude in the loop.
Claude builds the strategy; the engine runs it. Real fees, real funding, real slippage, real Hyperliquid history. Bit-for-bit parity between backtest and live execution.
Under the hood
Structured strategy engine
Strategies are composable pipelines of typed components. The system validates every connection at edit time — errors caught before you backtest, not after you deploy.
AI built on the same system
AI doesn’t generate code — it composes from the same components you use. It understands valid connections, constraints, and trade-offs. Every strategy it builds is structurally valid.
Detailed backtest reports
Sharpe, Sortino, max drawdown, win rate, trade-by-trade logs. Compare runs side by side. Real fee and slippage modeling.
Version control for strategies
Every edit creates a new version. Compare any two versions side by side. Tag releases, restore previous versions, fork strategies. Your full history, always recoverable.
Auditable execution logs
Every live run is logged — what the strategy calculated, what orders executed, what filled. Full transparency.
Non-custodial by design
Your keys never touch our servers. Keel uses Hyperliquid’s native delegation. Sign once, revoke anytime.
Two commands, then talk to Claude.
Local stdio MCP server. No hosted endpoint to configure, no API key broker. Claude calls the same tools the keel CLI exposes.
Install for Claude Code
Two commands. The CLI installs from PyPI; the second command wires up the local stdio MCP server so Claude can call it.
First prompt
Prompts that Claude turns into real backtest runs. Each one cashes out to MCP tool calls against the Keel engine.
What the agent calls
The MCP server exposes a typed tool surface that mirrors the keel CLI. Claude calls each tool by name.
A real run, composed in a Claude Code session.
Claude composed this funding-carry strategy via the Keel MCP, ran the backtest against real Hyperliquid history, and returned the share URL. Reproduce the same prompt in your own session.
Funding-carry on Hyperliquid perps
Claude composed this funding-carry strategy via the Keel MCP, ran the backtest, and returned the share URL. Reproduce the same prompt in your own Claude Code session and verify the numbers end-to-end. Period: 2024-08-15 → 2026-04-30 (20 mo).
Verified Keel backtest. Past performance is not indicative of future returns.
Four ways people use Claude on Hyperliquid.
Honest comparison of the patterns Claude users actually try. The autonomous-agent column is for differentiation only — Keel is the second column, an MCP-driven strategy copilot, not a wallet-managing bot.
| Feature | Claude + Keel MCP | Claude generating Python scripts | Claude calling HL REST directly | Autonomous wallet bots (e.g. Senpi, Katoshi) |
|---|---|---|---|---|
| Deterministic execution | Yes — compiled strategy runs without agent in loop | Depends on script quality | Depends on prompt | Agent in loop — non-deterministic |
| Real backtest before deploying | Yes — Hyperliquid-native engine | DIY | No | Usually no |
| Funding-aware P&L | Yes — decomposed price vs carry | DIY | No | Often ignored |
| Backtest-to-live parity | Yes — same compiled artifact | No — script ≠ engine | n/a (no engine) | n/a |
| Typed component library | 182 components | — | — | — |
| Risk of LLM hallucination at runtime | None — agent off-line after compose | Whatever Claude wrote | Per call | Continuous |
| Setup | pipx install keel-trade | Manual | Manual | Connect wallet (custodial) |
Patterns observed from public docs and project READMEs as of 2026-05-20. “DIY” means the primitive exists but the user wires it up.
Common questions
Can Claude trade Hyperliquid for me automatically?
No. Claude is the strategy copilot — it helps you compose a typed strategy in the Keel DSL, runs a backtest against real Hyperliquid history, and returns results. Once you accept a strategy, the compiled artifact runs on its own schedule against the Hyperliquid execution path. Claude is not in the loop at execution time. That separation is the point: LLMs hallucinate, deterministic compiled strategies do not.
How do I connect Claude to Hyperliquid via Keel?
Two commands. pipx install keel-trade installs the keel CLI and local MCP server. claude mcp add keel -- keel mcp serve registers the stdio MCP with Claude Code. Then in a Claude Code session say "Connect to Keel" — Claude calls keel_status, prompts you through keel_auth_login if needed, and is ready to compose strategies. Full setup at /docs/getting-started.
What does Claude actually do with the MCP server?
It calls MCP tools by name. keel_components_search to find signals and regimes in the 182-component library. keel_components_compose_help to understand connection types. keel_strategy_compose to author the typed DSL. keel_backtest_run to run a real Hyperliquid backtest. keel_backtest_summarize for stats. keel_share_create returns a share URL you can review. keel_strategy_fork lets Claude iterate on a parameter change and compare.
Does this work with Claude Code, Claude Desktop, or both?
Claude Code is the primary target, along with Cursor, Windsurf, and Codex. Each has first-class agent-mode integration and the stdio MCP install pattern is documented per host at /docs/sdk/agent-setup. Claude Desktop also speaks the MCP stdio protocol but its agent-mode UX is less mature than Claude Code's; install works, the tool-calling experience is best in Code.
Does Claude need access to my Hyperliquid private key?
No. Auth between the MCP server and Keel is OAuth 2.1 + PKCE via keel auth login — the browser opens, you sign in to Keel, tokens land in your local keychain. For Hyperliquid execution, Keel uses Hyperliquid's native delegated signing: your wallet signs once to delegate, Keel never holds funds or root keys, and you can revoke any time. Non-custodial by design.
How is this different from telling Claude to write a Python trading script?
A throwaway script is not an engine. Claude-written Python that calls the HL REST API has no portfolio simulator, no buffered rebalancer, no funding accrual, no real fee schedule, no slippage model, no parity between backtest numbers and live execution. With the Keel MCP, Claude composes against a typed component graph the engine knows how to compile, validate, backtest, and deploy. The same artifact runs in both places. No translation layer.
Keep exploring
The Keel MCP server
Product page for the MCP. Install instructions, tool surface, demo, and the full feature list.
MCP × Hyperliquid
Sibling pillar — the MCP-on-Hyperliquid story without the Claude-specific framing. Compares to other HL MCP servers.
Hyperliquid backtesting (the engine)
The deterministic engine Claude drives. Real fees, funding, slippage. Funding-decomposed P&L. Bit-for-bit live parity.