Skip to main content
Glama
@code402/verify-mcp

@code402/verify-mcp

@code402/verify-mcp

Verify code402 / HCRB XDR-1 receipts from any MCP client. Every result a code402 endpoint returns (across the 24 public checks at https://hcrb.in/mcp and the 7 revenue modules at https://hcrb.in/mcp?catalog=modules) carries a signed receipt; this server checks the signature deterministically — keccak-256 over the canonical receipt (v|tool|tool_version|input_hash|output_hash|payer|recipient|amount|nonce|ts|tier[|successor|stream_state]), secp256k1 public-key recovery, compared to the declared signer. Free, stateless, no account: the verifier holds no keys and performs no settlement.

Use with Claude Desktop / Cursor

{
  "mcpServers": {
    "code402-verify": {
      "command": "npx",
      "args": ["-y", "@code402/verify-mcp@latest"]
    }
  }
}

Related MCP server: vantic-mcp

Tool

x402_verify — verify one receipt:

{ "raw_receipt": "<the full signed receipt JSON as a string>" }

Result:

{
  "valid": true,
  "payer": "0x…",
  "amount": "5000",
  "receipt_hash": "0x…",
  "_meta": {
    "verified_by": "code402-verify-mcp (local, offline)",
    "version": "0.2.0"
  }
}

How it works

Local-first (since 0.2.0): verification runs entirely on your machine — keccak-256 over the canonical receipt, secp256k1 public-key recovery, compared to the declared signer. No network calls, no keys held, nothing to trust but the math. Set CODE402_VERIFY_URL to proxy to the hosted verifier at https://hcrb.in/v1/receipt/verify or https://verify.code402.dev/ instead — verdicts are identical by construction (deterministic recomputation over public data).

Stdout carries only clean single-line JSON-RPC 2.0 frames; every diagnostic goes to stderr (a hard requirement for Docker and desktop MCP runners).

Verification is pure recomputation over public data — the same operation any agent can run offline against its own receipts.

The hosted verifier's exact source (public)

worker/ in this repo is the complete source of the hosted verifier at verify.code402.dev (a dedicated Cloudflare worker, extracted from the rail monolith 2026-09-23: 3ms startup vs the monolith's measured 11.3s cold start). Same canon + keccak-256 + secp256k1 recovery, byte-identical verdicts — pinned by worker/test/index.spec.ts against a real minted receipt. The public can verify the exact code that checks their receipts.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server for offline verification of signed artifacts — receipts, manifests, and audit bundles. MIT licensed, works without accounts or API calls. Tools: self_test, verify_receipt, verify_bundle, explain_artifact.
      4
      6
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP hosts to verify agent spending mandates and receipts, providing stateless tools for authorization, chain verification, credential verification, and DID resolution.
      Apache 2.0