Tradeledger

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 4, 2026

Read the iBitLabs live trading experiment: account status, recent trades, rules and saga.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

只读的 MCP 客户端,让助手引用 iBitLabs 实盘交易实验的真实数据:余额、交易、影子规则与叙事章节。

可以做什么
  • 读取账户状态:余额、总盈亏、胜率、交易次数、市场状态及当前持仓
  • 列出最近已平仓交易,含方向、平仓原因、盈亏、市场状态、MFE 与 MAE
  • 按已采纳、排队或全部筛选贡献者提出的影子规则
  • 查看单条规则的各分桶命中率及距晋升门槛的差距
  • 获取最新一篇叙事章节(英文或中文)
适用场景
适合希望助手引用实验真实数字而非编造合理数值的场景,例如回答当前表现、近期交易或规则进展相关的问题。
运行要求
通过 npx 或 Docker 以 stdio 在本地运行。无需也不接受任何凭据。所有调用转发到单一上游 MCP 端点,可用 IBITLABS_MCP_URL 配置(默认 设置单次请求超时。
安装前请注意
五个工具均为只读,没有下单、钱包或账户写入操作。调用会转发至第三方上游端点,查询内容与结果会离开本机。该端点与转发方式被标注为重建实现,数据取决于该上游,出错时返回以 tradeledger error: 开头的文本。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Tradeledger,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

tradeledger

A read-only window onto a live trading experiment. tradeledger lets an agent quote the experiment's actual state — its current balance and open position, the trades it has actually closed, the contributor shadow rules it runs, and the story it tells about itself — instead of inventing plausible numbers.

Nothing here trades. The five tools only read public data; there is no order, wallet, or account-write operation in the surface, and no credential is needed or accepted.

Tools

ToolArgumentsWhat it answers
get_live_status—Balance, total PnL, win rate, trade count, market regime, and the open position if one is running.
get_recent_tradeslimit (optional integer)The most recent closed trades, each with direction, exit reason, PnL, and regime.
list_adopted_rulesstatus (optional: adopted, queued, or all)The contributor-proposed shadow rules, filtered by where they stand.
get_rule_statusrule_id (required string)One rule's per-bucket hit rates and how far it sits from its promotion bar.
get_latest_saga_chapterlang (optional: en or zh)The newest entry in the experiment's narrated saga.

How it works

tradeledger is a forwarding client. A tool call is packaged as a JSON-RPC tools/call request and sent to a single upstream MCP endpoint; whatever the upstream returns is handed back untouched. When the upstream fails, the answer is an error text beginning tradeledger error: — never a locally invented figure.

Provenance

The endpoint and the forwarding shape are labelled reconstructions. The original server's public description names its data sources in prose but publishes no per-tool endpoint, so this rebuild points every call at one configurable upstream:

  • IBITLABS_MCP_URL — upstream MCP endpoint. Default: https://www.ibitlabs.com/api/mcp (labelled reconstruction).
  • REQUEST_TIMEOUT_MS — per-request timeout. Default: 15000.

Run it as an MCP server

json
{  "mcpServers": {    "tradeledger": {      "command": "npx",      "args": ["-y", "@reneturcios/tradeledger", "mcp"]    }  }}

Or in a container:

bash
docker run -i ghcr.io/cloudcorprecords/tradeledger

Run it as a CLI

bash
npx @reneturcios/tradeledger get_live_status '{}'npx @reneturcios/tradeledger get_recent_trades '{"limit": 2}'npx @reneturcios/tradeledger get_rule_status '{"rule_id": "F"}'npx @reneturcios/tradeledger --version

Each tool subcommand takes exactly one JSON object string with the tool's arguments and prints the result text. Exit codes are 0 on success, 1 on an error result, and 2 on a usage error.

Development

bash
npm installnpm run build   # tsc -> dist/ (dist/cli.js is the bin)npm test        # tsx --test test/*.test.ts — offline; the upstream is stubbednpm run dev     # tsx src/cli.ts — run the CLI from source

The test suite never touches the network: it drives the core with a stubbed JSON-RPC upstream whose payloads are the public worked-example responses, and checks they pass through untouched, that failures become tradeledger error: results, and that the served tool list matches the contracted five tools exactly.

License

MIT. See LICENSE.

来源:README.md,提交 3f47566

工具

5

get_live_status

Current balance, PnL, win rate, open position, reconciliation

无需输入参数。

get_recent_trades

Last N closed trades with entry/exit/PnL/regime/MFE/MAE

输入参数limit

list_adopted_rules

Contributor-proposed shadow rules (adopted | queued | all)

输入参数status

get_rule_status

Per-rule bucket hit-rates + distance from promotion bar

输入参数rule_id必填

get_latest_saga_chapter

Latest narrated saga entry (en | zh)

输入参数lang

版本历史

1
  1. v0.1.0最新Nov 4, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分