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.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_agent_trust

ERC-8004 agent trust check on Base. Decide on decision (ALLOW_PAY | REFUSE) and safe_to_pay (boolean); pay only on ALLOW_PAY. An error result is REFUSE too — no answer is not an ALLOW. measurement carries the full score body as evidence, not as the decision.

ParameterTypeDescription
agentId *stringERC-8004 agent ID (tokenId)
walletstringOptional wallet to verify against agentWallet metadata

check_wallet_trust

Trust check for a wallet address. Resolves ERC-8004 agents when registered. Decide on decision (ALLOW_PAY | REFUSE) and safe_to_pay (boolean); pay only on ALLOW_PAY. An error result is REFUSE too — no answer is not an ALLOW. measurement carries the full score body as evidence, not as the decision.

ParameterTypeDescription
wallet *stringEVM wallet address (0x...)

check_payee_trust

Buyer-side check before paying a wallet. Read these two fields and nothing else to decide: - decision: ALLOW_PAY | REFUSE - safe_to_pay: boolean (always equals decision === ALLOW_PAY) Pay only on ALLOW_PAY. REFUSE already accounts for a degraded read, a partial measurement, a stale score, and a non-ALLOW recommendation; refuse_reasons names which. An error result is also REFUSE with safe_to_pay false — no answer is not an ALLOW. measurement carries the full score body (score, dataDepth, signals) for explanation and logging. It is evidence, not the decision.

ParameterTypeDescription
payee *stringPayee wallet address (0x...) the agent is about to pay

explain_trust_score

Explain a trust score breakdown in plain language for an agent or wallet.

ParameterTypeDescription
agentIdstringERC-8004 agent ID (tokenId)
walletstringEVM wallet address (0x...)

attest_x402_payment

Record an x402 payment attestation after settlement verification (idempotent on txHash).

ParameterTypeDescription
txHash *stringPayment transaction hash (0x + 64 hex)
wallet *stringEVM wallet address (0x...)
amountstring
networkstring
resourcestring

check_resource_decision

Pre-payment decision for an x402 resource (role=payer) or pre-service decision for a payer (role=payee). Name the resource with url (the URL that answers 402; this tool resolves it through /api/v1/resolve) or with resourceId (sha256), not both. No API key is needed (key-less at 10/min per IP). A URL or id that is not in vet402's catalog returns decision REFUSE with not_in_catalog true and refuse_reasons [resource_uncatalogued], plus up to 5 catalogued endpoints on the same host. Decide on decision (ALLOW_PAY | REFUSE) and safe_to_pay (boolean); pay only on ALLOW_PAY. WARN and BLOCK are both RE…

ParameterTypeDescription
amountUsdnumberWhat the 402 asks, in USD; compared with maxPerTxUsd server-side (role=payer only)
callerDialectstringYour x402 client dialect; a mismatch with the seller's wall is a WARN
maxPerTxUsdnumberYour per-payment ceiling in USD (default 1). This server clamps it to its own VOUCH_MAX_PER_TX_USD: tool input can lower the ceiling, never raise it (role=payer only).
methodstringHTTP method of the 402. diagnose_at uses it. Default GET.
minL1DeliveriesintegerFloor on vet402's delivered L1 purchases for this resource
payerstringRequired when role=payee: chain:address, or a bare 0x / base58 address
requireVet402AllowbooleanDefault true (a WARN refuses with payee_recommendation_not_allow). false waives a WARN and needs minL1Deliveries >= 1
resourceIdstringresource_id — sha256(method + " " + canonical_url), from /api/v1/resolve?q=<url>. check_resource_decision also takes the URL itself as url.
rolestringpayer (default): should my agent pay this resource? payee: should this seller serve this payer?
urlstringThe URL that answers 402. Resolved to its resourceId through /api/v1/resolve. Pass this or resourceId, not both.

diagnose_x402_url

Read one unpaid 402 for a URL before anyone pays it. No key and no wallet. vet402 fetches the URL once and returns verdict ALLOW, WARN, or BLOCK, the cheapest payable accept, and one fix line per check. ALLOW here means the live 402 looks payable, not that your agent should pay without vet402's payer decision. This tool does not pay and does not sign. A transport failure is an error, not a fourth verdict word. Pass url (https) and an optional method of GET or POST.

ParameterTypeDescription
url *stringThe https URL that answers 402
methodstringHTTP method for the unpaid read. Default GET

pay_if_trusted

Pay an x402 resource ONLY if vet402's decision allows it. Unlike check_resource_decision, which returns a verdict for you to act on, this tool holds the signer: on anything other than ALLOW the payment module is never even loaded, so no signature can exist. Read these two fields and nothing else to know what happened: - decision: PAID | REFUSE | FAILED - safe_to_pay: boolean (always equals decision === PAID) REFUSE means it stopped BEFORE a signature existed; refuse_reasons carries the server's own reason_codes unchanged, plus one of evidence_unavailable, payee_recommendation_not_allow, paym…

ParameterTypeDescription
resourceId *stringresource_id — sha256(method + " " + canonical_url), from /api/v1/resolve?q=<url>. check_resource_decision also takes the URL itself as url.
amountUsdnumberWhat you believe this costs, in USD
maxPerTxUsdnumberPer-payment ceiling in USD (default 1). CANNOT raise this server's ceiling: the effective limit is min(this value, VOUCH_MAX_PER_TX_USD in the server env, default 1), and a value above it is lowered t…
methodstringHTTP method of the resource (default GET; The Graph's x402 endpoint is POST)
onUnresolvedstringAn unlisted URL on a shared host (live listings from 2+ sellers): uncatalogued (default, judged like any seller outside the catalogue) or refuse
payeestringAddress you already expect to be paid (0x for Base, base58 for Solana); the 402's payTo must match it
policyobjectCaller's own rule, merged with the server env (floors take the larger value, waiver only if the env allows it, a source that differs from the env becomes both). The Graph key is NOT an input - set GRA…
resourcestringURL that answers 402. Required to actually pay.