vouch402-mcp-server

v1.0.0
vouch402-mcp-server Checked 1 day ago Published 1 month ago

Standalone MCP server for Vouch402: x402-metered on-chain risk scores for Base addresses, with EAS fulfillment attestations.

A standalone MCP server for Vouch402: lets any MCP-capable agent get a live, paid, on-chain risk score for a Base address, with the resulting attestation independently verified against EAS rather than trusted from the API's own response. That's a deliberate design decision, not an oversight, and it's the main thing worth understanding before using this. A Base MCP plugin can delegate payment to the *caller's* already-connected wallet session. A standalone server launched fresh via npx has no such session to delegate to, so it needs its own answer: hold a key itself, or never touch one.

Summary extracted from the README.

vouch402-mcp-server

A standalone MCP server for Vouch402: lets any MCP-capable agent get a live, paid, on-chain risk score for a Base address, with the resulting attestation independently verified against EAS rather than trusted from the API's own response.

This server never holds a wallet or signs a transaction

That's a deliberate design decision, not an oversight, and it's the main thing worth understanding before using this. A Base MCP plugin can delegate payment to the caller's already-connected wallet session. A standalone server launched fresh via npx has no such session to delegate to, so it needs its own answer: hold a key itself, or never touch one.

This project chose never touching one, for two reasons: it's the pattern the Base MCP ecosystem's own documentation states directly and repeatedly for exactly this situation ("The MCP server itself does not sign or broadcast transactions", "Do not ask for or use a private key"), and it's consistent with how the rest of this project already works: plugins/vouch402.md makes the same non-custodial choice, and the main server has never accepted a raw private key anywhere. Full reasoning in DECISION_LOG.md, "Phase 10 open question: how should the standalone MCP server pay?"

The tradeoff, stated plainly: this server is only useful to a caller that already has its own way to sign and submit an on-chain USDC transfer, and to sign a short message proving it controls the paying address (see fetch_risk_score's signature parameter below). If your MCP client has no wallet tooling at all, this server can't pay on your behalf, by design; use the CLI instead, which does hold a (keystore-encrypted, never raw) key for exactly that single-user, run-it-yourself case.

Tools

  • get_payment_quote(address, baseUrl?): returns the unsigned x402 payment requirements for scoring address (amount, asset, payTo, network). Pay it yourself, with your own wallet.
  • fetch_risk_score(address, quote, txHash, payer, signature, jurisdictionAttestation, baseUrl?, makePublic?): takes the quote you got back and the transaction hash of your payment, retries until the server confirms it, then independently resolves the resulting attestation against EAS directly (not the API's own claim) before returning the score. signature is an EIP-191 personal-sign signature (or an EIP-1271/ERC-6492 equivalent for a smart-contract wallet) from payer over `Vouch402 payment proof\nnetwork: ${quote.network}\nresourceId: ${quote.extra.resourceId}\ntxHash: ${txHash}`, proving you actually control payer rather than just having observed its address on-chain; the server rejects the request without one. makePublic (default false) opts this specific result into Vouch402's public activity feed (address, score, and signals shown in full); otherwise the result stays attestation-only, same as before this option existed. jurisdictionAttestation is required, must be the literal true: it certifies that whoever this call is being made for is not located in, and is not paying on behalf of anyone in, Cuba, Iran, North Korea, Syria, the Russian-occupied regions of Ukraine, or mainland China. The API rejects the request outright without it; see the "Restricted Jurisdictions" section at vouch402.xyz/legal for the legal basis behind each entry. This tool is called by an autonomous agent, not a human clicking a checkbox, so whatever is orchestrating this tool call must set this explicitly, never assume it.

The tokenizedEquityExposure signal

The score fetch_risk_score returns includes signals.tokenizedEquityExposure: a list of tickers (e.g. ["AAPLc", "TSLAc"], [] if none) among Coinbase's Base-mainnet tokenized-equity tokens the scored address currently holds or has ever transacted with. Just the tickers — no balance, no share count, no dollar amount — and it never affects score: it's a named fact, not a risk input. Always [] on Base Sepolia, since these tokens only exist on mainnet. See the root README for the full signal definition, and tokenized-equities.json for the complete, independently-verified contract list.

Usage

Add to your MCP client's config (.mcp.json for Claude Code, or the equivalent for your client):

{
  "mcpServers": {
    "vouch402": {
      "command": "npx",
      "args": ["-y", "vouch402-mcp-server"]
    }
  }
}

Then, from the agent side: call get_payment_quote, pay the quoted amount using whatever wallet capability your own session has, then call fetch_risk_score with the resulting transaction hash.

Development

npm install   # resolves vouch402-sdk from ../sdk
npm run build
npm test      # spins up a local server + a real MCP client, Base Sepolia, real payment

License

MIT. See LICENSE.