@veil-cash/mcp is a local MCP server that wraps @veil-cash/sdk and exposes Veil as Base MCP-compatible tools for agents. It runs alongside Base MCP: Veil prepares private and calldata actions, and Base MCP submits public transactions via send_calls.
Install
Add Veil MCP to your client’smcpServers, beside Base MCP:
Hermes Agent
Hermes Agent users can add Veil MCP as a stdio server inconfig.yaml:
Enabling fund-moving tools
The server starts read-only with no configuration (veil_status, veil_x402_quote, veil_get_balances). To enable veil_pay_x402, veil_withdraw, and veil_transfer, provide VEIL_KEY (and optionally a dedicated RPC_URL):
Configure
RPC_URL with a dedicated Base RPC endpoint. Private balance and proof-building flows pull Merkle data, historical events, and queue state, which can exceed public RPC rate limits. Use veil_init_keypair to generate a random local keypair—it writes .env.veil and returns only the public deposit key.Tools
| Tool | Purpose |
|---|---|
veil_init_keypair | Generate and save a random local Veil keypair |
veil_status | Check key, relay, wallet, and registration status |
veil_get_balances | Read wallet, queue, and private balances |
veil_deposit_status | Check one queued deposit by pool and nonce |
veil_wait_for_deposit | Poll a queued deposit until accepted/rejected/refunded |
veil_prepare_register | Return Base send_calls calldata for registration |
veil_prepare_deposit | Return Base send_calls calldata for ETH/USDC deposits |
veil_withdraw | Submit a private withdrawal through the Veil relay |
veil_transfer | Submit a private transfer through the Veil relay |
veil_consolidate_utxos | Merge fragmented private UTXOs into fewer notes |
veil_pay_x402 | Pay an x402 resource from private USDC via any facilitator |
veil_x402_quote | Probe an x402 resource for price/requirement without paying |
veil_x402_receipts | List local x402 spend history and total USDC spent |
veil_x402_payer_balances | Inspect USDC left on deterministic x402 payer EOAs |
veil_subaccount_status | Read subaccount status |
Public vs private flows
veil_prepare_register and veil_prepare_deposit return { chain, calls } to pass directly to Base MCP send_calls—these are ordinary onchain transactions from your wallet:
amount as the net amount intended to land in Veil; the 0.3% protocol fee is included in the prepared calldata. After Base MCP confirms, the deposit enters the Veil queue. For addresses without instant verification, 0xbow screening applies first (typically ~15 minutes, up to 5 days for complex cases); once approved, queue processing into private balance is typically ~8–12 minutes. Track deposits with veil_deposit_status or veil_get_balances. See Verified Users for instant paths.
If veil_prepare_register returns action: "alreadyRegistered" with an empty calls array, skip send_calls and proceed to deposit or balance checks.
Private actions (veil_withdraw, veil_transfer, veil_pay_x402) build proofs locally and submit through the Veil relay instead of Base MCP.
x402 payments
veil_pay_x402 pays a standard x402 v2 Base USDC exact resource from your private USDC balance, with a spend cap, pre-flight probe, and funded-payer reuse. The full flow and scope are on the Private x402 Payments page. Heavy x402 usage can fragment private UTXOs; when veil_get_balances reports needsConsolidation, call veil_consolidate_utxos to merge notes.
