clicks_receive_payment
Split USDC payments for registered AI agents: 80% to wallet, 20% to DeFi yield on Base network.
Instructions
Split a USDC payment for an agent: 80% liquid to wallet, 20% to DeFi yield. Agent must be registered first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Payment amount in USDC (e.g. "100") | |
| agent_address | Yes | Ethereum address of the AI agent |
Implementation Reference
- mcp-server/src/index.ts:304-327 (handler)The tool 'clicks_receive_payment' splits a USDC payment for an agent, with 80% going to the wallet and 20% to DeFi yield, using the splitter contract.
server.tool( 'clicks_receive_payment', 'Split a USDC payment for an agent: 80% liquid to wallet, 20% to DeFi yield. Agent must be registered first.', { amount: z.string().describe('Payment amount in USDC (e.g. "100")'), agent_address: z.string().describe('Ethereum address of the AI agent'), }, async ({ amount, agent_address }) => { const signer = getSigner(); const splitter = new Contract(ADDRESSES.splitter, SPLITTER_ABI, signer); const amountWei = parseUnits(amount, 6); const tx = await splitter.receivePayment(amountWei, agent_address); const receipt = await tx.wait(); return { content: [{ type: 'text' as const, text: JSON.stringify({ success: true, txHash: tx.hash, amount_usdc: amount, agent: agent_address, message: `Payment of ${amount} USDC split successfully. ~80% to wallet, ~20% earning yield.`, }, null, 2),