mcp-server

v0.3.3
@vet402/mcp-server Checked 1 day ago Published 11 days ago

MCP server for vet402: ask an agent's trust score, a wallet's, or a payee's before your agent pays them.

MCP tools for checking vet402 trust scores from Claude Desktop, Cursor, or any MCP client — so an agent can ask *"is this wallet safe to pay?"* before it pays. Published on npm. No clone, no build: your MCP client launches it with npx. Since 2026-10-28 vet402 also runs an MCP server on the web at https://vet402.com/mcp (Streamable HTTP, stateless, read only, free, no key). Full setup, tools, the delivery feed, and limits: https://vet402.com/docs/mcp.

Summary extracted from the README.

@vet402/mcp-server

MCP tools for checking vet402 trust scores from Claude Desktop, Cursor, or any MCP client — so an agent can ask "is this wallet safe to pay?" before it pays.

Published on npm. No clone, no build: your MCP client launches it with npx.

npm install -g @vet402/mcp-server   # optional — the configs below use npx

Hosted endpoint (no install)

Since 2026-10-28 vet402 also runs an MCP server on the web at https://vet402.com/mcp (Streamable HTTP, stateless, read only, free, no key). Full setup, tools, the delivery feed, and limits: https://vet402.com/docs/mcp.

{ "mcpServers": { "vet402": { "type": "http", "url": "https://vet402.com/mcp" } } }

In Claude Code, add it as an HTTP transport server named vet402 with that URL.

The hosted endpoint has its own read-only tools. check_x402_seller and check_my_x402_endpoint carry the transactions of vet402's own purchases (l1_purchases[]), record_url and method_url; find_x402_sellers carries record_url per row:

Hosted tool What it returns
check_x402_seller What vet402 saw when it paid an x402 URL (paid attempts, deliveries, the five latest purchases with their transactions), recommendation, reason_codes and verified_terms (the payTo, amount and network of the last delivered purchase; the amount is in 6-decimal ledger units, so multiply it by 10^12 on BNB Chain and by 10 on Stellar before comparing it with a 402)
check_my_x402_endpoint For sellers: the catalogs a host is listed in, what happened when vet402 paid its listings, the failure modes with links to the fix-first page, and when vet402 can buy each listing again
find_x402_sellers Listings that match query with at least one vet402 paid test in the last 30 days and a delivered rate of at least 80%, in the same Wilson order as GET /api/v1/find
check_payment_proof Reads a PAYMENT-RESPONSE header or a network and a transaction on the chains vet402 reads again after a purchase, and returns found, from, to, asset and amount in atomic units
check_8004_agent Same JSON as GET /api/v1/erc8004/check: re-read one ERC-8004 Reputation Registry feedback and its proofOfPayment
check_concordium_agent One Concordium testnet CIS-8004 agent: the badge status from the agent registry and vet402's verdict (go, no or unproven) from its payments to that agent, with the transaction behind it
check_nearai_attestation Latest NEAR AI Cloud TEE snapshot after vet402 re-runs NEAR AI Inference SDK verification (pin 085a304): Gateway keyless ECDSA, Intel PCS TDX, NRAS JWKS for attested vllm models; or no_run_yet before the first daily 09:00 UTC run. Read-only, no API key

The hosted endpoint does not pay and holds no signer. pay_if_trusted stays in this stdio package only. Limits: 120 requests per minute per IP, plus 30 per minute for find_x402_sellers and 30 per minute for check_my_x402_endpoint. check_payment_proof shares 20 requests a minute per IP with POST /api/v1/payment-proof. check_8004_agent shares 30 requests a minute per IP with GET /api/v1/erc8004/check. The OpenAPI spec documents the hosted server as /api/mcp.

Tools

Eight tools. check_resource_decision, pay_if_trusted, and diagnose_x402_url work with no API key. The /decision route answers key-less at 10 requests a minute per IP. diagnose_x402_url reads one unpaid 402 and does not pay. The other five (check_agent_trust, check_wallet_trust, check_payee_trust, explain_trust_score, attest_x402_payment) need VOUCH_API_KEY. Without one the API answers missing_api_key.

Tool Description
check_agent_trust Score by agent ID (optional wallet verification)
check_wallet_trust Score by wallet (x402 payer path)
check_payee_trust Buyer-side: score a payment recipient before paying it (score + dataDepth + recommendation + degraded / signalsUnavailable)
explain_trust_score Human-readable score breakdown (includes x402 + dataCoverage)
attest_x402_payment Write settlement attestation after payment verification
pay_if_trusted ETHOnline 2026 window (2026-09-05) — the same gate as check_resource_decision, but it holds the signer. On anything other than ALLOW the payment module is never loaded, so no signature can exist. Refusals are machine-readable and happen before a signature. Delegates the payment itself to payOrRefuse in @vet402/sdk. Signing requires VOUCH_PAYER_PRIVATE_KEY and viem; without them the gate still runs and refuses with payer_not_configured. Settlement is reported as settle_claimed — never settled, which only an on-chain re-read may write. Since 2026-09-06 it also takes policy (requireVet402Allow, evidence.source / minSubgraphReceipts / minL1Deliveries), merged with the server env before payOrRefuse (see VOUCH_ALLOW_WAIVE_VET402 below): source: "subgraph" reads The Graph's x402 Base subgraph (key from GRAPH_API_KEY) and returns that read on decision_record.evidence[]. A seller outside the catalogue (/decision 404) is judged too when resource is given: the SDK reads the 402's payTo, that address's payee score and the caller's floors (reason_codes carries resource_uncatalogued); without resource a 404 refuses with evidence_unavailable. Since 2026-09-15 payee may be a base58 Solana address: the same gate runs (BLOCK / WARN / degraded refuse before the signer; payTo must equal payee exactly; the 402 must offer Solana USDC over x402 v2 with a facilitator extra.feePayer), and on ALLOW the SDK builds the SVM exact transaction and signs it with VOUCH_SOLANA_PAYER_SECRET_KEY. A Solana seller outside the catalogue refuses with resource_uncatalogued / evidence_unavailable; attested is always false on Solana. Unreleased (0.3.1, 2026-09-29): with resource, the URL is first canonicalized by vet402 (/api/v1/resolve?q=<url>&method=<method>) and the decision and the payment use that listing's own resource_id, so another spelling (trailing slash, upper-case host, :443, query order) cannot turn a listed — possibly BLOCKed — resource into an "uncatalogued" one; a URL that matches no listing on a host vet402 has listings for refuses with resource_unresolved_host_known, a resourceId naming a different listing refuses with resource_id_mismatch, and a /decision 404 goes to the uncatalogued path only when it says host_known: false. 0.3.1 depends on @vet402/sdk ^0.7.0 (the Solana payer), so it is published only after that SDK release
check_resource_decision 0.2.0 — Product spec §9.1: pre-payment decision for one x402 resource (resourceId = sha256 hex from /api/v1/resolve?q=<url>). Unreleased (after 0.3.0): it also takes url — the URL that answers 402 — and resolves it itself; a URL or id that is not in vet402's catalog comes back as decision: REFUSE, not_in_catalog: true, refuse_reasons: ["resource_uncatalogued"] with up to 5 catalogued endpoints on the same host, instead of request_failed. Pass method as GET or POST. diagnose_at uses that method. The default is GET. 0.3.0 on npm takes resourceId only. Returns decision (ALLOW_PAY | REFUSE), safe_to_pay, refuse_reasons, and the full measurement body (L0–L2 facts, reason_codes, freshness, evidence, rules_version). role=payee + payer asks the seller-side question instead. Since 2026-09-07 it also takes your own policy — amountUsd, maxPerTxUsd (default 1), minL1Deliveries, requireVet402Allow (default true; false waives a WARN and needs minL1Deliveries ≥ 1) — which the server applies and returns as measurement.caller_policy in the SDK's words (price_above_ceiling, evidence_unavailable, payee_recommendation_block, payee_recommendation_not_allow, insufficient_delivery_evidence); a caller_policy REFUSE makes the tool REFUSE with those words in refuse_reasons. Since 2026-09-12 the maxPerTxUsd you pass is capped by the server's own VOUCH_MAX_PER_TX_USD (default 1) so this answer matches what pay_if_trusted would do
diagnose_x402_url Read one unpaid 402 for an https URL before anyone pays. No key and no wallet. Pass method as GET or POST (default GET). vet402 fetches once and returns ALLOW, WARN, or BLOCK, the cheapest payable accept, and one fix line per check. This tool does not pay and does not sign.

Reading a check_payee_trust result

The tool returns the API body verbatim. Two of its fields override recommendation, and the tool description tells the model so:

  • degraded: true — an input could not be read at all; the body is a refusal, not a measurement.
  • signalsUnavailable non-empty — some inputs were not measured (wallet_metrics, native_drain, usdc_drain, outcome_history); the view is partial.

Either one means the payee was not fully checked, and an unchecked payee is not a safe one. The same goes for a tool error, including lookup_timeout: no answer is not an ALLOW.

Setup — Claude Desktop

A key is optional. Without VOUCH_API_KEY, check_resource_decision, pay_if_trusted, and diagnose_x402_url still run. The five score and attest tools answer missing_api_key. To use all eight, get a key at vet402.com/dashboard/keys. Add this to ~/Library/Application Support/Claude/claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows) and restart the app:

{
  "mcpServers": {
    "vouch": {
      "command": "npx",
      "args": ["-y", "@vet402/mcp-server"],
      "env": {
        "VOUCH_API_URL": "https://vet402.com/api/v1",
        "VOUCH_API_KEY": "vouch_live_your_key_here"
      }
    }
  }
}

Setup — Cursor

Same block in ~/.cursor/mcp.json (or a project-local .cursor/mcp.json):

{
  "mcpServers": {
    "vouch": {
      "command": "npx",
      "args": ["-y", "@vet402/mcp-server"],
      "env": {
        "VOUCH_API_URL": "https://vet402.com/api/v1",
        "VOUCH_API_KEY": "vouch_live_your_key_here"
      }
    }
  }
}

Confirm it starts before wiring it into a client:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' \
  | npx -y @vet402/mcp-server

A serverInfo line comes back on stdout. The package also installs a vet402-mcp binary, if you prefer npx -p @vet402/mcp-server vet402-mcp.

Environment

Variable Default Description
VOUCH_API_KEY — Optional since 2026-09-07: check_resource_decision and pay_if_trusted read /decision key-less (10/min per IP, then 429 rate_limited). The score and attest tools still need one (the API answers missing_api_key). Create one here.
VOUCH_API_URL https://vet402.com/api/v1 API base URL. Override only to point at another deployment.
VOUCH_SOLANA_PAYER_SECRET_KEY — Solana payer for pay_if_trusted when payee is a base58 address (2026-09-15). solana-keygen JSON array or base64 of the 64-byte secret key. Needs SOLANA_RPC_URL and @solana/web3.js installed next to the server; without them a base58 payee refuses with payer_not_configured. The Base payer (VOUCH_PAYER_PRIVATE_KEY) is never used for a Solana payee, or the reverse. Never commit or print a real value.
SOLANA_RPC_URL — Solana RPC the payer reads one getLatestBlockhash from, only after an ALLOW (2026-09-15).
GRAPH_API_KEY — Graph Gateway key for pay_if_trusted when policy.evidence.source is "subgraph" or "both". Read from env only — never from tool input, so it never enters the model's context. Without it such a call refuses with graph_key_not_configured before reading anything (2026-09-06).
VOUCH_TIMEOUT_MS 10000 Per-request timeout. Cannot be disabled — a lookup that never returns cannot be failed closed on. A malformed value falls back to the default rather than breaking every tool call.
VOUCH_SESSION_MAX_USD 10 (10× default per-tx ceiling) Cumulative USD cap for pay_if_trusted in this process. Reservations are taken before signing; unsigned refusals release the reservation; successful signatures always count even when the cap is exceeded.
VOUCH_ALLOW_WAIVE_VET402 unset When true, the server may waive vet402 WARN only if env/tool floors are met. Tool input cannot waive on its own — it may only require stricter requireVet402Allow: true or raise floors. Floors use the maximum of env and tool values; evidence source takes the strictest side: the same source stays, a different one becomes both (read both, refuse if either cannot be read; without GRAPH_API_KEY that refuses with graph_key_not_configured).
VOUCH_MIN_L1_DELIVERIES — With VOUCH_ALLOW_WAIVE_VET402=true, sets the operator's minimum delivered L1 purchases floor (integer ≥ 1). Merged with any higher floor from tool policy.evidence.

pay_if_trusted takes optional onUnresolved: uncatalogued (default, judge like any seller outside the catalogue) or refuse (stop on a shared host when the URL matches no listing).

Requests to the vet402 API carry User-Agent: vet402-mcp/<version> (unreleased, lands with 0.3.1), so vet402 can count calls per client version. Sellers are not sent it.

0.1.0 defaults VOUCH_API_URL to http://localhost:3000/api/v1 — a development default that shipped by accident. The configs above set it explicitly, so they are correct on every version; 0.1.1 and later default to the hosted API.

Example prompts

  • "Check trust for agent 42 on Base"
  • "Is wallet 0xabc... safe to accept x402 payment from?"
  • "Is it safe to pay wallet 0xdef...? Check its payee trust first"
  • "Explain the trust score for agent 7"

Building from the repo (contributors)

git clone https://github.com/vet402/vet402.git
cd vet402/packages/mcp-server && npm install && npm run build
# then point your client at "command": "node", "args": ["<abs>/dist/index.js"]

MIT · vet402