Skip to main content
Glama
Keel — Hyperliquid trading strategies

Keel — Hyperliquid trading strategies

by keel-trade

What is Keel?

Keel is a quantitative crypto trading platform built around Hyperliquid — strategy development, backtesting, live execution, and portfolio management on the venue with the deepest on-chain perpetual order book. The full platform includes:

  • A web app for composing strategies, running backtests, and deploying live (app.usekeel.io)

  • A deterministic backtest engine with real Hyperliquid funding, price and slippage

  • Bit-for-bit live execution — the same compiled strategy artifact runs in backtest and on Hyperliquid

  • A strategy library of documented, forkable trading strategies

  • A screener + calculator suite at usekeel.io/lab (funding leaderboard, momentum, overfit-check, walk-forward visualizer, more)

  • This package — keel-trade — the agent-native research surface

This repository is the public mirror of the keel-trade Python package: a single pipx install gives you both a CLI and a stdio MCP server, so the same tools work from a terminal or from any MCP-capable agent.

Related MCP server: Hyperliquid MCP Server

Why agents create strategies, not trade them

Most agent-trading projects put an LLM in the execution loop. That makes systems slow, inconsistent, and hard to audit. Keel does the opposite:

You ──── compose ────► Strategy graph ──── compile ────► Deterministic artifact
                              ▲                                    │
                              │                                    ▼
                          Agent edits                          Backtest engine
                          via MCP tools                        (real HL data)
                                                                   │
                                                                   ▼
                                                              Live execution
                                                              (same artifact)

Three properties drive the design:

  1. Bit-for-bit parity between backtest and live. Same compiled artifact, same engine, same data path. There is no second implementation that can drift.

  2. Typed composition over freeform code. Strategies are graphs of versioned components. Compile errors catch bugs at author time instead of in production.

  3. Agents compose, the deterministic engine executes. Claude / Cursor / Codex help you build the strategy. They are not in the trade loop.

Quick start — the hosted MCP, nothing to install

Paste one URL into the client you already use. You sign in through your client's own OAuth flow; no API key to copy, no local install.

Hosted endpoint URL: https://mcp.usekeel.io/mcp — one endpoint, a 29-tool research/backtest/read surface, nothing to install. Sign in or sign up on the Keel page that opens (no account needed beforehand); authentication is your MCP client's OAuth flow, never a tool call.

  • Claude: Customize → Connectors → Add custom connector. Paste https://mcp.usekeel.io/mcp and choose Connect.

  • ChatGPT: Settings → Security and login → turn on Developer mode (a paid ChatGPT plan; on Business/Enterprise an admin must allow it). Open chatgpt.com/plugins, choose +, give the connector a name and a description, and enter https://mcp.usekeel.io/mcp as the MCP server URL (the /mcp path included).

  • Claude Code: claude mcp add --transport http keel https://mcp.usekeel.io/mcp. Inside Claude Code run /mcp and choose Authenticate.

  • Cursor: Add the server to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global): {"mcpServers": {"keel": {"url": "https://mcp.usekeel.io/mcp"}}}. Cursor asks you to sign in on first use.

  • Codex: codex mcp add keel --url https://mcp.usekeel.io/mcp then codex mcp login keel. Codex opens your browser for the sign-in.

  • Windsurf: Add the server to Windsurf's mcp_config.json: {"mcpServers": {"keel": {"serverUrl": "https://mcp.usekeel.io/mcp"}}}. Windsurf asks you to sign in on first use.

  • VS Code: Add the server to .vscode/mcp.json, or open the install link: {"servers": {"keel": {"type": "http", "url": "https://mcp.usekeel.io/mcp"}}}. VS Code asks you to sign in on first use.

  • Other: Use your client's own add remote / HTTP MCP server flow with https://mcp.usekeel.io/mcp. The first request answers 401 with OAuth 2.1 metadata, so a compliant client discovers the sign-in step by itself.

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.

Setup guide: https://usekeel.io/docs/agents/setup · Per-client runbook: https://usekeel.io/agents

No Keel account yet? Create one free — then connect the endpoint above and ask your agent to build something.

Choose your surface

Keel is one product with several places to use it. The hosted MCP above is the default; this package is the CLI + local MCP path.

You are…

Default path (shown first)

Also works

Using Claude/ChatGPT on web or phone

Hosted endpoint — paste the URL (directory one-click coming)

CLI + local MCP

Working in Claude Code / Cursor / terminal

Hosted endpoint — one command, or paste the URL

CLI + local MCP

Running a strategy from the Keel app

Keel web app (connect an account, review sizing, start it there)

reads on every surface

Trying a strategy forward without a connected exchange account

Paper run (simulated) — Keel web app, or keel paper on the CLI

in-app chat, local MCP

Building your own agent/scripts

SDK + API key

CLI

Just browsing/running strategies

Web app + library

hosted endpoint

  • CLI + local MCP — this package (install below).

  • SDK + API key — the REST API for building your own agents and scripts.

Per-surface zero-to-first-backtest runbook: usekeel.io/agents.

Install

Claude Desktop — one-click (MCPB)

Download keel-trade-<version>.mcpb from the latest release and drag onto Claude Desktop. Cross-platform single bundle — works on macOS, Windows, and Linux.

The MCPB bundle requires system Python 3.11+ (same prerequisite as the terminal install path below). First launch takes ~10-30 seconds while the bundle pip-installs runtime deps to ~/.keel/mcpb-lib/py3.X/; subsequent launches are instant.

The bundle runs this package's local MCP server: your assistant composes and validates strategies, backtests them on real Hyperliquid history, browses the strategy library, compares runs, and shares results. Sign in once with keel_auth_login. By default it cannot place orders or move funds — running a strategy with real capital happens in the Keel web app, and the local tools that act on a live account stay off unless you enable them and arm them on your machine (details below). Prefer nothing to install? Claude Desktop also works with the hosted connector in the quick start.

Terminal — pipx / uv (Claude Code, Codex, Cursor, Windsurf, etc.)

pipx install keel-trade

uv tool install keel-trade also works. Python 3.11+.

Then register the stdio MCP command with your agent host:

# Claude Code
claude mcp add keel -- keel mcp serve

# Codex
codex mcp add keel -- keel mcp serve

For Cursor, Windsurf, and generic MCP clients, see usekeel.io/keel-mcp#install or the agent setup guide.

First conversation with your agent

After install, sign in once via the agent (no terminal commands needed):

You: "Connect to Keel."

Agent: Calls keel_auth_login. Browser opens to app.usekeel.io, you click Allow, tokens land in ~/.keel/config.yaml. Authenticated for 30 days with transparent refresh.

Then describe what you want:

You: "Find me momentum signals for Hyperliquid top-30 perps and compose a backtest from 2024-08-15 to today."

Agent: Calls keel_components_search → keel_components_get_many → keel_strategy_compose → keel_backtest_run. Returns a share URL with the full tearsheet (equity curve, Sharpe, max drawdown, per-asset attribution).

Concrete example: this share URL is a funding-carry backtest produced through exactly this flow — Sharpe 2.17 over 2024-08-15 → 2026-04-30 on real Hyperliquid data.

What the MCP exposes

The default local toolsets (always, read-only, backtest, share, live-read) span status, auth, components, strategy lifecycle, backtest, audit, accounts, sharing, and read-only live monitoring.

Live-write tools (keel_live_deploy, keel_live_control, keel_live_update) are off unless you opt in with KEEL_TOOLSETS. Even then, going live is a hand-off: keel_live_deploy places no orders and returns a link into the Keel web app, where you choose the account, review sizing, and start the strategy. Acting on a live account from your machine (keel_live_control, or the operator-only direct deploy) also requires local arming (keel arm live set). The hosted connector at mcp.usekeel.io has no live-write tools at all.

Full per-tool reference: usekeel.io/docs/sdk/tool-reference.

CLI usage

Every MCP outcome tool has a CLI mirror. Useful for terminals, SSH sessions, CI, scripts, or agents that prefer subprocess calls:

# Auth + status
keel auth login                      # opens a browser
keel auth login --key "$KEEL_API_KEY"  # CI / SSH / no browser
keel status

# Search components, compose, backtest
keel components search "momentum"
keel strategy compose --source-file my-strategy.py --dry-run
keel backtest run str_abc123 --start-date 2024-08-15 --wait

# Inspect a strategy
keel strategy get str_abc123
keel strategy log str_abc123

Full CLI reference: usekeel.io/docs/sdk/cli-reference.

What you can do with Keel

Task

Surface

Backtest a Hyperliquid strategy — real fees, funding and slippage across the HL perp universe, delisted names included

usekeel.io/hyperliquid-backtest

Screen HL perps — momentum, funding, volume, breakout, regime

usekeel.io/lab

Use AI to build strategies — typed composition, not freeform code

usekeel.io/ai-trading-strategy-builder

Backtest portfolios across the HL universe

usekeel.io/crypto-portfolio-backtesting

Robustness calculators — walk-forward visualizer, Monte Carlo, deflated Sharpe, overfit check

usekeel.io/lab

Run a strategy live from the Keel web app, on your own Hyperliquid account (non-custodial)

usekeel.io/strategy-os

Compare strategies + venues

usekeel.io/compare

Browse documented trading strategies

usekeel.io/strategies

Documentation

Status

Alpha. The CLI and MCP surface are stable and ship to PyPI on a regular cadence; the underlying engine and component library are actively developed.

Keel measures the strategies you design. It is not investment advice, and backtest results do not predict future returns.

How to contribute / report a bug

See CONTRIBUTING.md. Short version:

  • Bug report → open an issue using the bug template

  • Feature request, question, or pattern share → use Discussions

  • Security issue → email team@usekeel.io (do not open a public issue)

  • Patches → PRs are welcome; we maintain in a private monorepo so PRs may take longer to land — see CONTRIBUTING for the porting process

License

MIT. See LICENSE.


Available Tools

47 tools
keel_accounts_listList Hyperliquid AccountsA
Read-onlyIdempotent
Inspect

List your Hyperliquid accounts (id, label, wallet_address, status, account_mode, agent_address, expires_at, attached strategy/deployment) — read-only enumeration to find the account you need. Pass an account_id to fetch detail for a single account; omit it to list them all. Do NOT use to authorize a new account — that's a web-only flow where the user signs an EIP-712 challenge with their wallet. Do NOT use to deploy to a live account — call keel_live_deploy with the chosen account_id.

Inputs: limit, cursor, account_id. Returns: result

keel_accounts_safetyRead Account Execution SafetyA
Read-onlyIdempotent
Inspect

Read one Hyperliquid account's execution SAFETY state: whether the account is halted, which halt event is current, how many frozen sessions and unresolved cancels the release still waits on, the halt's authority tier, and the block reasons. A halted account executes nothing, so this is the answer to 'why has this deployment done nothing since ' when the bar-level view shows no attempts at all. OPERATOR-GATED: allowlisted platform and on-call operators only. Everyone else gets a refusal that no re-login can fix — report it as 'operator-only', never as an authentication problem. Do NOT use to release a halt: clearing one is an operator ceremony with a compare-and-set on the exact halt event, and it is deliberately not exposed on this surface. Do NOT use for local arming — keel arm live is a local file and is unrelated to this server-side halt.

Inputs: account_id (required). Returns: result

keel_account_statusGet Account StatusA
Read-onlyIdempotent
Inspect

Report who is signed in to Keel, on which plan and with how much quota left — plan usage per unit is keel_plan_usage, a failing connection keel_connection_check. It carries the account and plan, the remaining quota (backtest runs, compute seconds, live strategy slots) with the reset instant, and what this connector can do: the toolsets visible under KEEL_TOOLSETS and the MCP tools they load.

Inputs: no named parameters. Returns: result

keel_audit_list_lastList Recent Audit EventsA
Read-onlyIdempotent
Inspect

Read the most recent N audit events for the current org — the agent's own trail for self-debugging and recovery. Use it to see what was just done (tool/action name, decision permit/deny, and best-effort args/result_ref metadata when the API recorded it) — e.g. to recover the run id of a backtest you lost track of. Do NOT assume args or result_ref is complete; empty values mean the event carried no replay-safe metadata. Do NOT use to mutate state — call the relevant outcome tool directly. Do NOT use to fetch full backtest results — read keel://backtest/<id>/results after locating the run id in the audit event's result_ref.

Inputs: n. Returns: result

keel_auth_loginLog In to KeelA
Idempotent
Inspect

Run the OAuth 2.1 + PKCE browser-loopback login flow against Keel and persist tokens to ~/.keel/config.yaml so subsequent tool calls are authenticated. Opens the user's browser and waits up to 5 minutes for sign-in. Call this when keel_account_status returns authenticated: false, or whenever another tool's error envelope points here as the next action. If the current session was an anonymous grant, its workspace is auto-claimed into the signed-in account (best-effort — a failed claim degrades to a notice, never a failed login). Optional scope='live' pre-checks the live-trading consent box; optional api_url=... targets a non-default Keel deployment such as staging. Returns the same concise summary as the CLI's keel auth login. Do NOT use to refresh an existing session (the client refreshes transparently). Do NOT use for headless environments (CI, SSH without browser forwarding) — there the user should run keel auth login --key <token> from their terminal instead. If the result carries pending_claim, the signed-in account already has strategies: ask the user whether to attach the anonymous workspace, then call this tool again with attach_anonymous_work true/false — that resolves the pending claim without re-opening the browser.

Inputs: scope, api_url, attach_anonymous_work. Returns: result

keel_auth_logoutLog Out of KeelA
DestructiveIdempotent
Inspect

Clear stored Keel credentials from ~/.keel/config.yaml so the next tool call is unauthenticated — use it to sign the user out, or to switch accounts (logout → keel_auth_login). Wipes the api_key, refresh_token, token_expires_at, and client_name; preserves api_url so the next login targets the same deployment. Idempotent — safe to call when already logged out. Do NOT use to recover from a transient auth error — the client refreshes tokens transparently on 401; only log out when the user explicitly asks, or to switch identity before keel_auth_login.

Inputs: no named parameters. Returns: result

keel_backtest_compareCompare BacktestsA
Read-onlyIdempotent
Inspect

Compare 2–8 completed backtests side by side — one run alone is keel_backtest_summarize. One table with deltas against the first id and each run's cost profile (resizes, turnover, fees), overlaid equity curves, notes when windows, engines, carry or strategies differ, and — when the sources resolve — a declaration and step diff. It takes every id in one call; saved versions of one strategy compare the same way, and keel_strategy_restore makes a chosen version the latest.

Inputs: backtest_ids (required), holds, periods. Returns: A comparison of runs: `view` renders it; an error carries `code` and `message`…

keel_backtest_positionsGet Backtest PositionsA
Read-onlyIdempotent
Inspect

The positions of ONE completed backtest, entry to exit — what drove its result. Default: a summary (count, win rate, P&L by asset, five best, five worst). asset and/or start/end: one page of positions (entry/exit time and price, side, entry value, net P&L, fees) and a cursor. compare_to pairs two runs' positions for one asset.

Inputs: backtest_id (required), end, sort, asset, +4 more. Returns: result

keel_backtest_runRun BacktestAInspect

Submit a NEW backtest run of a strategy — a finished run's result is keel_backtest_summarize, a running one's wait keel_backtest_watch. Runs server HEAD unless version pins one (a sequence number, tag or commit id). Defaults: the window is the platform's default for the strategy's timeframe (see start_date), to today UTC (end_date exclusive) — and a realistic cost model (starting capital, ~4.5 bps fees + ~4.5 bps slippage); the result names the window, any start move, and the declarations and pipeline that ran. Windows default by clock (shorter on fine clocks). To compare variants — another clock, parameters or universe — run the first, then pass its start_date/end_date to the others; a finer clock may take longer, and a start before its data is moved and named. Returns run_id; with wait=true (the default) also summary_metrics and the tearsheet link, or status_url on a polling timeout. Each call spends one run of quota; the result carries the count left when low, and keel_plan_usage reports it before a set of runs.

Warm-up: indicators need history before they produce signals. Short windows get it automatically, but a strategy with long lookbacks, or a window near the start of our data, can still spend part of the window warming up. In exposure, a first position late in the window, or few bars held, may be warm-up (or the strategy choosing to stay flat). notes flags a window that was all warm-up.

Write-through on the local server and the CLI (server HEAD is the source of truth): a checkout's unpushed edits are pushed first (a generated message, or push_message) and the run pins to that commit, so the code tested is the code held; auto_push=false opts out and raises local_ahead; a true conflict (local edited and server moved) stops with recovery options and nothing is overwritten.

Inputs: strategy_id (required), wait, config, present, +7 more. Returns: A backtest result: `view` renders it; an error carries `code` and `message` ins…

keel_backtest_summarizeSummarize Backtest ResultsA
Read-onlyIdempotent
Inspect

Show ONE completed backtest run in full — several runs together are keel_backtest_compare, a still-running one keel_backtest_watch. The card carries return, max drawdown, Sharpe, win rate, turnover, carry, the window, the equity curve and the tearsheet link. Complete only at a terminal status. exposure says how much of the window held positions; start / end / capital report part of the run as slice.

Inputs: backtest_id (required), end, start, capital, +1 more. Returns: A backtest result: `view` renders it; an error carries `code` and `message` ins…

keel_backtest_watchWatch Backtest ProgressA
Read-onlyIdempotent
Inspect

Wait on a running backtest (started by keel_backtest_run) until it finishes or the timeout elapses — a finished run in full is keel_backtest_summarize. It polls to a terminal status (succeeded, failed, cancelled) and returns the latest snapshot even while the run is going (terminal=false: watch again). Returns the status, and when complete the final metrics and the tearsheet link hero_url.

Inputs: backtest_id (required), present, timeout_s, interval_s, +1 more. Returns: A backtest result: `view` renders it; an error carries `code` and `message` ins…

keel_components_getGet ComponentA
Read-onlyIdempotent
Inspect

Fetch the full contract for ONE known pipeline component — several at once are keel_components_get_many. It carries the parameter list, type signature, slot reads and writes, examples and common pitfalls: the exact names, types and slots a ComponentRef(...) in the DSL passed to keel_strategy_compose has to match. name is case-sensitive. Discovering components is keel_components_search.

Inputs: name (required). Returns: result

keel_components_get_manyGet ComponentsA
Read-onlyIdempotent
Inspect

Fetch the full contract of SEVERAL components in one call — one component alone is keel_components_get. Each entry carries the parameter list, type signature, slot reads and writes and examples — what a pipeline's wiring is checked against. Candidates come from keel_components_search. The result gives each name's contract with found / missing counts; an unknown name is reported as missing, not a failed call.

Inputs: names (required). Returns: result

keel_connection_checkCheck ConnectionA
Read-onlyIdempotent
Inspect

Check the connection to Keel from the Keel CLI/MCP installation when a call fails for an environmental reason — identity and quota are keel_account_status. One pass over sign-in, API reachability and the tool surface this server loads, returned as a checks list (name, ok, detail) in JSON text in result; a tool's own structured error names its cause instead. A call failing twice on one root cause is a setup question rather than a retry, and a report for a human is keel_feedback. Exits non-zero when any check fails, so keel doctor && … gates cleanly in scripts.

Inputs: no named parameters. Returns: result

keel_deployments_listList DeploymentsA
Read-onlyIdempotent
Inspect

List every deployment in your org with its id, strategy, status, schedule, account_id, deployed version, realized P&L, and open position count. By default it lists both live deployments and paper runs, each row labelled Live or Paper from its venue; paper runs are simulated. Pass capital_class ('real', 'practice' or 'all') to list one class, and include_stopped=true to include stopped and archived ones; results are cursor-paginated. This is the id-lookup step: take deployment_id from here into keel_live_monitor, keel_live_receipt, or keel_live_quality, and account_id into keel_accounts_safety. Do NOT use for aggregate performance across deployments — call keel_live_monitor with view='portfolio'. Do NOT use to change a deployment's state — call keel_live_control for a Live row, or keel_paper_control for a Paper row.

Inputs: limit, cursor, capital_class, include_stopped. Returns: result

keel_feedbackSend FeedbackA
Destructive
Inspect

Send feedback about Keel to the Keel team — friction, praise or a bug report in goal, kind and text — when the user asks or agrees; a failing connection is keel_connection_check. It sends only these fields (plus optional severity and context_ref), nothing else from the conversation; text is required. Returns delivered (true only when Keel stored the note) and, on a problem, a note; no one replies within the session.

Inputs: text (required), goal, kind, severity, +1 more. Returns: result

keel_helpGet Help TopicA
Read-onlyIdempotent
Inspect

Fetch one Keel knowledge or DSL-reference document by topic — components are keel_components_search, one component's contract keel_components_get. With no topic it lists the topic names. topic="skills" lists the agent skills (also served as MCP prompts) and topic="skill:<name>" returns one in full; topic="rule:<CODE>" explains a validation issue code and rules lists them.

Inputs: topic. Returns: result

keel_library_forkFork Library EntryAInspect

Fork a verified Keel Library entry into the caller's org as an editable strategy — a copy of a Keel strategy or a share link is keel_strategy_fork. The fork is a full copy with its own history; its evidence comes from its own keel_backtest_run, not the entry's published metrics. A variant_id from keel_library_get selects a published preset; ma-crossover-crypto is the simple entry new web users start from.

Inputs: slug (required), name, variant_id. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_library_getGet Library EntryA
Read-onlyIdempotent
Inspect

Read one Keel Library entry's verified facts before a fork — forking it is keel_library_fork. They are its headline metrics, backtest window, data freshness and published variants (parameter presets with their own metrics), from the library's verified run; a fork's own numbers come from its own keel_backtest_run.

Inputs: slug (required). Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_library_listList Library EntriesA
Read-onlyIdempotent
Inspect

List the Keel Library — the verified, backtested strategy entries published in the product; the caller's own strategies are keel_strategy_search. Each row carries the slug, name, category, risk band and headline metrics from the entry's verified run. One entry's full facts are keel_library_get; starting from one is keel_library_fork.

Inputs: no named parameters. Returns: result

keel_live_monitorMonitor Live DeploymentsA
Read-onlyIdempotent
Inspect

Read-only observability for live deployments: overview, positions, equity, P&L, stats, weights, weights-history, executions, orders, trades, funding events, or portfolio summary — one view enum in place of ~13 separate live_* read endpoints. It only observes and changes no deployment; going live with a new strategy is a web-app step (keel_live_deploy hands off to it). With no arguments it returns the portfolio summary across all deployments; deployment_id narrows to one. The returned freshness qualifies the data: positions is a live read of the linked Hyperliquid account at request time (a snapshot that can include holdings beyond one deployment), while portfolio/history views are recorded backend state that can lag the web dashboard's live-service stream — not a real-time tail. Executions view: expand_orders=true returns the child orders behind each attempt's counts, and execution_run_id narrows to one bar. A row's quality_summary carries the session_id and intent_rev that address that episode's receipt via keel_live_receipt; a run with several episodes has one receipt per episode and no run-level receipt, which is what its quality_episode_count reports. Changing deployment state is keel_live_control; deploying a new strategy is keel_live_deploy. Results include simulated (paper) runs, labelled by venue.

Inputs: side, view, limit, cursor, +7 more. Returns: result

keel_live_qualityRead Execution Quality RollupA
Read-onlyIdempotent
Inspect

Read a live deployment's precomputed execution-quality rollup: the aggregated cost of its executions, projected from sealed receipts rather than recomputed. Optionally narrow to a date window (start_date inclusive, end_date exclusive) or to one execution style (style, style_version) so market and maker bars are not pooled into one number. Use this for 'what has execution cost me on this deployment'; use keel_live_receipt for one episode's own evidence. Do NOT use for realized strategy P&L — call keel_live_monitor with view='pnl' or view='stats'. Do NOT use to change anything — this endpoint is read-only.

Inputs: deployment_id (required), style, end_date, start_date, +1 more. Returns: result

keel_live_receiptRead Execution ReceiptA
Read-onlyIdempotent
Inspect

Fetch the sealed execution receipt for ONE episode of a live deployment — the per-symbol record of what an execution actually cost: filled and residual quantity, decision- and arrival-benchmark shortfall in basis points, fee components, completeness and its missing reasons, and the terminal reason. ADDRESS: a receipt belongs to an episode, not to a run. Get session_id and intent_rev from a keel_live_monitor view='executions' row's quality_summary; a run with several episodes has one receipt per episode and no single run receipt. Pass version only to read an older version of a corrected receipt. Do NOT use for a whole deployment's cost picture — call keel_live_quality. Do NOT use to change anything — this endpoint is read-only.

Inputs: session_id (required), deployment_id (required), version, intent_rev. Returns: result

keel_paper_controlControl a Paper Run (Simulated)A
Destructive
Inspect

Pause, resume, stop, restart or update a paper (simulated) run. stop is permanent for that record: the record is kept and its line stops. restart ends this record and starts a fresh run of the same version with the same simulated capital, and returns the new run's id and URL. update moves a running or paused run onto the strategy's newest saved version: the run keeps its id and record, is relabelled with the new version, and the result carries version; an update onto the version it already runs is refused with paper_run_up_to_date. Stopping frees the run's paper slot; restarting reuses it. Each call changes the run once; a repeated call is refused with paper_run_state_conflict when the run is already in that state. This tool never touches live deployments: a live deployment is refused with invalid_target, and keel_live_control controls those. Get the deployment_id from keel_paper_deploy or keel_deployments_list; read the run with keel_live_monitor.

Inputs: action (required), deployment_id (required). Returns: result

keel_paper_deployPaper-Trade a Strategy (Simulated)AInspect

Start a paper-trading run of a saved strategy: fills are simulated at live Hyperliquid prices under Keel's published fill model, no real orders are placed and no funds are at risk. It completes here, in band, without a confirmation step, and needs no exchange account, wallet or live opt-in. Each plan runs a set number of paper runs at once (free plans one); keel_plan_usage shows this plan's paper slots. Going live is a separate human step in the Keel web app; keel_live_deploy returns that handoff. The response carries the auto-pause disclosures; manage the run with keel_paper_control (stopping a paper run frees its slot) and watch it with keel_live_monitor. On a timeout, read keel_deployments_list with capital_class=practice before calling again: a second call starts a second run and takes (or is refused) another slot.

Inputs: strategy_id (required), schedule, config_id, simulated_capital. Returns: result

keel_plan_usageGet Plan UsageA
Read-onlyIdempotent
Inspect

Report the org's own Keel plan and its backtest usage this period — auth, identity and visible tools are keel_account_status. It returns the plan name, the period, and for backtest runs and backtest compute seconds the limit, the used and remaining counts, and the reset instant. It changes nothing and spends no quota.

Inputs: no named parameters. Returns: result

keel_share_createCreate Public Share LinkA
Destructive
Inspect

Publish a strategy (str_*) or a backtest (btr_*) at a public usekeel.io/share/ URL. The page shows the strategy's name, description, backtest metrics, fork count, live status, market count and risk settings; include_source (or permission) decides whether viewers also see and can copy the DSL source. expires_at ends it later. What recipients copied cannot be taken back. Returns share_url, share_id and the applied include_source, permission and expires_at. A paper run (dep_*, simulated) is shared the same way: its page is stamped as simulated. A dep_* id that is not a paper run is refused (unsupported_target); share those from their page in the Keel web app.

Inputs: target_id (required), expires_at, permission, target_type, +1 more. Returns: result

keel_strategy_checkoutCheck Out Strategy LocallyAInspect

Pull a platform strategy into a local workspace so you can edit, validate, and version-control it. Server HEAD stays the single source of truth — the checkout is a WORKING COPY (disposable, always reconcilable); runnable actions (backtest/deploy) resolve server commits and write through local edits by default. Writes strategy.py + .keel-meta.json to the workspace dir (defaults to ~/.keel/workspace/<id>/; project-local when cwd has .keel/workspace.yaml). Subsequent edits stay local until keel_strategy_push commits them back — check keel_strategy_status for the local-vs-server delta any time. Use this BEFORE iterating on an existing strategy — even small edits should go through checkout → edit → push, NOT raw keel_strategy_compose calls that bypass version history. Do NOT use to CREATE a new strategy — call keel_strategy_compose. Do NOT use for backtest artifacts — those are read-only resources.

Inputs: strategy_id (required), dir. Returns: result

keel_strategy_composeSave StrategyAInspect

Save a strategy from Keel DSL source — new, or with strategy_id its next version; components come from keel_components_search and keel_components_get_many. dry_run=true validates and compiles without saving. Each save of the source adds a new version to the strategy's history and makes it the latest; nothing is deleted, and its earlier versions and their backtests stay in its history.

Declarations, then one Pipeline: Globals(target_timeframe='1d') Universe(mode='top_volume', top_n=30, market='perp') Execution(rebalance='buffered', buffer_threshold=0.2, buffer_mode='relative', rebalance_method='to_edge') Pipeline([ PriceDataLoader(), ROC(period=20), ForecastScaler(avg_abs_target=10.0), ForecastCapper(limit=20.0), ForecastWeightNormalizer(target_leverage=1.0), ], name='my_strategy') A forecast's sign is its direction (positive long, negative short); polarity is trend-following by default, and a mean-reversion signal is the inverted one. A 1d bar closes at 00:00 UTC; bar_offset moves that close, and with it every result.

Unsupported Universe symbols are dropped and named in universe.note; HIP-3 markets (e.g. xyz:AAPL) are not supported yet, coming soon.

A same-machine local checkout is written back (workspace_sync) unless it has local edits; server HEAD is the source of truth.

Inputs: name, source, dry_run, message, +6 more. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_strategy_deleteDelete StrategyA
Destructive
Inspect

Hard-delete a strategy on the platform — IRREVERSIBLE. Once deleted, the strategy_id can't be reused and its entire version history is gone. Prefer recovery over deletion: to undo a bad edit use keel_strategy_restore (history is preserved), to drop only the LOCAL working copy use keel_strategy_discard, and to stop a live deployment use keel_live_control with action=stop. Reach for delete only when the user explicitly wants the strategy gone for good. Local workspace files are NOT removed — clean those up separately. Do NOT use to stop a live deployment — call keel_live_control with action=stop. Do NOT use to remove a local workspace — call keel_strategy_discard.

Inputs: strategy_id (required). Returns: result

keel_strategy_diffDiff Strategy VersionsA
Read-onlyIdempotent
Inspect

What changed between two strategies or two versions of one (versions: keel_strategy_history; several runs' results: keel_backtest_compare). Reports added, removed and modified steps, parameter and declaration changes (ROC.period 20→42) and reordering, drawn as a diff card. With strategy_id the refs are versions; without it each is a local file path or DSL source, so two strategies diff by their sources (from keel_strategy_get).

Inputs: ref_a (required), ref_b (required), strategy_id. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_strategy_discardDiscard Local WorkspaceA
DestructiveIdempotent
Inspect

Remove a local workspace — the checked-out strategy.py + .keel-meta.json. Local-only: the server-side strategy is untouched and still available via keel_strategy_get or keel_strategy_checkout. Use it to clean up after you're done iterating, or to reset a diverged workspace by re-checking out fresh (a clean re-checkout beats a manual merge). Do NOT use to delete a strategy on the platform — call keel_strategy_delete (destructive + irreversible). This tool only touches local filesystem state.

Inputs: strategy_id. Returns: result

keel_strategy_forkFork StrategyAInspect

Copy a strategy into the caller's org as a separate strategy with its own history; the original's source and versions are unchanged (saving a new version of a strategy is keel_strategy_compose). The copy starts with one version and no backtests; the original keeps its versions and their backtests. source is a strategy id (str_*) or the id in a usekeel.io/share/<id> URL showing its source, any organisation's; forking one adds to its public fork count. Sharing is keel_share_create.

Inputs: source (required), name, present, description, +1 more. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_strategy_getGet StrategyA
Read-onlyIdempotent
Inspect

Render a saved strategy as its structure card — a version's commit id alone is keel_strategy_history, with no card. version (HEAD, tag, sequence number or commit id) selects the version the card's structure, evidence and Code tab describe and include_source=true returns (a non-HEAD read names HEAD apart, as head_summary); include_versions=true lists recent versions; recent_runs lists its newest runs (up to 5) by the run_id keel_backtest_summarize, keel_backtest_compare and keel_share_create take. Changing it is keel_strategy_compose.

Inputs: strategy_id (required), version, include_source, skip_readiness, +1 more. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_strategy_historyGet Strategy HistoryA
Read-onlyIdempotent
Inspect

Show a strategy's commit history — each version's commit id, the ref keel_backtest_run pins and keel_strategy_diff compares. Each entry carries the sequence number, commit id, parent, source hash, message, timestamp and tags, newest first; limit defaults to 50 (server maximum 200). It is the server's canonical timeline, where server HEAD is the source of truth, and each entry also names the client that made it (modified_via). One commit's source is keel_strategy_get with version and include_source=true.

Inputs: strategy_id (required), limit. Returns: result

keel_strategy_notes_addAdd Strategy NoteAInspect

Add a note to a strategy's saved notes, kept with the strategy in the user's Keel account and returned by keel_strategy_notes_read in later sessions. Each call appends one note; none is edited or removed. A note is a brief, strategy-specific record (a rationale, a baseline, a risk), not a transcript of the conversation. role defaults to agent; user marks a human-authored note. Changing the source is keel_strategy_compose.

Inputs: note (required), strategy_id (required), role. Returns: result

keel_strategy_notes_readRead Strategy NotesA
Read-onlyIdempotent
Inspect

Read the notes saved on one of the caller's strategies — the durable context that outlives one session; adding one is keel_strategy_notes_add. The result carries notes: the most recent limit notes (default 10), newest first, each with its text, author and time — why prior changes were made, baseline metrics, known risks.

Inputs: strategy_id (required), limit. Returns: result

keel_strategy_pullPull Strategy UpdatesA
Idempotent
Inspect

Re-fetch the server HEAD into the local working copy — the 'git pull' of the sync model. Refuses when local has uncommitted changes (diverged) so you don't silently lose work; push first, or pass force=True to overwrite local (LOSES local edits). Use it when someone else — a teammate, the web editor, a fork, a restore — may have moved the strategy while you were working locally; check keel_strategy_status first to see whether a pull is even needed. Do NOT use to send local edits UP — call keel_strategy_push. Do NOT use to inspect what changed — call keel_strategy_history.

Inputs: force, strategy_id. Returns: result

keel_strategy_pushPush Local Strategy ChangesAInspect

Commit local strategy.py changes back to the platform as a new version — the 'git push' of the sync model. Server HEAD is the source of truth, and pushing is how local edits become runnable: it reads the local working copy, validates it, and creates a new commit (new HEAD). Conflict-safe by default (sends expected_source_hash against what the server had at last checkout/pull); pass force=True only when you've verified no concurrent work — it overwrites the server HEAD. Auto-detects strategy_id from the current workspace when omitted. Push AFTER editing strategy.py, BEFORE running a backtest — backtests run against server HEAD, so unpushed local changes won't be tested; include a commit message so keel_strategy_history stays readable. Do NOT use to CREATE a new strategy from scratch — call keel_strategy_compose. Do NOT use to publish a strategy publicly — call keel_share_create.

Inputs: force, message, strategy_id. Returns: result

keel_strategy_readinessGet Strategy ReadinessA
Read-onlyIdempotent
Inspect

Report what evidence a saved strategy has and still lacks — a brief, a baseline backtest, named failure modes — and the one next step; a backtest is keel_backtest_run. Returns next_recommended_action, missing_evidence, a projection (stage, latest run id and metrics), and projection_available with unavailable_reason when the strategy is not visible to the caller.

Inputs: strategy_id (required). Returns: result

keel_strategy_restoreRestore Strategy VersionAInspect

Add a new version of a strategy equal to an earlier one — a restore; the history is keel_strategy_history, the current strategy keel_strategy_get. ref is a sequence number, tag or commit id; that version's source becomes the next, latest version, labelled "Restored from vN" unless message names it. The history is kept and nothing is deleted. After a restore, a checked-out local workspace is behind server HEAD; keel_strategy_pull catches it up. Forking into a new strategy is keel_strategy_fork; discarding local edits is keel_strategy_pull force=True or keel_strategy_discard.

Inputs: ref (required), strategy_id (required), message. Returns: A strategy result: `view` renders it; an error carries `code` and `message` ins…

keel_strategy_statusLocal Workspace StatusA
Read-onlyIdempotent
Inspect

Compare a local workspace's strategy.py against the server's current HEAD — the 'git status' of the sync model. Returns one of: clean (in sync), ahead (local has uncommitted edits — push first), behind (server moved — pull to catch up), diverged (both moved — needs explicit resolution). By default also returns the last 5 commits in recent_commits for 'what just happened' context (set include_recent=False for hot polling loops). Call this BEFORE keel_backtest_run — backtests use server HEAD, so unpushed local changes won't be tested — and after coming back from the web editor, where someone else may have edited. Auto-detects the strategy from the current workspace when strategy_id is omitted. Do NOT use to list ALL workspaces — call keel_strategy_workspaces. Do NOT use to inspect full history — call keel_strategy_history.

Inputs: strategy_id, include_recent, recent_commits, skip_readiness. Returns: result

keel_strategy_upgradeUpgrade Deprecated Position ComponentsAInspect

Upgrade a saved strategy that pins deprecated position components (PositionStateMachine, TradeLevelRiskExit, ScalingPositionManager, the stop / target / trailing / time exits, StopDistanceRiskSizer) into the TradeManager form — the edit the validator's POSITION_UPGRADE_AVAILABLE issue describes; a hand-written change is keel_strategy_compose. It reads the latest version and returns each position group's plan (mechanical, assisted with questions, or manual), the unified diff, the upgraded source and its validation; rule names and comments are kept. answers answers an assisted group's questions as <question_id>=<choice>[:<value>], and keep leaves that group as it is. Without apply nothing is written; apply=true saves the upgrade as a new version, conflict-safe against the version read, and returns previous_commit_id and commit_id. A known-issue strategy is refused at deploy until it is upgraded. Comparing the two versions is keel_backtest_run on each, then keel_backtest_compare.

Inputs: strategy_id (required), apply, answers, message. Returns: result

keel_strategy_workspacesList Local WorkspacesA
Read-onlyIdempotent
Inspect

List every locally checked-out strategy workspace — strategy id, name, and sync metadata (source hash, checkout time, sequence at checkout). Pure filesystem read of ~/.keel/workspace/ (plus any project-local .keel/workspace.yaml-scoped workspaces); no server call. Use it when you've lost track of what's checked out, or to enumerate work-in-progress across strategies before pushing or cleaning up. Do NOT use to list strategies on the server — call keel_strategy_search. Do NOT use to check the sync state of one workspace — call keel_strategy_status.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 47 tools

    Disambiguation5/5

    Despite 47 tools, nearly every description carries explicit 'Do NOT use to X — call Y instead' guards, so overlapping families (accounts_list/accounts_safety/account_status/plan_usage; strategy_get/history/status; live_monitor/live_quality/live_receipt; backtest_run/watch/summarize/compare/positions) are cleanly separable. Each tool names a distinct resource+action, and the git-like sync verbs (checkout/pull/push/status/discard) are individually scoped.

    Naming Consistency4/5

    All names share a `keel_` prefix in snake_case, mostly following `keel_<domain>_<action>` (strategy_compose, backtest_run, components_get, paper_control). Minor deviations exist where the action verb is dropped or replaced by a noun (keel_strategy_workspaces, keel_account_status, keel_live_quality, keel_help, keel_feedback), and ordering varies (keel_audit_list_last), but the convention is still predictable and readable.

    Tool Count2/5

    47 tools is roughly double the 'heavy' threshold and well above what an agent can hold comfortably in context. The domain is broad (strategies, backtests, deployment, library, components, auth, local workspace), and the authors already consolidated ~13 endpoints into one keel_live_monitor, showing the count could be trimmed further.

    Completeness4/5

    The strategy lifecycle is thoroughly covered: search/get/compose/delete/diff/history/restore/fork/upgrade plus notes, backtest run/watch/summarize/compare/positions, library, paper deploy/control, sharing, monitoring and auth. Notable gaps are tools referenced but absent from the surface (keel_live_deploy, keel_live_control) and no backtest-cancel tool, though live deploy/control are deliberately web-only human-in-loop steps agents can route around.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server implementation that integrates with Hyperliquid exchange, providing access to crypto market data including mid prices, historical candles, and L2 order books.
      3
      43 npm
      44
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server for Hyperliquid perpetual DEX with 48 tools for trading, monitoring, risk management, and security. Enables real-time market data, order management, risk validation, and automated trading strategies.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to place and manage Hyperliquid trades through MCP with position, leverage, daily-loss, market, and stop-loss limits enforced outside the model, plus paper trading and an auditable decision log.
      9
      104 npm
      MIT