Keel — Hyperliquid research MCP
Hyperliquid research MCP — typed strategy composition, deterministic backtests on real market data, opt-in live execution.
README
<p align="center"> <a href="https://usekeel.io/keel-mcp"> <img src="https://usekeel.io/og/keel-mcp.png" alt="keel-trade — Build, backtest, and automate Hyperliquid trading strategies with your agent" width="100%"> </a> </p>
<h1 align="center">keel-trade</h1>
<p align="center"> <strong>The Keel CLI and stdio MCP server.</strong><br> Build, backtest, and automate <a href="https://hyperliquid.xyz">Hyperliquid</a> trading strategies — with your agent in the loop for <em>creation</em> and a deterministic engine in the loop for <em>execution</em>. </p>
<p align="center"> <a href="https://pypi.org/project/keel-trade/"><img src="https://img.shields.io/pypi/v/keel-trade.svg" alt="PyPI version"></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python 3.11+"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="MIT License"></a> <a href="https://usekeel.io/keel-mcp"><img src="https://img.shields.io/badge/product-keel--mcp-635BFF.svg" alt="Product page"></a> </p>
<p align="center"> <a href="https://usekeel.io">Website</a> · <a href="https://usekeel.io/keel-mcp">Product page</a> · <a href="https://usekeel.io/docs">Docs</a> · <a href="https://app.usekeel.io/share/gDXjURKqWPs8CZ4eXdqAI?ref=H0O2KN">Sample backtest</a> · <a href="https://github.com/keel-trade/keel-trade/discussions">Discussions</a> </p>
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 + slippage, walk-forward, and Monte Carlo
- 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.
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:
- Bit-for-bit parity between backtest and live. Same compiled artifact, same engine, same data path. There is no second implementation that can drift.
- Typed composition over freeform code. Strategies are graphs of versioned components. Compile errors catch bugs at author time instead of in production.
- Agents compose, the deterministic engine executes. Claude / Cursor / Codex help you build the strategy. They are not in the trade loop.
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.
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_detail_batch→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 toolset spans status, auth, components, strategy lifecycle, backtest, audit, accounts, sharing, and read-only live monitoring. Live-write tools (keel_live_deploy, keel_live_control) require an explicit opt-in toolset plus a local arming step — agents can't deploy your account without you authorizing it twice.
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
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, slippage, ~220 perps | 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 diagnostics — walk-forward, Monte Carlo, deflated Sharpe, PBO | usekeel.io/hyperliquid |
| Deploy a strategy live on Hyperliquid (non-custodial) | usekeel.io/strategy-os |
| Compare strategies + venues | usekeel.io/compare |
| Browse documented trading strategies | usekeel.io/strategies |
Documentation
- Product page: usekeel.io/keel-mcp
- Getting started: usekeel.io/docs/getting-started
- Agent setup (per host): usekeel.io/docs/sdk/agent-setup
- CLI reference: usekeel.io/docs/sdk/cli-reference
- MCP tool reference: usekeel.io/docs/sdk/tool-reference
- REST API reference: usekeel.io/docs/api-reference
- Agent instructions (canonical, machine-readable):
AGENTS.md
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.
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
Related
- Keel on Hyperliquid — the platform
- What is MCP?
- AI agents on Hyperliquid — the definitive guide
- Why we don't put LLMs in the trade loop
License
MIT. See LICENSE.
<p align="center"> Built by <a href="https://usekeel.io/about">the Keel Research Team</a> · <a href="https://x.com/usekeelio">@usekeelio</a> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。