@frontiercompute/zcash-402
v0.1.0
Published
Shielded x402 payment facilitator for AI agents. Pay for HTTP resources with ZEC via split-key MPC signing and ZAP1 attestation.
Maintainers
Readme
@frontiercompute/zcash-402
Shielded x402 payment facilitator for AI agents. Part of the ShieldedVault agent custody stack.
What this does
An MCP server that lets AI agents pay for HTTP resources using shielded ZEC. The payment flow:
- Agent encounters an x402-gated resource (HTTP 402)
zcash-402negotiates payment terms with the resource server- Constructs a shielded ZEC transaction via split-key MPC signing
- Attests the payment via ZAP1 (creates a verifiable Merkle receipt)
- Submits payment proof to unlock access
The agent never holds the full spending key. Policy enforcement lives on-chain via Ika 2PC-MPC. Every payment has a ZAP1 attestation anchored on Zcash mainnet.
Tools (4 MCP tools)
| tool | description |
|------|-------------|
| pay_resource | Pay for an x402-gated HTTP resource using shielded ZEC |
| check_balance | Check available shielded balance for payments |
| verify_receipt | Verify a ZAP1 attestation receipt from a prior payment |
| list_payments | List recent payments with attestation status |
Quick start
npm install @frontiercompute/zcash-402Configure environment:
export ZAP1_API_KEY="your-api-key"
export IKA_DWALLET_ID="your-dwallet-id"
export ZEC_PAYMENT_ADDRESS="your-shielded-address"
export ZEBRA_RPC_URL="http://127.0.0.1:8232" # optional, defaults to localhostRun as MCP server:
npx @frontiercompute/zcash-402Discovery
This package includes a .well-known/mcp.json server card for auto-discovery by MCP-compatible clients (Claude Desktop, Cursor, Windsurf, VS Code).
Architecture
Agent (via MCP)
|
v
zcash-402 (this package)
|
+-- x402/negotiate.ts parse 402 response, extract payment terms
+-- x402/construct.ts build shielded ZEC tx via Zebra RPC
+-- x402/submit.ts submit payment proof to resource server
+-- attestation/ create ZAP1 receipt for the payment
|
v
zcash-ika (split-key MPC) agent signs, never holds full key
|
v
Zcash mainnet transaction broadcast + ZAP1 anchorShieldedVault properties
This package implements two of the five ShieldedVault agent custody properties:
- Non-drainable: the agent can pay but never holds the full spending key (Ika 2PC-MPC)
- Attested: every payment produces a ZAP1 Merkle receipt anchored on Zcash mainnet
Related packages
| package | description | |---------|-------------| | @frontiercompute/zcash-mcp | MCP server for Zcash (12 tools) | | @frontiercompute/zcash-ika | Split-key MPC custody via Ika | | @frontiercompute/zap1 | ZAP1 attestation protocol SDK | | @frontiercompute/openclaw-zap1 | AI agent attestation wrapper |
License
MIT
