@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
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.
