Tenzro
Tutorial — Agents

Build an institutional AML agent

Combine the Ethereum, Solana, and Canton MCP servers with the on-network compliance RPCs to build an agent that screens counterparties before any payment clears.
Level
Advanced
Time
~45 min
Prerequisites
Machine DID with elevated KYC tier
Stack
TypeScript · MCP
01

Bind a high-KYC machine identity

Institutional flows require the Full KYC tier on the machine identity carrying out the screen.

tenzro identity register --type machine --kyc-tier full
02

Screen a counterparty against on-chain data

Pull recent activity on Ethereum and Solana via the dedicated ecosystem MCPs.

// MCP servers speak JSON-RPC 2.0 over Streamable HTTP.
const res = await fetch("https://ethereum-mcp.tenzro.network/mcp", {
  method: "POST",
  headers: { "content-type": "application/json", "accept": "application/json, text/event-stream" },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "tools/call",
    params: { name: "eth_get_transaction", arguments: { hash: "0x..." } },
  }),
});
const tx = (await res.json()).result;
03

Cross-check against Canton ledger records

Canton holds tokenized assets and DvP contracts; query parties and balances.

const res = await fetch("https://canton-mcp.tenzro.network/mcp", {
  method: "POST",
  headers: { "content-type": "application/json", "accept": "application/json, text/event-stream" },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "tools/call",
    params: { name: "canton_list_parties", arguments: {} },
  }),
});
const parties = (await res.json()).result;
04

Gate the payment via on-chain compliance rules

Register ERC-3643 compliance rules against the token and run a pre-flight check before settlement. The screening agent feeds its verdict into the rule set out-of-band.

// Check that a proposed transfer satisfies the registered rules.
const result = await client.compliance().checkCompliance(
  tokenId,
  payerAddress,
  recipientAddress,
  amount,
);
if (!result.compliant) throw new Error(result.reason);
Related
← All tutorials