Computeledger

io.github.RudrenduPaul由 GitHub 帳號 RudrenduPaul 發布v0.1.3更新於 Oct 24, 2026

Signs, hash-chains, and verifies compute usage receipts via an MCP server, no issuer trust required.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理以 Ed25519 金鑰簽署、以雜湊鏈記錄並驗證算力使用回執,無須信任簽發方。

可以做什麼
記錄含供應商、硬體、時長、GPU 小時與工作負載類型的已簽署算力使用回執,附加到本機雜湊鏈帳本並以簽署 JSON 回傳。離線驗證單筆回執的簽章與雜湊完整性。列出本機帳本中的所有回執。驗證整個帳本中每筆記錄的簽章以及未中斷的雜湊鏈。
適用情境
適合需要可攜、可離線驗證的算力使用紀錄(GPU 小時、硬體、時長),且希望第三方無須信任供應商即可查核的情境。適合讓代理在執行運算工作時記錄或稽核,而非用於编排或成本儀表板。
執行需求
以本機 stdio 程序執行,通常透過 uvx 從 computeledger-cli 這個 PyPI 套件啟動(npm 套件提供相同指令)。需要 Python 3.10+ 或 Node.js 18+。無須帳號、API 金鑰或網路存取;Ed25519 金鑰對在本機產生並存放於 ~/.computeledger 或 ./.computeledger 下。
安裝前請注意
伺服器會寫入本機帳本並在磁碟上建立私鑰檔案;持有該金鑰者可偽造回執。金鑰檔案使用 POSIX 600 權限,Windows 不會強制執行。上游未持續測試 Windows 與 macOS。回執的準確性取決於傳給 record_usage 的使用資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Computeledger,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

ComputeLedger

[CI] [npm version] [PyPI version] [License: Apache-2.0] [Node]

Install • Quickstart • Features • CLI reference • Comparison • FAQ

[ComputeLedger - Cryptographically signed compute-usage receipts | Product Hunt]

Sign, hash-chain, and independently verify compute usage, portable across any provider.

[ComputeLedger demo: computeledger keys generate --local, computeledger record --local, and computeledger ledger verify --local running against the real CLI]

ComputeLedger records a compute job's usage (GPU-hours, hardware, duration, workload type) as a cryptographically signed receipt and appends it to a tamper-evident local ledger. Anyone can verify a receipt's authenticity and the ledger's integrity without trusting the issuer, and without buying into any single cloud, chain, or vendor's stack.

Install

bash
npm install -g computeledger-cli
bash
pip install computeledger-cli

Both packages install the same computeledger command. Receipts are interoperable either way: a receipt signed by the npm binary verifies correctly with the PyPI binary, and vice versa.

Quickstart

bash
$ computeledger keys generate --localGenerated Ed25519 keypair.Public key: COxK/lkoWxWB42QKXjvcHnmBPozH4Oo2JHoOKDjsoU8=Private key: ./.computeledger/keys/ed25519.pem (mode 600)
$ computeledger record --local --provider aws --hardware nvidia-h100 \    --duration-seconds 3600 --gpu-hours 1 --workload-type trainingRecorded usage receipt 39952199-0897-48b8-92c5-e351f773c83d.
$ computeledger ledger verify --localLedger valid: 1 entries, unbroken hash chain.

Or wrap a real job directly, no manual record call needed:

bash
computeledger run --local --provider on-prem --hardware nvidia-a100 -- python train.py

run executes the wrapped command as a real subprocess (never through a shell), measures wall-clock duration, samples GPU utilization via nvidia-smi when one is present, and signs + appends the resulting receipt automatically. On a machine with no NVIDIA GPU, it still produces a duration-only receipt.

[ComputeLedger run --wrap demo: computeledger run --local --provider on-prem --hardware nvidia-a100 -- sleep 1 wraps a real job, measures duration, and signs the receipt automatically]

Give the receipt to anyone, on any machine, with no ComputeLedger account and no network call:

bash
computeledger verify receipt.json

Why this exists

Multi-cloud and multi-provider GPU usage has no portable, verifiable record. A cost dashboard tells you what a provider says you used; it does not let a third party independently confirm that record wasn't altered after the fact, and it only works with the providers it integrates with. ComputeLedger is a lightweight, provider-agnostic attestation format: any process that can run a CLI command or call an MCP tool can produce a receipt, and any process, in any language, can verify one.

This is deliberately narrow. It does not compete with GPU marketplaces, cost dashboards, or confidential-computing platforms, all of which do real, different jobs. See the comparison below for exactly where the line is.

Features

  • Ed25519 signatures via Node's and Python's built-in/standard crypto libraries. No bespoke cryptography, no external crypto dependency on the TypeScript side.
  • Hash-chained ledger. Every receipt embeds the previous receipt's hash. Deleting, reordering, or editing a historical entry breaks the chain in a way ledger verify detects, even if the tampered entry's own signature still looks locally valid.
  • Cross-language interoperability by construction. A receipt signed by the npm package's computeledger binary verifies correctly against the PyPI package's computeledger binary. Both implementations serialize the receipt payload through the same deterministic canonical-JSON algorithm before hashing.
  • Provider-agnostic. No account, no API key, no dependency on any specific cloud or chain. Works identically on a laptop, an on-prem cluster, or any cloud VM.
  • Agent-native. Every subcommand supports --json for structured output, and computeledger mcp starts a Model Context Protocol server exposing record_usage, verify_receipt, list_ledger, and verify_ledger as callable tools.
  • No shell-injection surface. computeledger run -- <command> executes the wrapped command via an argument array, never a shell string, so metacharacters in the wrapped command are inert.

CLI reference

computeledger keys generate [--local]computeledger keys show [--local] [--json]computeledger run [--local] [--provider <name>] [--hardware <type>] [--workload-type training|inference|unknown] [--no-record-command] [--json] -- <command...>computeledger record --provider <name> --hardware <type> --duration-seconds <n> [--gpu-hours <n>] [--flops <n>] [--workload-type <type>] [--local] [--json]computeledger verify <receipt.json> [--json]computeledger ledger list [--local] [--json]computeledger ledger show <id> [--local] [--json]computeledger ledger verify [--local] [--json]computeledger export --format json|csv [--out <file>] [--local]computeledger mcp
FlagMeaning
--localUse ./.computeledger in the current directory instead of ~/.computeledger
--jsonStructured JSON on stdout instead of human-readable text
--no-record-commandOmit the wrapped command string from the receipt (run only)

[ComputeLedger CLI walkthrough: keys generate --local, record --local, ledger list --local --json, and export --format csv --local running end to end against the real CLI]

MCP Server

ComputeLedger ships a Model Context Protocol server so an AI agent (Claude, Cursor, or any MCP-compatible client) can record and verify compute usage receipts directly, without a human invoking the CLI by hand. The Python package exposes the server as a subcommand rather than a separate console script, so computeledger mcp is the real invocation, not computeledger-mcp.

bash
pip install computeledger-cli

Add it to your MCP client's config (for Claude Desktop, claude_desktop_config.json):

json
{  "mcpServers": {    "computeledger": {      "command": "uvx",      "args": ["--from", "computeledger-cli", "computeledger", "mcp"]    }  }}

The server exposes four tools, matching the CLI one-for-one:

  • record_usage(provider, hardware, durationSeconds, gpuHours?, estimatedFlops?, workloadType?, local?): signs a usage entry with the local Ed25519 key, appends it to the hash-chained ledger, and returns the signed receipt.
  • verify_receipt(receipt): independently verifies a receipt's signature and hash integrity.
  • list_ledger(local?): lists every receipt recorded in the local ledger.
  • verify_ledger(local?): verifies every entry's signature plus the unbroken hash chain across the whole ledger.

Example call:

record_usage(provider="lambda-labs", hardware="nvidia-h100", durationSeconds=3600, gpuHours=1, workloadType="training")

Transport is stdio, so there is nothing to host: the MCP client spawns the server as a local subprocess. Source: python/src/computeledger/mcp/server.py.

The npm package exposes the same four tools through the native TypeScript server (src/mcp/server.ts), invoked the same way with npx computeledger-cli mcp. Both implementations are cross-verified interoperable, and every tool returns the same structured JSON shape the CLI's --json mode produces.

Library API

ts
import { createReceipt, verifyReceipt, Ledger, verifyChain, loadKeyPair, resolvePaths } from "computeledger-cli";
python
from computeledger import create_receipt, verify_receipt, Ledger, verify_chain, load_key_pair

Comparison

ComputeLedger occupies a narrow, specific gap: a portable, cryptographically verifiable usage receipt that doesn't require adopting any single provider's chain or platform. It is not trying to replace the tools below, each of which does a real, different job.

ComputeLedgerSkyPilotOpenCostAICert
What it isSigned, portable usage receiptsMulti-cloud job orchestration + costKubernetes/cloud cost monitoringTraining-provenance attestation
Cryptographic verificationYes (Ed25519, offline)NoNoYes (TPM-based)
Provider lock-inNoneOrchestrates specific cloudsKubernetes/cloud-nativeNone
Tamper-evident historyYes (hash-chained ledger)NoNoNo (single artifact, no chain)
GitHub starsNew10,4416,659 (CNCF)20
Project activityActiveActiveActiveNo commits since June 2024
Agent-native (MCP/--json)YesPartial (API/SDK)NoNo

SkyPilot and OpenCost solve real, adjacent problems (running jobs across clouds, and visualizing what they cost) at far larger scale and maturity than this project. Neither produces a signed, independently verifiable usage record. AICert attempted training-compute provenance as a standalone OSS tool using TPM-bound attestation and has had no commits since June 2024; ComputeLedger's scope is deliberately narrower (a usage receipt, not a full training-provenance framework) and ships both an npm and a PyPI package from day one specifically so the receipt format isn't locked to one language's ecosystem.

What is ComputeLedger, and why does it exist

ComputeLedger is an open-source CLI, library, and MCP server for producing and verifying cryptographically signed records of compute usage. It exists because compute usage claims (GPU-hours consumed, hardware used, workload duration) currently have no portable, offline-verifiable proof format: a billing dashboard is only as trustworthy as the provider issuing it, and it only covers that one provider. ComputeLedger's receipts are self-contained, signed JSON objects that any party, on any machine, in either of two independently maintained language implementations, can verify without a network call or a trusted third party.

FAQ

Does ComputeLedger require an account or API key? No. Everything runs locally. Keys are generated and stored on your own machine (~/.computeledger or ./.computeledger with --local).

Can a receipt be forged? Not without the private key used to sign it. verify recomputes the payload hash and checks the Ed25519 signature against the embedded public key; the public key itself is part of the signed payload, so substituting a different key changes the hash and invalidates the receipt.

What happens if there's no GPU? computeledger run degrades gracefully: it records wall-clock duration and whatever --hardware/--provider you specify, and simply omits GPU utilization samples if nvidia-smi isn't found.

Does this compete with SkyPilot or OpenCost? No, see the comparison table above. Those tools solve orchestration and cost visibility; ComputeLedger solves independent verifiability of a usage claim. The two are complementary: run SkyPilot or OpenCost for orchestration and cost, and drop ComputeLedger in wherever you need a signed record.

Is the receipt format a blockchain? It's a local, hash-chained, append-only log, similar in spirit to a Merkle log or a git commit chain. There's no token, no consensus mechanism, and no network involved.

Does ComputeLedger work on Windows? The npm and PyPI packages install and run on any platform Node.js 18+ or Python 3.10+ supports, including Windows. One caveat: private key files are written with POSIX permission bits (mode 600), which restrict access on Linux and macOS; Windows does not enforce the same POSIX permission model, so the file is written but the access restriction has no equivalent effect there. CI currently runs on Linux only, so Windows and macOS are not continuously tested upstream.

Can I use ComputeLedger for commercial projects? Yes. Both the TypeScript and Python packages are licensed Apache-2.0, which permits commercial use, modification, and redistribution, including in closed-source products, as long as the license and copyright notice are preserved.

What if I need multi-cloud orchestration or a cost dashboard instead? ComputeLedger doesn't do either. It only produces and verifies signed usage receipts. Pair it with SkyPilot for orchestration or OpenCost for cost visibility if you need those.

Contributing

Issues and pull requests are welcome. Run npm test (TypeScript) or pytest (python/) before opening a PR: both language implementations ship a full test suite, and any change touching the receipt or canonical-JSON format must keep both sides interoperable (see CONTRIBUTING.md).

License

Apache-2.0

來源:README.md,提交 25039f6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

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

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