Tutorial · Claude Code

Hyperliquid with Claude Code, step by step

Connect Claude Code to the Keel MCP server with one command and it gets 29 tools on Hyperliquid: compose a strategy in the Keel DSL, backtest it on real history, fork and compare versions — from the terminal, in the project you already have open.

Ask AI about Keel
Or set it up directly
Claude Code
Terminal
claude mcp add --transport http keel https://mcp.usekeel.io/mcp
  1. 1Run the command in your terminal
  2. 2Inside Claude Code run /mcp and choose Authenticate
  3. 3Sign in or sign up on the Keel page that opens (no account needed beforehand)

Sign in in the browser when asked. No API keys. /mcp → Authenticate

Check it worked

Two ways to tell, and either one settles it — a connection that is already live is not improved by signing in again.

In Claude Code Keel should be listed there with its sign-in recorded. If it is, you are connected — signing in again changes nothing.

Terminal
claude mcp list

Ask the agent keel_account_status answers with the Keel account the session is signed in as, which nothing but a live connection can return. If the agent says it has no Keel tools, the sign-in did not finish.

Prompt
Use keel_account_status and tell me which Keel account this session is signed in as.

Not yet verified against a Claude Code version. These steps follow Anthropic's own documentation, read on 2026-09-16.

Ask AI about Keel
Other ways to connect
Every client, step by step
The tutorial

Four steps from connect to a backtest you can read.

  1. Connect Claude Code

    Run the command in the box above, then type /mcp inside Claude Code and choose Authenticate. Your browser opens the Keel sign-in and the tools appear in the session. No API keys.

  2. Ask for a strategy

    Describe the thesis in plain language — a carry strategy on the top 30 perps, or momentum on 4-hour bars. Claude Code searches the 218 typed components and writes the strategy in the Keel DSL, validated as it goes.

  3. Backtest it

    Ask for a backtest over the range you care about. The engine runs Hyperliquid 15-minute bars and hourly carry with real fees and slippage, and Claude Code summarises Sharpe, drawdown and exposure in the terminal.

  4. Iterate, then review in the app

    Fork it, change a parameter, compare — one prompt each. The agent builds, tests and reads. When you want to run a strategy on your account, it hands it to the Keel app and you take it from there.

FAQ

Questions about Claude Code and Hyperliquid

Do I need the local install?

No. The one command above points Claude Code at the Keel MCP server; nothing runs on your machine. The keel-trade package is the other way in — a local MCP server and a CLI for file-based work — listed under Other ways to connect on the agents page.

What if the connect command fails?

Make sure Claude Code is current (older versions have no MCP support), then run /mcp and check that keel is listed. If the sign-in page did not open, run /mcp again and choose Authenticate.

Does Claude Code need to stay open?

Only while you are building. A backtest finishes on Keel's side and the result is saved to your account, so you can pick it up in a later session or in the Keel app.

Can I keep the strategy in git?

Yes. Ask Claude Code for the strategy source — a plain Keel DSL file — and commit it like any other code. Keel keeps every version too, so a diff between two versions is one tool call away.