SatRank — Lightning trust + audit oracle

dev.satrankPublished by satrank.devv1.0.1Updated Oct 25, 2026

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

The publisher's own server: audit.domains - Domain Valuation

VerifiedSTDIODesktop onlyFinanceSecurity & Monitoring

Overview

AI-generated overview

Local MCP server that lets an assistant query SatRank's Lightning trust oracle for L402 endpoint scores, paid intent rankings, and offline verification of Nostr

What you can do
Request ranked L402 endpoint candidates by category, budget and SLA through the paid intent tool, which forwards to the SatRank API and costs sats via L402. Look up a single endpoint's score snapshot by its URL hash. Verify SatRank's signed Nostr trust assertions offline without network access.
When to use it
Useful when an assistant needs to choose among paid L402 endpoints and wants Bayesian success-probability scores or signed trust assertions to check offline. Not needed if you do not work with L402 or Lightning-paid APIs.
Requirements
Runs locally over stdio, typically via npx with the satrank-mcp npm package, so Node.js is needed. The SATRANK_API_BASE environment variable sets the API host and defaults to the public SatRank oracle. The paid intent tool requires a Lightning wallet or deposit macaroon to cover the 2-sat fee.
Before you install
The intent tool spends real sats per call through L402; deposit macaroons are bearer credentials that grant prepaid balance, so treat them as secrets. Queries and endpoint data go to the configured SatRank host, which may be a third party. Verification of assertions is offline, but scores come from that remote service.

Installation

In SourceWeft

  1. Open SatRank — Lightning trust + audit oracle in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

Source: README.md at commit 96690c5

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Audit integrations