# Kustodia Escrow

Agentic escrow payments for AI agents. Create, fund, and release escrow payments across fiat (MXN/USD via SPEI/wire) and crypto (USDC/USDT/MXNB on Arbitrum, Base, Polygon, Solana).

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add kustodia/escrow

# Browse available tools
npx -y @smithery/cli@latest tool list kustodia/escrow

# Get full schema for a tool
npx -y @smithery/cli@latest tool get kustodia/escrow create_escrow

# Call a tool
npx -y @smithery/cli@latest tool call kustodia/escrow create_escrow '{}'
```

## Direct MCP Connection

Endpoint: `https://escrow--kustodia.run.tools`

**Required config:**
- `apiKey` (query) — Kustodia API key (get one at https://kustodia.app/register)

## Tools (36)

- `create_escrow` — [FIAT ESCROW] Create a fiat escrow payment. Returns deposit instructions (CLABE for MXN, wire for USD).
- `check_status` — [FIAT ESCROW] Check full status of a fiat payment including deposit details, escrow state, and payout readiness. Use th…
- `release_funds` — [FIAT ESCROW] Release escrowed funds to seller. Triggers on-chain escrow release + SPEI/wire payout.
- `upload_evidence` — Upload evidence or documentation for a payment or escrow (works for both fiat and web3 escrows).
- `get_fx_rate` — Get current FX rate between currencies (USD, MXN, USDC, MXNB). Useful for cross-border escrows.
- `list_payments` — [FIAT ESCROW] List fiat payments. For on-chain escrows, use list_web3_escrows instead.
- `cancel_payment` — [FIAT ESCROW] Cancel a pending fiat payment before deposit. Cannot cancel web3 escrows this way.
- `raise_dispute` — [FIAT ESCROW] Raise dispute on a fiat payment. For web3 escrows, use dispute_web3_escrow instead.
- `request_refund` — [FIAT ESCROW] Request refund for a fiat payment. Triggers SPEI/wire return to buyer.
- `create_web3_escrow` — [WEB3 ESCROW] Create an on-chain escrow via platform relayer. The RELAYER pays gas and calls createEscrow.
- `fund_web3_escrow` — [WEB3 ESCROW] Fund an existing on-chain escrow by batching approve + fundEscrow.
- `release_web3_escrow` — [WEB3 ESCROW] Release a FUNDED on-chain escrow — tokens go to the payee wallet.
- `dispute_web3_escrow` — [WEB3 ESCROW] Dispute a FUNDED on-chain escrow. Freezes the escrow for Kustodia mediation.
- `check_web3_status` — [WEB3 ESCROW] Check on-chain escrow status from DB index. Fast lookup by escrow ID.
- `list_web3_escrows` — [WEB3 ESCROW] List on-chain escrows. Filter by chain, status, wallet address. Returns indexed blockchain data.
- `get_web3_escrow` — [WEB3 ESCROW] Read escrow data directly from the smart contract (real-time, on-chain). Use for verification.
- `create_session_key` — [ZERODEV / ERC-4337] Create a scoped session key for gasless escrow funding.
- `fund_with_session_key` — [ZERODEV / ERC-4337] Fund an on-chain escrow using a server-side session key.
- `register_agent_wallet` — [AGENT TRADING] Register your AI agent's wallet for discovery and trading.
- `fund_agent_wallet` — [AGENT FUNDING] Fund an agent wallet with USDC or MXNB via fiat on-ramp.
- `list_trade_offers` — [AGENT TRADING] List open escrows and trade offers on-chain.
- `accept_trade` — [AGENT TRADING] Check if you're the counterparty in a trade and get next steps.
- `check_balance` — [READ-ONLY] Check native (ETH) and ERC20 token balances for any wallet on supported chains.
- `get_trust_score` — [READ-ONLY] Get trust score and badge for any wallet address.
- `create_confidential_escrow` — [CONFIDENTIAL ESCROW] Create a fully encrypted on-chain escrow using Fhenix FHE.
- `fund_confidential_escrow` — [CONFIDENTIAL ESCROW] Fund a confidential escrow using FHERC20 encrypted tokens.
- `release_confidential_escrow` — [CONFIDENTIAL ESCROW] Release a funded confidential escrow with CoFHE decryption.
- `create_solana_blink` — [SOLANA BLINKS] Create a Solana Blink escrow — shareable payment link for P2P transactions.
- `get_escrow_evidence` — [READ-ONLY] List all evidence files attached to an escrow.
- `create_recurring_escrow` — [RECURRING] Create a recurring escrow subscription — automated billing on interval.
- `pause_recurring` — [RECURRING] Pause an active recurring subscription. Can be resumed later.
- `resume_recurring` — [RECURRING] Resume a paused recurring subscription.
- `cancel_recurring` — [RECURRING] Cancel a recurring subscription. In-progress cycles will complete, no new cycles created.
- `approve_cycle` — [RECURRING] Approve a pending billing cycle (for non-delegated subscriptions). Must approve within 48h.
- `list_recurring` — [RECURRING] List recurring subscriptions. Filter by status, user, or payee.
- `get_recurring_status` — [RECURRING] Get full status of a recurring subscription including all cycle history, fees, and next billing date.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get kustodia/escrow <tool-name>
```
