TrustBench

io.github.lithvall由 GitHub 账号 lithvall 发布v1.1.1更新于 Oct 27, 2026

x402 provider rankings + Ed25519-signed payment receipts + signature verification (3 tools).

已验证Streamable HTTP可网页运行网页搜索与抓取金融

概览

AI 生成的概览

TrustBench 让助手查询 x402 服务商的可用性排名、获取已签名的支付收据,并验证其 Ed25519 签名。

可以做什么
  • 按能力查询带评分的 x402 服务商,并附延迟与成功率遥测
  • 按 ID 获取路由或支付收据,查看付了什么、付给谁以及链上结算引用
  • 验证收据的 Ed25519 签名:可按 ID 由服务器重新拉取,也可用已保存的收据信封离线验证
适用场景
适合在 Base 上使用 x402 付费 API 调用的场景,需要判断哪些服务商当前有响应,或证明某笔支付已结算。它是读取与验证层,不是支付工具:路由与结算工具不在本次发布中。
运行要求
可作为远程端点使用,也可通过 npx 以本地 npm 包运行,本地方式需要 Node.js。随附的三个工具无需 API 密钥。需要 tb_live API 密钥的路由工具预告在后续版本提供。
安装前请注意
排名来自单台主机每晚三次 HEAD 探测,只是相对参考信号,并非严格基准测试。按 ID 验证收据依赖 TrustBench 服务可达,离线模式可避免此依赖。README 提到每次调用 0.005 美元的付费路由与 USDC 结算,但这些工具不在本次发布中。

安装

在 SourceWeft 中

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

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.lithvall%2Ftrustbench/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "trustbench": {
      "type": "http",
      "url": "https://trustbench.io/mcp"
    }
  }
}

README

TrustBench

Verify that x402 payments settled on-chain and get cryptographically signed proof. POST /verify with a receipt ID or raw envelope to confirm Ed25519 signature validity + on-chain settlement on Base, no trust required.

Also routes paid x402 calls with server-side spend caps, idempotency, and a fail-safe paywall (agent isn't charged when the upstream merchant is non-conformant). Non-custodial: TrustBench never holds funds. Every paid call emits an Ed25519-signed receipt verifiable offline against a published public key.

Cross-network: routes Base today, registers Solana endpoints (Heurist Mesh, Pay.sh skills), Solana settlement next.

What's live today

  • Public registry of x402 endpoints across Base (Coinbase Agentic Market, ~650 services) and Solana (Heurist Mesh, ~150 endpoints) — Solana inventory is in the database today and surfaces on /rankings once the network filter is dropped (P4-3a, see phase4-p4-3-timing.md)
  • Nightly liveness probe (HEAD requests from a single cloud host, 3 samples per provider, statuses 200/201/204/401/402/403/404/405/429 treated as alive)
  • Score derivation: 15 + 45·successRate + 35·latencyHealth + 3·consistency, clamped to [40, 98], via linear-interpolation percentiles
  • Ed25519-signed scorecards, public key at /.well-known/trustbench-pubkey
  • Routing and settlement on Base + USDC (Phase 3); Solana is roadmap (P4-3)
  • Methodology disclosure at /methodology

Phase 3 + 4 (live since 2026-05-04 / 2026-05-06)

  • Authenticated POST /route endpoint with API-key auth (argon2id), idempotency keys, hard spend caps, and Ed25519-signed receipts
  • /route/settle endpoint forwarding agent-signed EIP-3009 authorizations
  • Queryable audit at /receipts/:id
  • Strict reservation-based spend caps (P4-7)
  • Discovery surfaces: /skill.md, /llms.txt, /.well-known/trustbench.json
  • First paid x402 receipt against a real provider, settled on Base 2026-05-06: rcpt_01KQY7C44GAPSXZPFQYRZ1D10C — verifies SIGNATURE VALID + ON-CHAIN VERIFIED with no overrides.

In flight (Phase 4b)

  • x402-paywalled API endpoints (per-call USDC pricing surface)
  • Public receipt explorer at /explorer
  • Formal partner integrations
  • Solana routing (registry pre-built, network filter to drop)
  • npm verifier package @trustbench/verify-receipt

Claude Desktop / MCP

TrustBench ships a native MCP server so agents in Claude Desktop, Claude Cowork, ChatGPT, or Cherry Studio can look up providers, fetch receipts, and verify signatures without any HTTP-fetch workaround.

Add to claude_desktop_config.json (or your host's equivalent MCP settings file):

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

Restart the host app after saving. Three tools become available:

  • get_rankings — scored providers by capability. No API key.
  • get_receipt — fetch any receipt by ID (rcpt_… / rrcpt_…). No API key.
  • verify_receipt — confirm Ed25519 signature + on-chain status. No API key.

Routing tools (route_quote, route_settle) require a tb_live_… API key and ship in the next MCP release. Request access by DM'ing @TrustBench on X.

What we don't do

  • We never hold agent funds, never submit transactions on-chain, never act as a payment facilitator. Agents sign EIP-3009 transferWithAuthorization payloads; providers submit them on-chain and pay gas. TrustBench observes the resulting tx_hash and records it in a signed receipt.

Pricing model

  • x402-native paywalled API endpoints, per-call USDC settlement on Base
  • No subscriptions, no contracts, no per-seat or per-month charge
  • v0.1.0 ships POST /route at $0.005 per call (score-provider tier); full tier table at /pricing (HTML for humans, JSON for agents via Accept: application/json or ?format=json)
  • Settlement through the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402 (the public x402.org/facilitator is testnet-only). TrustBench never holds funds; the agent's wallet signs and the facilitator submits on-chain.
  • Existing partner agreements override the published table for that partner. Reach out for partner-volume credit before integration.
  • Registry listing is currently free and automatic (crawled from public x402 catalogs). A refundable provider verification bond is a design intent, not a shipped mechanism. Never pay-to-rank — routing decisions are measurement-based.

Stack

TypeScript + Hono (API) + Supabase (Postgres + RLS) + ioredis (Upstash Redis cache) + tsx runtime. Deployed on Railway. Nightly probe pipeline + autonomous X posting via GitHub Actions.

Quick start

bash
npm installcp .env.example .env   # fill in Supabase + Upstash credentialsnpm run pipeline       # probe + score (writes to Supabase)npm run dev            # run the API locally

Endpoints

Public (no auth):

  • GET /health — liveness check for the API itself
  • GET /rankings?capability=search — ranked providers for a capability (search, inference, data)
  • GET /rankings/paid?capability=search — same as /rankings but with each provider's signed scorecard
  • GET /route?capability=search — current best provider + fallback (legacy read-only — the Phase 3 routing surface is POST /route)
  • GET /mcp/tools — MCP tool descriptor catalog (JSON schema). For native tool use, see the Claude Desktop / MCP section above.
  • GET /analytics — plain HTML dashboard
  • GET /methodology — full description of what the probe does and does not measure
  • GET /skill.md — agent skill file in the agentic.market/skill.md format. Paste into Claude Code, Codex, Gemini CLI, Hermes, Cursor, Claude Desktop, Cherry Studio, or ChatGPT to teach the agent the TrustBench quote/settle flow as an additive policy + receipt layer on top of Coinbase Agentic Wallet.
  • GET /llms.txt — LLM-grounded research summary in llmstxt.org format
  • GET /pricing — public, honest pricing for paid endpoints. Content-negotiated: HTML for humans, JSON for agents via Accept: application/json or ?format=json. Returns a 7-row tier table with live / planned (v0.2.0) / planned (v0.3.0) status badges per endpoint.
  • GET /.well-known/trustbench.json — machine-readable manifest of TrustBench's public surfaces, capabilities, signing scheme, and discovery references. Includes an endpoints array with paid annotations matching /pricing.
  • GET /.well-known/trustbench-pubkey — Ed25519 public key (PEM) for verifying scorecards and receipts

Authenticated (Phase 3, in build):

  • POST /route — quote step. Authorization: Bearer tb_…, Idempotency-Key: <16–128 chars>, body {capability, max_price (atomic-unit string), payer_address}. Returns {route_id, payment_required, expires_at, fallback_provider}. Quote validity is 5 minutes; settling after that returns 410.
  • POST /route/settle — settle step. Body {route_id, signature} where signature is the agent's EIP-3009 transferWithAuthorization signature. Returns {response, receipt} plus X-Receipt-Id header. Idempotent on (route_id, signature): replays return x-idempotent-replay: true with the cached receipt and never re-call the merchant.
  • GET /receipts/:id — public, no-auth, immutable. Returns the exact signed envelope ({receipt, signature}) that was issued. Cache-Control: public, max-age=86400, immutable.

Verifying a receipt

Receipts are Ed25519-signed over the JCS-canonicalized form of envelope.receipt. The signature block (including public_key_url) is detached and not part of the signed bytes, so it can be overridden at verification time without invalidating the chain of trust.

Reference verifier: scripts/verify-receipt.js.

bash
# By id, against a deployed instancenpm run verify-receipt -- rcpt_01HV3K8M5C9X2ZBFYR4QWP8ND1 https://your.trustbench.deployment
# From a saved JSON filenode scripts/verify-receipt.js ./receipt.json
# Override pubkey URL when the receipt's public_key_url isn't reachable# from your network (useful for local-dev verification of locally-issued receipts)node scripts/verify-receipt.js ./receipt.json --pubkey-url http://localhost:3000/.well-known/trustbench-pubkey

Failure semantics

TrustBench down ≠ payments down. This is an architectural property, not a feature flag.

The agent's payment authorization is an EIP-3009 signature it produces with its own key. The merchant accepts that signature and submits the on-chain transaction. TrustBench sits between them as a router and audit layer — it constructs the quote and records the result, but it never holds funds, never signs the payment, and never broadcasts the transaction.

If the TrustBench API is unavailable, an agent can still:

  • Transact directly with any x402 provider it already knows about, using the same EIP-3009 signing flow.
  • Submit and verify receipts after the fact (the verifier is a standalone script and the public key is served from /.well-known/trustbench-pubkey).

What it temporarily loses while the API is down:

  • Routing decision (which provider scored best at this moment).
  • Server-enforced spend caps (the agent must enforce caps locally if it cares).
  • Signed receipts for any calls made during the outage.

Existing receipts remain verifiable — the public key and JCS canonicalization rules are stable, and the receipt's audit_url is a hint, not a dependency.

Paywall (Phase 4 v0.1.0)

POST /route is paywalled when TRUSTBENCH_PAYWALL_ENABLED=true on the deployment. The flow is x402-native end-to-end:

  1. Agent calls POST /route with no X-PAYMENT header.
  2. TrustBench responds 402 Payment Required with x402 payment requirements pointing at the TrustBench revenue wallet on Base. Price: $0.005 USDC.
  3. Agent signs an EIP-3009 transferWithAuthorization for the routing fee and retries the call with an X-PAYMENT header carrying the signed envelope (use any x402 client; the modular @x402/core + @x402/evm SDKs are the reference).
  4. TrustBench verifies the payment with the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402, settles it on-chain, selects the best provider via the live registry, and returns 200 with an Ed25519-signed routing receipt plus payment requirements for the agent's NEXT call (to the upstream provider).
  5. The agent then pays the provider directly via a second x402 transaction. TrustBench is out of the loop after step 4.

Two payments per call (TrustBench fee + provider fee), both non-custodial. Receipts cover the routing decision; the provider transaction is a separate x402 envelope the agent owns end-to-end.

Discovery. Paid endpoints carry paid: true annotations alongside the free ones in /skill.md and /.well-known/trustbench.json. v0.2.0+ endpoints are listed with available_in tags so agent builders see the roadmap shape.

Verifying a routing receipt. Same Ed25519 + JCS canonicalization as Phase 3 settlement receipts, with kind: "paid_response.route". Use the npm verifier:

bash
npm install @trustbench/verify-receipttrustbench-verify-receipt ./routing-receipt.jsontrustbench-verify-receipt ./routing-receipt.json --check-chain   # also re-verify the on-chain tx

Server-side controls (v0.1.1). Two safeguards run on every paywalled call:

  • Per-paying-wallet hourly rate limit. Default 60 paid calls per hour per agent_address. Tunable via TRUSTBENCH_PAYWALL_HOURLY_LIMIT (set to 0 to disable). Returns 429 with Retry-After: 60 when exceeded.
  • Idempotency-key replay with replayed_at marker. Idempotency-Key header (16-128 chars) honored on every paywalled call. Same key + same body within 24 hours returns the original signed receipt with a top-level replayed_at field added outside the signed bytes — original signature stays valid, downstream consumers can distinguish fresh from replayed. Same key + different body returns 409.

Failure modes. Documented in detail in the Critic-pass header at the top of src/paywall-handler.ts. Live facilitator is the Coinbase CDP facilitator at api.cdp.coinbase.com/platform/v2/x402; the original "Foundation facilitator first, swap to CDP later" plan was disproven on 2026-05-11 when settle-tests confirmed the Foundation facilitator is testnet-only (see lessons.md 2026-05-11 entry). Current hidden assumption: CDP facilitator stays stable and within plan limits. Kill criterion: if CDP returns 5xx or auth-errors >5% of calls in the first 4 weeks, fall back to PayAI-mediated settlement.

What Phase 3 deliberately does not do

These are limits in the current implementation, called out so consumers don't infer behavior the system doesn't actually deliver:

  • Single-merchant routing. POST /route serves one capability against one selected provider per call. Multi-merchant fan-out (one intent → multiple paid APIs → one envelope) is Phase 4.
  • Receipt content is not yet on-chain anchored. Receipts are Ed25519-signed by TrustBench. They are not Merkle-batched into a public blockchain. On-chain anchoring is a Phase 5 consideration if real demand surfaces.
  • Single-chain settlement today. Routing + settlement is Base + USDC. Solana inventory is registered but not yet routable (P4-3 next).

Methodology disclosure

The probe is a HEAD-request liveness check from a single host, three samples per provider per night. Status codes 200, 201, 204, 401, 402, 403, 404, 405, and 429 are treated as alive (the provider is responding; only the auth/payment gate is closed).

This is not a benchmark in the rigorous sense. Latency is wall-clock from a single network vantage. Score latencyHealth is derived from linear-interpolation percentiles across the cohort — useful as a relative signal, not as a service-level claim. Full description at /methodology.

License

MIT.

来源:README.md,提交 14d4320

工具

3

get_rankings

Get Provider Rankings

Get TrustBench liveness rankings for x402 providers by capability. Returns a scored list of providers with latency and success-rate telemetry. Methodology note: scores are derived from HEAD-probe liveness checks (3 samples from one host), not a rigorous benchmark. See trustbench.io/methodology. Output: returns a JSON array. Each object has name (string, provider name), score (number 0-100, composite liveness score), latency_p50 (number, ms), success_rate (number 0.0-1.0, last 7 days), endpoint (string, URL), capabilities (array of strings).

输入参数capability必填

get_receipt

Fetch Payment Receipt

Fetch a TrustBench routing receipt by ID. Receipts are immutable, Ed25519-signed records of a routing or payment event. Use to verify what was paid, to whom, for what capability, and what the on-chain settlement reference is. IDs start with rcpt_ (Phase 3) or rrcpt_ (Phase 4). Output: returns the signed receipt envelope as JSON. Phase 3 (rcpt_) returns a SignedReceipt with receipt (call metadata + settlement ref) and signature (Ed25519 over JCS-canonicalized receipt body). Phase 4 (rrcpt_) returns {receipt, signature} where receipt.paid contains routing details and signature covers the canonical envelope. To verify an envelope offline use the verify_receipt tool with the returned JSON, or @trustbench/verify-receipt npm.

输入参数receipt_id必填

verify_receipt

Verify Receipt Signature

Verify the Ed25519 signature on a TrustBench receipt. Two modes: (1) Lookup mode — pass receipt_id and the server fetches the receipt from trustbench.io and re-runs verification (handy when you only have an ID). (2) Offline mode — pass receipt_json (the full {receipt, signature} envelope an agent received from a third party) and the server verifies the Ed25519 signature against the published public key at trustbench.io/.well-known/trustbench-pubkey without trusting the database. Exactly one of receipt_id or receipt_json must be provided. Output: returns JSON with receipt_id, signature_valid (boolean), on_chain_verified (boolean, where present), signature_alg ("ed25519"), verify_url, pubkey_url. For non-server-mediated verification with no network round-trip, use the @trustbench/verify-receipt npm package.

输入参数receipt_idreceipt_json

版本历史

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

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。