Keel

io.github.keel-trade由 GitHub 帳號 keel-trade 發布v0.9.0更新於 Oct 24, 2026

Build, backtest and paper-run Hyperliquid strategies from your AI assistant.

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

Keel 讓 AI 助理依據真實市場歷史建立、驗證並回測 Hyperliquid 永續合約策略,並分享結果。

可以做什麼
搜尋並取得具版本的策略元件,組合與驗證型別化策略圖,查看策略日誌與稽核資料。在真實 Hyperliquid 價格、資金費與滑價歷史上執行確定性回測並比較多次執行。瀏覽策略庫並產生含完整回測報告的分享連結。查看帳戶狀態、完成登入,並讀取實盤帳戶與策略狀態。將策略交接給 Keel 網頁應用進行實盤部署;實盤寫入工具需主動開啟,且本身不下單。
適用情境
適合希望助理在不寫自由程式碼的情況下設計、測試和比較 Hyperliquid 加密永續合約策略,或在投入真實資金前研究資金費與動量想法的情境。
執行需求
可使用託管遠端端點並透過 MCP 用戶端完成 OAuth 登入,或在本機安裝 keel-trade Python 套件(需 Python 3.11+,可用 pipx、uv 或 Claude Desktop 套裝包)以 stdio 方式執行。需要免費的 Keel 帳戶;本機使用需透過瀏覽器登入一次,CI 或 SSH 情境可用 API 金鑰。需能連線至 Keel 服務的網路。
安裝前請注意
登入權杖保存在本機設定檔中。實盤寫入工具預設關閉,需透過 KEEL_TOOLSETS 開啟並在本機授權;即使如此,部署也只是交接給網頁應用,由你選擇帳戶與部位規模。託管端點不含實盤寫入工具。策略與回測資料會傳送到 Keel 伺服器。回測不構成投資建議,也不能預測未來收益;專案處於 alpha 階段。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Keel,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.keel-trade%2Fkeel-trade/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "keel": {
      "type": "http",
      "url": "https://mcp.usekeel.io/mcp"
    }
  }
}

README

[keel-trade — Build, backtest, and automate Hyperliquid trading strategies with your agent]

keel-trade

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.

[PyPI version] [Python 3.11+] [MIT License] [Product page] [keel-trade MCP server]

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:

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 phoneHosted endpoint — paste the URL (directory one-click coming)CLI + local MCP
Working in Claude Code / Cursor / terminalHosted endpoint — one command, or paste the URLCLI + local MCP
Running a strategy from the Keel appKeel web app (connect an account, review sizing, start it there)reads on every surface
Trying a strategy forward without a connected exchange accountPaper run (simulated) — Keel web app, or keel paper on the CLIin-app chat, local MCP
Building your own agent/scriptsSDK + API keyCLI
Just browsing/running strategiesWeb app + libraryhosted 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.)

bash
pipx install keel-trade

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

Then register the stdio MCP command with your agent host:

bash
# Claude Codeclaude mcp add keel -- keel mcp serve
# Codexcodex 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:

bash
# Auth + statuskeel auth login                      # opens a browserkeel auth login --key "$KEEL_API_KEY"  # CI / SSH / no browserkeel status
# Search components, compose, backtestkeel components search "momentum"keel strategy compose --source-file my-strategy.py --dry-runkeel backtest run str_abc123 --start-date 2024-08-15 --wait
# Inspect a strategykeel strategy get str_abc123keel strategy log str_abc123

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

What you can do with Keel

TaskSurface
Backtest a Hyperliquid strategy — real fees, funding and slippage across the HL perp universe, delisted names includedusekeel.io/hyperliquid-backtest
Screen HL perps — momentum, funding, volume, breakout, regimeusekeel.io/lab
Use AI to build strategies — typed composition, not freeform codeusekeel.io/ai-trading-strategy-builder
Backtest portfolios across the HL universeusekeel.io/crypto-portfolio-backtesting
Robustness calculators — walk-forward visualizer, Monte Carlo, deflated Sharpe, overfit checkusekeel.io/lab
Run a strategy live from the Keel web app, on your own Hyperliquid account (non-custodial)usekeel.io/strategy-os
Compare strategies + venuesusekeel.io/compare
Browse documented trading strategiesusekeel.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 [email protected] (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

License

MIT. See LICENSE.


Built by the Keel Research Team · @usekeelio

來源:README.md,提交 76ff9f6

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

2
  1. v0.9.0最新Oct 24, 2026
  2. v0.5.6Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分