Claude × Hyperliquid

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.

What Claude is — and isn't — good at

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.

Claude as autonomous bot

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.

With Keel

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 as code generator

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.

With Keel

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.

Claude as strategy copilot via MCP

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.

With Keel

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.

Capabilities

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.

Install + first prompt

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.

Step 1

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.

$ pipx install keel-trade
$ claude mcp add keel -- keel mcp serve
# In Claude Code, say: "Connect to Keel"
Step 2

First prompt

Prompts that Claude turns into real backtest runs. Each one cashes out to MCP tool calls against the Keel engine.

# "Build a funding-carry strategy on Hyperliquid
# and backtest 2024-08 to 2026-04"
# "Search the component library for
# momentum signals"
# "Compose a multi-signal momentum + carry
# mix on the top 30 perps"
# "Fork that strategy with ROC 14
# and compare Sharpe"
Step 3

What the agent calls

The MCP server exposes a typed tool surface that mirrors the keel CLI. Claude calls each tool by name.

# keel_status
# keel_auth_login
# keel_components_search
# keel_components_compose_help
# keel_strategy_compose
# keel_strategy_fork
# keel_strategy_get
# keel_strategy_diff
# keel_backtest_run
# keel_backtest_summarize
# keel_share_create
# keel_audit_list_last
Sample backtest — composed by Claude

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.

Featured · Composed by Claude · regime-gated · vol-targeted

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).

Total return
+79.6%
Sharpe
2.17
Max drawdown
-9.7%
Win rate
48.7%

Verified Keel backtest. Past performance is not indicative of future returns.

Approaches compared

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.

FeatureClaude + Keel MCPClaude generating Python scriptsClaude calling HL REST directlyAutonomous wallet bots (e.g. Senpi, Katoshi)
Deterministic executionYes — compiled strategy runs without agent in loopDepends on script qualityDepends on promptAgent in loop — non-deterministic
Real backtest before deployingYes — Hyperliquid-native engineDIYNoUsually no
Funding-aware P&LYes — decomposed price vs carryDIYNoOften ignored
Backtest-to-live parityYes — same compiled artifactNo — script ≠ enginen/a (no engine)n/a
Typed component library182 components
Risk of LLM hallucination at runtimeNone — agent off-line after composeWhatever Claude wrotePer callContinuous
Setuppipx install keel-tradeManualManualConnect 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.

FAQ

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.

What will you build?

Live on Hyperliquid in minutes.

Get started
Non-custodial
Your keys never leave your wallet. Your strategies run on your account — Keel never holds funds.
Same code, backtest to live
The strategy that passed your backtest is the strategy that trades. Same pipeline, no surprises.
Full visibility
See every position, trade, and decision in real time. Pause anytime. Your account, your control.