Clicks Protocol
OfficialThe Clicks Protocol server enables AI agents to autonomously earn yield on idle USDC through DeFi integration (Aave V3 and Morpho) on Base network.
Quick Start (
clicks_quick_start): One-call setup that registers an agent, approves USDC, and processes the first payment — skipping already-completed steps. Optionally accepts a referrer address.Register Agent (
clicks_register_agent): Register a new AI agent with the protocol, making the caller the operator.Receive Payment (
clicks_receive_payment): Process incoming USDC payments, automatically splitting them 80% to the agent's liquid wallet and 20% to DeFi yield.Set Yield Percentage (
clicks_set_yield_pct): Customize the yield split percentage per operator between 5% and 50%.Withdraw Yield (
clicks_withdraw_yield): Withdraw accumulated yield plus principal, fully or partially, accessible by the agent, operator, or contract owner.Get Agent Info (
clicks_get_agent_info): Retrieve an agent's registration status, operator, deposited principal, yield percentage, and USDC balance.Simulate Split (
clicks_simulate_split): Preview how a USDC payment would be divided between liquid and yield before committing.Get Yield Info (
clicks_get_yield_info): View the active yield protocol (Aave or Morpho), current APYs, total balance, and total deposits across all agents.Get Referral Stats (
clicks_get_referral_stats): Check referral network statistics including direct referral count, total earned, claimable rewards, and referral chain.
Integrates with Coinbase Agentic Wallets on the Base network to enable automated DeFi yield generation for agent-held USDC between transactions.
Allows CrewAI agents to programmatically manage USDC deposits, yield routing to Aave and Morpho, and monitor agent team TVL milestones.
Provides tools for LangChain agents to interact with the Clicks Protocol for yield-bearing payment management and autonomous agent registration.
One call. Yield starts.
import { ClicksClient } from '@clicks-protocol/sdk';
const clicks = new ClicksClient(signer);
await clicks.quickStart('100', agentAddress);
// 80 USDC → agent wallet (instant)
// 20 USDC → treasury yield routeThat's it. No config. No dashboard. No human required.
Related MCP server: Grey Ridge x402 MCP
What Clicks does
Every USDC payment your agent receives gets auto-split:
Payment in
├── 80% → Agent Wallet (liquid, instant)
└── 20% → DeFi Yield (Aave V3 or Morpho, auto-routed to best APY)
│
└── Withdraw anytime → Agent gets principal + yield (minus 2% fee on yield only)No lockup. Withdraw anytime.
No manual steps. Fully autonomous.
2% fee on yield only. Never on principal.
Auto-rebalances between Aave V3 and Morpho for best APY.
Install
npm install @clicks-protocol/sdk ethers@^6x402 + Coinbase Agentic Wallets
Clicks is designed to sit after x402-style payment flows on Base.
x402 handles authorization and payment. Clicks routes USDC after receipt:
import { ClicksClient } from '@clicks-protocol/sdk';
import { CoinbaseWalletSDK } from '@coinbase/wallet-sdk';
const wallet = new CoinbaseWalletSDK({ appName: 'YourAgent' });
const signer = wallet.makeWeb3Provider().getSigner();
const clicks = new ClicksClient(signer);
await clicks.quickStart('1000', agentAddress);
// Your agent now has a settlement policy
// 80% liquid for operations
// 20% routed through treasury yieldSame chain (Base), same USDC contract
80% liquid for operations
20% routed through treasury yield
No lockup, withdraw anytime
SDK
Quick Start (recommended)
One call: registers agent, approves USDC, splits first payment.
const result = await clicks.quickStart('100', agentAddress);
// result.registered → true (skips if already done)
// result.approved → true (skips if allowance sufficient)
// result.paymentSplit → trueIndividual operations
// Register
await clicks.registerAgent(agentAddress);
// Approve USDC spending
await clicks.approveUSDC('max');
// Receive payment (auto-splits)
await clicks.receivePayment('500', agentAddress);
// Check yield info
const info = await clicks.getYieldInfo();
// { activeProtocol: 'Morpho', aaveAPY: 700, morphoAPY: 950, ... }
// Withdraw everything
await clicks.withdrawYield(agentAddress);
// Custom yield split (5-50%)
await clicks.setOperatorYieldPct(30); // 30% to yield, 70% liquidRead-only (no signer needed)
const clicks = new ClicksClient(provider); // provider, not signer
const agent = await clicks.getAgentInfo(agentAddress);
// { isRegistered: true, deposited: 1000000n, yieldPct: 20n }
const split = await clicks.simulateSplit('100', agentAddress);
// { liquid: 80000000n, toYield: 20000000n }MCP Server
AI agents can discover and use Clicks via MCP:
npm install @clicks-protocol/mcp-server
CLICKS_PRIVATE_KEY=0x... clicks-mcp16 tools available: clicks_quick_start, clicks_register_referral, clicks_get_agent_info, clicks_simulate_split, clicks_get_yield_info, clicks_get_referral_stats, clicks_verify_receipt, clicks_get_settlement_status, clicks_reconcile_settlement, clicks_replay_policy, clicks_get_receipt_trail, clicks_receive_payment, clicks_withdraw_yield, clicks_register_agent, clicks_set_yield_pct, clicks_explain
Works with Claude, Cursor, LangChain, and any MCP-compatible client.
Referral Network
Referral contracts exist on-chain. Treat them as a separate attribution layer from the current SDK quickStart() helper.
Level | Share of protocol fee |
L1 (direct referral) | 40% |
L2 | 20% |
L3 | 10% |
Treasury | 30% |
The referred agent pays nothing extra. Rewards come from the 2% protocol fee once referral attribution has been registered through a dedicated flow.
Recommended flow:
const deadline = BigInt(Math.floor(Date.now() / 1000) + 3600);
const signature = await clicks.signReferralApproval(agentAddress, referrerAddress, deadline);
const result = await clicks.quickStartWithReferral(
'100',
agentAddress,
referrerAddress,
deadline,
signature,
);Important:
quickStart()handles treasury setup.registerReferralWithSig()handles explicit attribution.quickStartWithReferral()is a convenience wrapper over those two steps, not an atomic one-shot contract call.
Economics per $10k deposit at 7% APY:
Your tree | Passive income/year |
10 agents | $56 |
100 agents | $560 |
1,000 agents | $9,800 |
10,000 agents | $98,000 |
Agent Teams
Form squads, hit TVL milestones, earn bonus yield:
Tier | TVL threshold | Bonus yield |
🥉 Bronze | $50k | +0.20% |
🥈 Silver | $250k | +0.50% |
🥇 Gold | $1M | +1.00% |
💎 Diamond | $5M | +2.00% |
Contracts (Base Mainnet)
Contract | Address |
ClicksRegistry | |
ClicksSplitterV4 | |
ClicksYieldRouter | |
ClicksFeeV2 | |
ClicksReferral | |
Safe Multisig (Owner) | |
USDC |
All contracts verified on Basescan. Owned by Gnosis Safe multisig — single-key compromise is not possible.
ERC-8004 Trustless Agent
Clicks is registered on the ERC-8004 Identity Registry on Base as agentId 45074. On-chain reputation accrues per completed agent job. Attestors who follow the Clicks Attestor Schema V1 become eligible for the reputation-aware fee multiplier (shipping in V5).
Manifest:
/.well-known/agent-registration.jsonSchema V1: clicksprotocol.xyz/strategy/ATTESTOR-SCHEMA-V1.md
Architecture
clicks-protocol/
├── contracts/ Solidity (^0.8.20)
│ ├── ClicksSplitterV4 Splits payments, manages yield %
│ ├── ClicksYieldRouter Routes to best APY (Aave/Morpho)
│ ├── ClicksFeeV2 2% fee collection on yield
│ ├── ClicksRegistry Agent ↔ Operator mapping
│ └── ClicksReferral Multi-level referral system
├── sdk/ TypeScript SDK
├── mcp-server/ MCP Server (16 tools)
├── site/ Landing page + llms.txt + agent.json
└── test/ 227 tests (Hardhat)Agent Discovery
llms.txt:
clicksprotocol.xyz/llms.txt— full protocol docs for LLMsagent.json:
clicksprotocol.xyz/.well-known/agent.json— agent manifestMCP:
@clicks-protocol/mcp-server— tool discovery for MCP clients
Connect Your AI Agent
The Clicks MCP server is live at https://mcp.clicksprotocol.xyz/mcp — connect any MCP-compatible client in seconds.
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"clicks-protocol": {
"url": "https://mcp.clicksprotocol.xyz/mcp"
}
}
}OpenClaw
openclaw mcp set clicks-protocol --url https://mcp.clicksprotocol.xyz/mcpCodex CLI
Add to .codex/config.json:
{
"mcpServers": {
"clicks-protocol": {
"type": "url",
"url": "https://mcp.clicksprotocol.xyz/mcp"
}
}
}Gemini CLI
{
"mcpServers": {
"clicks-protocol": {
"url": "https://mcp.clicksprotocol.xyz/mcp"
}
}
}Available MCP Tools
Tool | Description |
| TVL, APY, agent count |
| Check if an agent is registered |
| Yield balance for an agent |
| Project earnings over time |
| Resource: protocol overview |
See examples/integrations/ for ready-to-use config files.
Works with
Any agent framework that handles USDC on Base:
x402 · LangChain · CrewAI · AutoGen · Eliza · OpenClaw · Claude · Cursor · Codex · Gemini · Hummingbot · Phidata
Development
npm install
npx hardhat compile
npx hardhat test # 227 testsLicense
MIT
Available Tools
9 toolsclicks_get_agent_infoA
Check how much yield an AI agent earns on idle USDC. Returns current APY, balance, deposited principal, and pending rewards.
Inputs: agent_address (required).
clicks_get_referral_statsB
Earn extra yield by referring agents. Track how much you earn from agents you refer to earn yield on idle USDC. See direct referrals, total earned, and team bonuses.
Inputs: agent_address (required).
clicks_get_yield_infoA
Find the best APY for idle USDC. Returns current yields on Aave vs Morpho, total protocol balance, fees collected, and yield earned.
Inputs: no named parameters.
clicks_quick_startA
Start earning yield on idle USDC in one command. Registers agent, approves USDC, and deposits first payment automatically.
Inputs: amount (required), agent_address (required), referrer.
clicks_receive_paymentC
Stop wasting idle USDC payments. Automatically split payments: 80% stays liquid, 20% earns DeFi yield. Turn idle treasury into working capital.
Inputs: amount (required), agent_address (required).
clicks_register_agentA
Register your AI agent to start earning yield on idle USDC. Required before first deposit.
Inputs: agent_address (required).
clicks_set_yield_pctA
Control how much idle USDC earns yield vs stays liquid. Set custom split (5-50%) for your agent.
Inputs: pct (required).
clicks_simulate_splitA
See how idle USDC gets split: what stays liquid vs what earns yield. Preview before depositing.
Inputs: amount (required), agent_address (required).
clicks_withdraw_yieldA
Withdraw earned yield from idle USDC. Get principal + yield back anytime, no lockups.
Inputs: agent_address (required), amount.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct action: agent info, referral tracking, yield info, registration, deposit/splitting, yield management. No two tools have overlapping purposes, allowing clear agent selection.
All tools follow a consistent `clicks_<verb>_<noun>` pattern, using underscores and verbs like get, register, set, simulate, withdraw. The pattern is predictable and uniform.
9 tools is well within the ideal 3-15 range, covering the main operations without being excessive or insufficient for the domain of idle USDC yield management.
The set covers core lifecycle: registration, deposit (via quick_start and receive_payment), yield configuration, simulation, withdrawal, and info retrieval. Missing an explicit standalone deposit tool or agent deletion, but these are minor gaps.
Maintenance
Related MCP Connectors
17 pay-per-call web, finance, legal and onchain tools for AI agents. USDC on Base via x402/MPP.
x402-paid Base agent tools (USDC). 5 deterministic tools. No API keys. No NFT pass.
Underwritten DeFi yield discovery & goal planning for AI agents on Base & EVM.
Pay-per-call tools for AI agents. Live x402 APIs paid in USDC on Base.
Related MCP Servers
- AlicenseAqualityBmaintenanceDeFi execution and agent-to-agent economy tools for AI agents — swaps, yield, transfers, policy enforcement, trust scoring, A2A jobs, and P\&L across Ethereum, Base, Arbitrum, and Polygon.311Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access crypto prices, DeFi yields, Polymarket data, Base chain info, and security scans with pay-per-call via USDC on Base mainnet.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with the ZhengHe system on Base mainnet: query NAV, construct payment routing transactions, vault deposits/withdrawals, and bind affiliates for revenue sharing.-
- AlicenseAqualityCmaintenanceAutonomous zero-net-cost payments on Base Mainnet powered by automated Aave V3 & Morpho yield farming. Non-custodial, 100% capital recovery for AI agents.364 npmMIT