keel-trade
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
The Keel CLI and stdio MCP server.
Build and backtest Hyperliquid perpetual-futures strategies with your AI assistant — typed strategy composition and deterministic backtests on real Hyperliquid market history. Running a strategy with real capital happens in the Keel web app .
Website ·
Product page ·
Docs ·
Sample backtest ·
Discussions
---
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.
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:
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.