kdraigo
com.kdraigo由 kdraigo.com 发布官方发布者v1.27.0更新于 Nov 7, 2026
Your AI writes Go trading strategies; kdraigo backtests them on one-minute Binance and Bybit data.
概览
把 AI 助手接入 kdraigo 交易平台,编写 Go 策略、在 Binance 与 Bybit 数据上回测并查看结果。
- 可以做什么
- 查阅 SDK 与指标文档、克隆策略模板,并在云端工作区编写、编译和运行代码
- 获取回测与实盘会话报告、逐笔交易、分组统计、订单、持仓和资金费
- 拉取 K 线、成交流与合约持仓数据
- 维护研究实验室:笔记、实验、结论、交接,并搜索或复刻已发布研究
- 搭建看板与组件,编写、检查、预览并版本化 kdscript 图表脚本与提醒
- 把实验室同步为本地 Markdown 文件夹供 Obsidian 使用(仅本地安装)
- 适用场景
- 适合研究或迭代加密货币交易策略时使用:让助手生成代码、跑回测、判断结果,并把研究记录集中在一处,而不必在多个工具间搬运数字。
- 运行要求
- 可使用托管远程端点并通过 kdraigo.com 的 OAuth 登录(Google 或钱包),或通过 go install 安装本地 Go 二进制。本地模式需要 Ed25519 API 密钥(key_id 与 private_key)写入配置文件,可用 KDRAIGO_CONFIG 覆盖路径。回放工具需设置 KDRAIGO_MCP_ENABLE_REPLAY=1。需要 kdraigo 账户。
安装
在 SourceWeft 中
- 打开 控制台中的 kdraigo,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/com.kdraigo%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"kdraigo": {
"type": "http",
"url": "https://mcp.kdraigo.com/mcp"
}
}
}README
kdraigo_mcp
Model Context Protocol server for the kdraigo algorithmic trading platform. Drop one binary into your mcpServers config and Claude Code (or any MCP client) can scaffold strategies, run backtests, fetch analytics, and iterate end-to-end against the kdraigo backend.
Two ways to use it:
- Hosted at
https://mcp.kdraigo.com/mcp: add that URL to claude.ai, ChatGPT, Gemini CLI or Claude Code as a remote MCP server, sign in on kdraigo.com (Google or wallet), and nothing runs on your machine. See Hosted server. - Local, over stdio: the binary is launched as a subprocess by your MCP client. No hosting, no port, no public surface. It signs each outbound request to
kdraigo.comwith your Ed25519 key.
Install
go install reports the installed release tag automatically. From a clone, use
make install (or make build) to stamp the version from your local git tag.
Verify (prints the release tag):
Configure
You need an Ed25519 API key: create one on kdraigo.com under Account → API keys (kdraigo.com/account/api-keys). It gives a key_id (UUID) and a hex-encoded private_key, shown once.
Create ~/.kdraigo/config.yaml:
Override the config path with KDRAIGO_CONFIG if you need a non-default location.
Wire into Claude Code
Other MCP clients (or a project's .mcp.json) take the usual entry:
Restart the client. The tools below appear under the kdraigo server: 78 by default, 80 with the replay switch.
The two replay tools, create_backtest_session and run_backtest_stream, are off unless the server runs with KDRAIGO_MCP_ENABLE_REPLAY=1. They step candles through a session without running any strategy code, so they are not how a strategy is backtested. A strategy runs as its own program through dev_sdk: locally with go run ., or in the cloud workspace with workspace_run. A replay left parked also holds one of the account's session slots for up to an hour.
Install the skills
The skills are built into the binary, so they always match its tools. Restart Claude Code to load them. Releases before v1.1.0 wrote flat ~/.claude/skills/<name>.md files that Claude Code never loaded; the installer names any it finds so you can delete them.
kdraigo-strategy— open the research lab → write the hypothesis → check what was already done → run (go run .or the cloud workspace) → report → drill down → record → hand off, how to judge a result, and the pitfalls.kdraigo-indicators— choose the right technical indicator by intent and wire it via the SDK.
Tools
Results come back as a few header lines and tab-separated tables, with no JSON, so a page of rows fits the client's tool-output limit. A result stops at about 60 KB and its last line says how to get the rest (offset, or save_to for orders).
Cloud workspace
The workspace_* tools write, build and run a strategy on the platform: no local Go, checkout or keys. The workspace service compiles it offline on a sandbox machine (the caller's own on pro and admin accounts, shared with other users' runs, each in its own container, on verified ones), then runs it with a key minted for that run alone, which can only open backtest sessions and is revoked when the run ends. Under gVisor the program can reach nothing but the platform API. get_sdk_docs section="cloud workspace" has the rules (flat .go files, allowed imports, env, limits). It is in beta for admin accounts first.
Research labs
A lab is one line of research (a futures trend strategy, a spot accumulation idea) kept apart from the others: a brief, notes in Markdown with [[links]], experiments that go draft → registered (frozen and hashed) → a verdict, the runs of its workspaces, and handoffs between sessions. research_service keeps it; the website's Lab shows it.
Runs of a workspace in a lab are recorded by the platform as they end: the code's hash, the declared values, exchange, pairs, timeframe and window. That is what lab_check matches for an exact repeat, since the engine is deterministic. The run's figures are read from its first session the next time lab_open or lab_runs lists it, and kept with the run. Local go run . runs are not recorded; name their sessions in the experiment's verdict.
Syndicates and the library
A syndicate is a group that shares labs: in every lab tool a shared lab is named syndicate:lab, members and their AIs write it, viewers read it. Runs of a member's workspace in a shared lab are recorded there as theirs, and lab_check finds a repeat across every lab the user can read.
The library holds frozen snapshots of decided experiments: hypothesis, protocol and verdict, the notes chosen, one result card per cited run, and optionally the code a run ran (refused unless it hashes to what the run ran). The platform reads each card's figures from the engine's record and signs them; the key is public (kdraigo.com/research/api/v1/public/card-key). A snapshot can be a draft, go to a syndicate, or (from the website, by a Verified or Pro account, citing only the author's own runs) go to everyone.
What other people wrote reaches the AI marked as data, never instructions. Anything that changes who sees what (invites, roles, sharing a whole lab, publishing to everyone) is the user's own click on the website, so a note written to steer an agent can't make it leak research.
Boards
A board is the user's arrangement of widgets on the website (kdraigo.com/boards): price charts with lines and panes (volume, and the collected market data: delta, CVD, large trades, buy and sell volume, and on perpetuals funding, open interest, long/short and liquidations) and optionally a backtest's trades, the live order book, a watchlist, trade flow, positioning, open interest and liquidations widgets, session stats, equity curves, a P&L calendar, a research lab at a glance, notes. A widget is data the website draws, never code: {type, title, params, at}, checked on every write against the catalog (widget_types). A refusal names the field (widgets[1] (w2).params.exchange: "binance_futures" is not one of binance, bybit); fix it and call again. The widget tools apply to the newest version of the board, and a board open on the website updates within seconds. Moving a board into a syndicate is the user's click on the website.
Chart scripts
A chart script is an indicator the AI writes in kdscript, kdraigo's own language in the shape of Pine Script v6 (script_reference is the whole guide; what it leaves out is listed there). The guide is also public, as plain Markdown, at kdraigo.com/kdscript.md and on the docs: an AI without the MCP can read it there. A price_chart widget draws scripts: params.scripts: [{"script": "my-rsi", "inputs": {"len": 21}}], by slug in the board's space (a syndicate's board draws the syndicate's scripts; sharing a board copies the scripts it draws). The data includes what TradingView doesn't give scripts: taker-buy volume, trade count, quote volume and funding.
kdscript 1.1 adds higher timeframes (request.security on the chart's pair, closed bars only),
colours that change per bar, bgcolor, barcolor, plotchar, switch, string inputs with
options and arrays. Every save is kept as a version (the newest 50), and the script library holds
scripts people shared, to read and fork. kdscript 1.2 adds ta.linreg, ta.correlation and
ta.percentrank, and plot.style_linebr lines stop at na bars. kdscript 1.3 adds
alertcondition(cond, title, message): armed with alert_create, the platform checks it on each
closed bar and sends the message to the user's Telegram. kdscript 1.4 adds drawn objects
(line, box, label, made and changed anywhere, kept in arrays, up to 500 of each) for order
blocks, gaps and structure breaks; strings (+, str.tostring, str.format, …) for label text;
plot offsets (a pivot drawn on the bar where it formed); and 64 plots instead of 16.
script_preview lists the objects a script leaves drawn.
The loop: script_reference → script_save (problems come back as line 4:12: …; nothing is saved until it passes) → script_preview on a pair to check the numbers → widget_add / widget_update a price chart with the script. Saving checks a script and never runs it. A preview runs it on the platform in an isolated runner (no network, capped memory and CPU, a step budget and 2 s); the website runs it in the user's browser in a background worker, so a broken script fails only in its own tile.
Vault (Obsidian)
A lab can live as a folder of markdown files on your machine, so Obsidian opens it with its graph and Claude Code reads it like any repo:
Files are named by title, so [[Funding drag]] opens Notes/Funding drag.md. Each file goes back over the version it was pulled at: a note your AI changed since is refused, never overwritten. A pull never overwrites your edits either; when both sides changed a note, the platform's text lands in .kdraigo/conflicts/ for you to merge, and the push after that sends the merge. Renaming a file in Obsidian renames the note (its links follow, on both sides); a new file in Notes/ becomes a new note; a deleted one is deleted on the platform only with --delete. In Claude Code the same works through vault_pull and vault_push.
Hosted server
kdraigo-mcp serve --http is the same tool set as a remote MCP server (streamable HTTP, stateless), as run at mcp.kdraigo.com. It leaves out scaffold_strategy, vault_pull and vault_push, which write to the caller's disk, and the replay tools; strategies run in the cloud workspace.
- Sign-in is OAuth 2.1 against the platform's authorization server (users_service), per the MCP authorization spec: an unauthenticated request gets
401withWWW-Authenticate: Bearer resource_metadata=…, and the server serves its protected-resource metadata (RFC 9728) at/.well-known/oauth-protected-resource[/mcp]. Apps register with a Client ID Metadata Document or Dynamic Client Registration, use PKCE S256, and get tokens bound to the server's URL. - Each request's token is introspected on users_service's internal port (cached for a minute) and must name this server as its audience.
- Platform calls are signed with an API key minted for that connected app (24 h, renewed): the app's token never leaves the server. Disconnecting the app on kdraigo.com's Account page revokes both.
- Limits per account: 120 tool calls a minute (bursts of 30), across all the account's connected apps, and 4 long calls (runs, builds, reports: the tools with the 180 s deadline) at once. Over a limit, the call answers with a tool error that says how long to wait, never an HTTP error, so the agent waits or tells the user why.
KDRAIGO_MCP_CALLS_PER_MINUTEandKDRAIGO_MCP_LONG_CALLSchange them. The gateway in front counts requests per sign-in token from the AI providers' published addresses and per address otherwise. - Configuration:
KDRAIGO_MCP_RESOURCE,KDRAIGO_MCP_ISSUER,KDRAIGO_MCP_USERS_INTERNAL_URL,KDRAIGO_MCP_INTERNAL_TOKEN,KDRAIGO_MCP_ADDR(seecmd/kdraigo-mcp/serve.go). TheDockerfilebuilds the image; theimageworkflow publishes it on a release tag.
Authentication model
Requests are signed with signing version 2, the only version the platform accepts since 2026-10-11 (kdraigo-mcp v1.0.9+, dev_sdk v1.3.0+). Every signed request carries:
X-Key-ID: your Ed25519 key UUIDX-Timestamp: Unix seconds, within 5 minutes of the server clockX-Nonce: 32 hex characters, new for every requestX-Signature: hex(ed25519(KDRAIGO-SIG-V2\nMETHOD\nPATH\nCANONICAL_QUERY\nTIMESTAMP\nNONCE\nhex(sha256(BODY))))
Each signature is accepted once, so a retry signs again. The backtester_engine uses uppercased variants (X-API-KEY / X-SIGNATURE / X-TIMESTAMP, with the same X-Nonce), and its WebSocket sends them as headers on the upgrade, not in the URL. The binary handles all of this.
Layout
Templates
The example_strategy repo holds three starter templates: basic, with-indicators, with-risk-manager. They're cloned at scaffold time so updates to templates ship without binary releases.
License
See LICENSE.
来源:README.md,提交 e2c1b1a
工具
0版本历史
1- v1.27.0最新Nov 7, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分