Lumi Verdict: check an x402 seller before paying

Registre officiel Autres

One signed label before paying an x402 seller, from Lumi's test-buys on XRPL, Base and Stellar

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package lumi-verdict-mcp
Claude Code
claude mcp add lumi-verdict-check-an-x402-seller-before -e 'EVM_PRIVATE_KEY=<your evm_private_key>' -e 'XRPL_SEED=<your xrpl_seed>' -e 'LUMI_PAY_ASSET=<LUMI_PAY_ASSET>' -e 'LUMI_MAX_USD_PER_CALL=0.30' -e 'LUMI_MAX_XRP_PER_CALL=0.25' -e 'LUMI_SESSION_BUDGET=1' -e 'XRPL_NETWORK=xrpl:0' -- npx -y lumi-verdict-mcp@0.1.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "lumi-verdict-check-an-x402-seller-before": {
            "command": "npx",
            "args": [
                "-y",
                "lumi-verdict-mcp@0.1.0"
            ],
            "env": {
                "EVM_PRIVATE_KEY": "<your evm_private_key>",
                "XRPL_SEED": "<your xrpl_seed>",
                "LUMI_PAY_ASSET": "<LUMI_PAY_ASSET>",
                "LUMI_MAX_USD_PER_CALL": "0.30",
                "LUMI_MAX_XRP_PER_CALL": "0.25",
                "LUMI_SESSION_BUDGET": "1",
                "XRPL_NETWORK": "xrpl:0"
            }
        }
    }
}

Variables d'environnement

  • EVM_PRIVATE_KEY secret 0x private key of your Base wallet that pays in USDC (gasless, signed locally)
  • XRPL_SEED secret Seed of your XRPL wallet that pays in XRP/RLUSD/USDC (signed locally)
  • LUMI_PAY_ASSET BASE_USDC, XRP, RLUSD or USDC (XRPL). Default: BASE_USDC if only EVM_PRIVATE_KEY is set, else XRP
  • LUMI_MAX_USD_PER_CALL Per-call cap in USD for stablecoins (covers every Lumi endpoint)
  • LUMI_MAX_XRP_PER_CALL Per-call cap in XRP
  • LUMI_SESSION_BUDGET Max total spend per server process
  • XRPL_NETWORK xrpl:0 mainnet or xrpl:1 testnet

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Lumi API
  2. Quickstart
  3. Endpoints and pricing
  4. How Lumi tests sellers
  5. Run locally
  6. Deploy
  7. Disclaimer
  8. License

Lumi API

x402 seller trust you can verify. Lumi Trades (lumitrades.io) checks x402 sellers before an agent pays them: a live pre-payment check of the seller's 402 quote, Lumi's own paid test-buys with signed receipts, and a one-line verdict. Paid checks cost $0.01 to $0.02 and settle through x402 v2 in XRP, RLUSD or USDC on the XRP Ledger, or in USDC on Base or Stellar. Discoverable over x402, OpenAPI, MCP and A2A.

Automated observations by Lumi, not a rating, endorsement or guarantee. Information only, not financial advice. Paying never changes a score: seller-funded test-buys go into the seller's private monitoring history, not their public result.

Quickstart

Free first: /v1/check (free cached pay-check), /v1/trust/vendors (seller observations), /v1/samples (labelled samples of every paid check), /llms.txt. Open api.lumitrades.io in a browser for the human quickstart.

USDC on Base, official x402 fetch SDK (examples/base-x402-fetch.ts):

// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`) });
const res = await wrapFetchWithPayment(fetch, client)("https://api.lumitrades.io/v1/trust/check?url=https://api.example.com/v1/data"); // $0.02, gasless
console.log(await res.json());

Coinbase AgentKit, direct URL (examples/agentkit-direct-url.ts). AgentKit 0.10.4's discover_x402_services drops x402 v2 resources (it reads metadata.description; the Bazaar returns description), so call the URL:

// npm i @coinbase/agentkit viem
import { AgentKit, ViemWalletProvider, x402ActionProvider } from "@coinbase/agentkit";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

const walletProvider = new ViemWalletProvider(createWalletClient({
  account: privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`), chain: base, transport: http(),
}));
const agentkit = await AgentKit.from({ walletProvider, actionProviders: [x402ActionProvider()] });
const act = (n: string) => agentkit.getActions().find((a) => a.name.endsWith(n))!;

const url = "https://api.lumitrades.io/v1/trust/check?url=https://api.example.com/v1/data";
const quote = JSON.parse(await act("make_http_request").invoke({ url }));          // 402 terms
const o = quote.acceptablePaymentOptions.find((x: any) => x.network === "eip155:8453"); // 20000 = $0.02 USDC
const paid = JSON.parse(await act("retry_http_request_with_x402").invoke({
  url, method: "GET",
  selectedPaymentOption: { scheme: o.scheme, network: o.network, asset: o.asset, amount: o.amount, payTo: o.payTo },
}));
console.log(paid.data);

XRP Ledger (XRP, RLUSD or USDC): examples/agent-client.ts (x402-xrpl) and examples/agent_client.py.

MCP (Claude Desktop, Cursor, any MCP client):

{ "mcpServers": {
  "lumi-remote": { "url": "https://api.lumitrades.io/mcp" },
  "lumi": { "command": "npx", "args": ["-y", "lumi-trades-mcp"], "env": { "EVM_PRIVATE_KEY": "0x...", "LUMI_MAX_USD_PER_CALL": "0.02" } } } }

Endpoints and pricing

EndpointPriceReturns
freeGET /–JSON index: description, payment config, endpoint list, prices
freeGET /health–Liveness, network, receiving address
freeGET /skill.md (also /llms.txt)–Agent guide: what is offered, prices, how to pay
freeGET /.well-known/x402–x402 discovery manifest
freeGET /.well-known/trustline-merchant.txt–t54 Trustline merchant file: Lumi's XRPL receiving wallet
freeGET /openapi.json–OpenAPI 3.1 with x-payment-info per paid route
freeGET /v1/check?url=…–Free cached pay-check for an x402 URL (allow / check_first / warn / block)
freeGET /v1/trust/vendors–Seller observations: quote checks and test-buy counts
freeGET /v1/samples–Truncated, labelled SAMPLE of every paid check
freePOST /mcp–Remote MCP server (Streamable HTTP)
freeGET /.well-known/agent-card.json–A2A agent card
freePOST /a2a–A2A JSON-RPC
paidGET /v1/verdict?url=…$0.01One-line verdict for an x402 URL, with the evidence behind it
paidGET /v1/trust/check?url=…$0.02Live pre-payment check: Lumi fetches the seller's 402 now and returns it with Lumi's test-buy history (tx hashes, delivered yes/no, signed receipts)
paidGET /v1/trust/vendors/{id}/report$0.02Full observation history for one curated seller

Every USD price is payable as RLUSD or USDC on the XRP Ledger, USDC on Base or USDC on Stellar (same amount), or the XRP equivalent.

Never charged when Lumi cannot answer. Bad input, an unknown seller or missing observations return 4xx/503 before any payment is requested, and a payment header sent anyway is ignored.

Retired 2026-10-25. Routes from earlier versions of this API answer 410 Gone and never quote or charge, even when a payment header is sent.

Seller plans

See /v1/monitor for terms: Watch ($5 per endpoint per 30 days), Watch Pro ($20), Audit ($99 one-off), the Founder pack (24 test-buys for $5, first sellers only) and the Re-test pack (30 test-buys for $6.50). Seller-funded test-buys are private monitoring history and never change a public score; to have Lumi re-check a public result, ask for a free re-test at hello@lumitrades.io. Data access for platforms: Feed, Feed Pro, Feed credits and the platform licence (/v1/feed).

Accepted assets

Every 402 offers the same quote in four options on two networks, all sharing one invoice id (one payment per invoice):

accepts[]Assetasset fieldIssuer (extra.issuer)amount unit
0XRPXRP–drops
1RLUSD (Ripple USD)524C555344000000000000000000000000000000rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De (docs.ripple.com)IOU value, e.g. "0.01"
2USDC (Circle)5553444300000000000000000000000000000000rGm7WCVp9gb4jZHWTEtGUr4dd74z2XuWhE (developers.circle.com)IOU value, e.g. "0.01"
3USDC on Base (network: "eip155:8453")0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913– (extra: { name: "USD Coin", version: "2" }, the EIP-712 domain)atomic units, 6 decimals, e.g. "10000" = 0.01

Options 0-2 are on xrpl:0 and pay rM8kmmnz5qPMg7V3r7SHYXgDGvm8PhzLvM; option 3 pays Lumi's Base address 0x5E617bac19912e6d212CB303ae84655E9E203532.

XRP stays first, so clients that take accepts[0] keep paying in XRP. Stablecoin prices are fixed in USD cents. At XRP ≈ $1.33 (Oct 22 2026), 0.01 USD ≈ 0.0075 XRP and 0.02 USD ≈ 0.015 XRP, so the XRP prices are slightly cheaper. Payers need a trust line to the issuer and a balance. The Payment is same-asset (SendMax = Amount, no path or conversion). Turn off either stablecoin with ACCEPT_RLUSD=false / ACCEPT_USDC=false. Testnet uses the official testnet issuers (rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV, rHuGNhqTG32mfmAvWA8hUyWRLV3tCSwKQt), and RLUSD_ISSUER / USDC_ISSUER override them.

How Lumi tests sellers

  • Free probes: unpaid requests to seller endpoints that record whether a valid x402 v2 quote comes back, what it pays, the price and the latency. Probes never pay.
  • Paid test-buys: Lumi buys from sellers with its own wallets on XRPL, Base and Stellar, within small daily caps. Every test-buy transaction is checked on-chain before it is stored, and each record carries a signed receipt.
  • Methodology: /v1/trust/methodology. Corrections: /v1/monitor/corrections.

Run locally

Requires Node 20+.

npm install
npm test                 # vitest (mocked facilitator, fixture data)
npm run typecheck

# Plain Node (testnet config from env or .dev.vars)
XRPL_NETWORK=xrpl:1 PAY_TO=r... npm start          # http://127.0.0.1:8787

# Workers runtime locally (workerd + Durable Object)
cp .dev.vars.example .dev.vars                     # set INVOICE_SECRET (and PAY_TO via wrangler.toml [env.testnet])
npm run dev                                        # wrangler dev --env testnet

Deploy

npm run deploy (Cloudflare Workers, custom domain api.lumitrades.io). Needs wrangler auth for the account that owns lumitrades.io and the INVOICE_SECRET secret. Smoke test: curl https://api.lumitrades.io/health and curl -i https://api.lumitrades.io/v1/verdict?url=https://api.example.com/v1/data (expect 402).

Disclaimer

Lumi results are automated observations, not a rating, endorsement or guarantee. Information only, not financial advice.

License

MIT. See LICENSE.

Questions fréquentes

Qu'est-ce que Lumi Verdict: check an x402 seller before paying ?

One signed label before paying an x402 seller, from Lumi's test-buys on XRPL, Base and Stellar

Comment installer Lumi Verdict: check an x402 seller before paying ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add lumi-verdict-check-an-x402-seller-before -e 'EVM_PRIVATE_KEY=<your evm_private_key>' -e 'XRPL_SEED=<your xrpl_seed>' -e 'LUMI_PAY_ASSET=<LUMI_PAY_ASSET>' -e 'LUMI_MAX_USD_PER_CALL=0.30' -e 'LUMI_MAX_XRP_PER_CALL=0.25' -e 'LUMI_SESSION_BUDGET=1' -e 'XRPL_NETWORK=xrpl:0' -- npx -y lumi-verdict-mcp@0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour Lumi Verdict: check an x402 seller before paying ?

Oui. Il attend EVM_PRIVATE_KEY, XRPL_SEED, à renseigner dans sa configuration.

Lumi Verdict: check an x402 seller before paying est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient Lumi Verdict: check an x402 seller before paying ?

Il est publié par lumitrades. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.