FHE confidential payments for AI agents — MCP server exposing MARC Protocol payment tools for encrypted x402 transactions
MARC server has well-structured schemas and clear descriptions for all 6 tools, but lacks critical error handling guidance, output schema documentation, and security-focused parameter validation. Tool names follow verb_noun convention (marc_wrap, marc_unwrap, marc_transfer, marc_balance, marc_pay, marc_record_payment), which is good. Descriptions are substantive (80-180 chars), explaining WHAT and WHEN. However, no tool documents its return schema, error cases, or recovery paths. Parameters are typed (string, array) but lack constraints (enums, ranges, patterns). No tool declares permissions or security implications despite handling sensitive financial operations (FHE encryption, payments, balance queries). Missing: output schema documentation (pattern:tool), error classification (pattern:error-classification), permission gates (pattern:permission-gate), and actionable error messages (pattern:recovery-guide).
Query encrypted balance handle and public USDC balance. Returns the FHE-encrypted balance handle and plaintext USDC balance for an address.
Full x402 payment flow (fetch 402, encrypt, pay, verify). Handles the complete confidential payment process: fetches a 402 response, encrypts the payment amount, records it with the verifier, and retries the original request.
Record a payment with the x402 verifier. Registers a payment nonce with the X402PaymentVerifier contract to prove payment for a resource.
Send encrypted cUSDC to another address. Performs a confidential transfer of encrypted USDC using FHE encryption.
Unwrap cUSDC back to USDC (step 1 of 2). Encrypts the unwrap amount and submits on-chain. After KMS decryption, call finalizeUnwrap to complete.
Wrap plaintext USDC into FHE-encrypted confidential USDC (cUSDC). Use this when you need to convert regular USDC into privacy-preserving cUSDC using the MARC Protocol. Requires amount (in raw USDC units, 6 decimals — 1000000 = 1 USDC) and optionally a recipient address.
No output schema documentation. Tools return results but LLMs cannot plan downstream calls or extract required fields (e.g., transaction hash, balance handle format, payment nonce). Breaks tool chaining.
No error handling guidance. Tools perform irreversible financial operations (wrap, unwrap, transfer, pay) but provide no recovery paths, retry classification, or actionable error messages. LLMs cannot self-correct on failure.
Missing parameter constraints. 'amount' and 'minPrice' accept unbounded strings; no validation of decimal format, range, or minimum/maximum. LLMs can pass invalid values (negative, non-numeric, absurdly large).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
No permission or security declarations. Tools handle FHE encryption, payments, and balance queries but do not declare required scopes (e.g., 'write:payment', 'read:balance'). Agents cannot be configured with least-privilege access.
marc_unwrap is a two-step operation (encrypt, then finalize) but no tool documents the intermediate state or how to recover if step 2 fails. LLMs cannot reason about partial completion or compensation.