SatRank — Lightning trust + audit oracle

dev.satrank由 satrank.dev 发布v1.0.1更新于 Oct 25, 2026

Lightning trust + audit oracle. Score, pay, and audit L402 endpoints with Ed25519 receipts.

发布方自己的服务:audit.domains - Domain Valuation

已验证STDIO仅桌面金融安全与监控

概览

AI 生成的概览

本地 MCP 服务器,让助手查询 SatRank 的 Lightning 信任预言机,获取 L402 端点评分、付费意图排名,并离线验证 Nostr 断言。

可以做什么
通过付费的 intent 工具按类别、预算和 SLA 请求 L402 端点候选排名,该工具转发到 SatRank API 并按 L402 收取 sats。按 URL 哈希查询单个端点的评分快照。离线验证 SatRank 签名的 Nostr 信任断言,无需网络。
适用场景
当助手需要在付费 L402 端点之间做选择,并希望获得贝叶斯成功概率评分或可离线核验的签名信任断言时适用。若不涉及 L402 或 Lightning 付费 API,则无需使用。
运行要求
通过 stdio 本地运行,通常用 npx 启动 satrank-mcp npm 包,因此需要 Node.js。环境变量 SATRANK_API_BASE 指定 API 主机,默认指向公共 SatRank 预言机。付费 intent 工具需要 Lightning 钱包或存款 macaroon 支付 2 sats 费用。
安装前请注意
intent 工具每次调用都会通过 L402 花费真实 sats;存款 macaroon 是可用于预付费余额的持有者凭证,应视为机密。查询和端点数据会发送到所配置的 SatRank 主机,可能是第三方。断言验证在本地离线完成,但评分来自该远程服务。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

SatRank

Lightning trust oracle for AI agents on L402. Bitcoin-pure.

What this does

  • Crawls the L402 ecosystem (l402.directory + RSS + DNS) to build a catalogue of paid endpoints.
  • Probes each endpoint, classifying outcomes across 5 stages: challenge / invoice / payment / delivery / quality.
  • Scores every (endpoint, stage) pair as a streaming Beta(α, β) posterior. The end-to-end success probability is the product of stage means.
  • Ranks candidates on POST /api/intent (paid 2 sats via L402): an agent passes a category + budget + SLA, gets back the top-K endpoints with full Bayesian breakdown.
  • Publishes signed Nostr trust assertions (kind 30782) so any agent can cache / verify SatRank's output offline.

Public endpoints

Doc surfaces:

GET  /                                 landing page (static HTML)GET  /methodology                      technical reference (static HTML)GET  /api                              API reference (static HTML)GET  /openapi.json                     OpenAPI 3.0 spec (machine-readable)

Functional API (nine routes — POST /api/intent is the only L402-gated one):

POST /api/intent                       paid, 2 sats via L402POST /api/deposit                      free, mint a multi-use deposit macaroon (10–10000 sats, 30-day TTL)GET  /api/deposit/:macaroon_id         free, read remaining balanceGET  /api/services/:url_hash           free, per-endpoint score snapshotGET  /api/services/categories          free, list of catalogue categoriesGET  /api/services/best                free, top-3 per category (5-min cache)GET  /api/oracle/budget                free, last 24h revenue + paid-probe spendGET  /health                           free, livenessGET  /.well-known/satrank-key          free, oracle pubkey for offline verify

Deposit macaroons let an agent pre-pay N sats once and use the bearer preimage across many /api/intent calls without a Lightning round-trip per call. Authorization: L402 deposit_<id>:<preimage_hex>.

MCP

Three tools for any MCP-compatible AI runtime (Claude Code, Cursor, Codex, n8n):

intent              forwards POST /api/intent (paid)get_endpoint_score  forwards GET /api/services/:url_hash (free)verify_assertion    offline Schnorr verification of kind 30782 (no network)

Install in Claude Code:

bash
claude mcp add satrank -- npx -y satrank-mcp

Self-hosters point SATRANK_API_BASE at their own deployment.

Architecture

14 source files + 4 doc surfaces (3 HTML pages + OpenAPI spec). Read top-to-bottom in 30 minutes.

src/├── types.ts             Stage, Posterior, Endpoint, Observation├── config.ts            zod env schema, parsed once at boot├── logger.ts            JSON-line stdout├── db.ts                pg Pool + idempotent schema bootstrap├── schema.sql           9 tables in ONE file (no migrations folder)├── lnd.ts               minimal LND REST client (addInvoice + payInvoice)├── ssrf.ts              RFC1918 + link-local + IPv6 ULA URL guard├── nostr.ts             kind 30782 sign + publish + offline verify├── scoring.ts           Beta(α,β) per stage, Wilson CI95, ranker├── probe.ts             HTTP probe with optional L402 pay├── crawler.ts           l402.directory + RSS + DNS + cron├── api.ts               Express; 9 functional routes + 4 doc surfaces, native L402 paid gate, deposit credits├── mcp.ts               MCP server, 3 tools, ships verbatim to npm├── landing.html         static landing served at GET /├── methodology.html     technical reference served at GET /methodology├── api-reference.html   API reference served at GET /api├── openapi.json         OpenAPI 3.0 spec served at GET /openapi.json└── index.ts             boot + shutdown

Run it

bash
cp .env.example .env# minimum: set DATABASE_URL
npm installnpm run buildnpm start

For paid probes + paid /api/intent gate, set LND_REST_URL + LND_MACAROON_HEX + L402_MACAROON_SECRET. For Nostr trust assertions, set NOSTR_PRIVATE_KEY.

Scoring math

For each (endpoint, stage), maintain a Beta(α, β) posterior with α₀ = β₀ = 1 (uniform prior). On every observation:

  • success → α += 1
  • failure → β += 1

Stage mean: α / (α+β). 95% credible interval via Wilson (closed-form). End-to-end success: ∏ stage_means across the 5 stages, assuming stage independence.

is_meaningful is true iff the challenge stage has at least MEANINGFUL_N_OBS_MIN observations. The challenge stage is observed on every probe (free or paid), so its n_obs converges fastest. p_e2e remains the honest end-to-end product separately.

License

AGPL-3.0

来源:README.md,提交 96690c5

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

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

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Audit 集成