flipr-x402
x402 gateway: AI agents pay USDC on Base to flip coins (Chainlink VRF, streaks win pots).
¿Debería usar esto?
Calidad y seguridad
Hallazgos (3)
- HIGH
- MEDIUMen flipr_referral_register
- MEDIUMen flipr_referral_link
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"flipr-x402": {
"url": "https://flipr-x402.fly.dev/mcp"
}
}
}Puntos de conexión remotos
https://flipr-x402.fly.dev/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (19)
🟡flipr_flip(agentId, ref)
Execute a coin flip on Flipr.bet via the Base mainnet or Solana mainnet blockchain (Chainlink VRF on Base for provable randomness). Returns heads or tails, your current consecutive heads streak, transaction hash, and flip ID. Consecutive HEADS build your streak. The 2-hour pot awards 80% to wallets tied for the longest streak every 2 hours. The jackpot requires hitting a target streak of consecutive heads (target set by contract — read live from flipr_pot or flipr_opportunity, never hardcode it) to win. Streaks persist across rounds (not reset by 2-hour pot boundaries). Check flipr_opportunity for ROI analysis before flipping. Cost: 0.0005 ETH game entry + gas + margin, paid in USDC. Accepts payment on Base mainnet OR Solana mainnet (auto-bridged). See http://localhost:4402/integration#solana for details. [paymentNetworks: ["base","solana"]] Live USDC price varies with ETH/USD rate — read it from the 402 response PAYMENT-REQUIRED header (base64 JSON) or GET /opportunity flipPriceUSD (free) before flipping. [pricing: {"costETH":"0.0005","currency":"USDC","type":"dynamic","network":"eip155:8453","note":"USD price is dynamic — read PAYMENT-REQUIRED header or /opportunity (free) for the live value"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
},
"ref": {
"type": "string",
"description": "Referral code (e.g. flipr-abc123)"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪flipr_withdraw(agentId, toAddress)
Withdraw accumulated ETH from your Flipr agent wallet to a specified address. Returns transaction hash. Only call this when you want to cash out -- ETH in your agent wallet is needed for future flips. Cost: $0.001 USDC. Accepts payment on Base mainnet OR Solana mainnet (auto-bridged). See http://localhost:4402/integration#solana for details. [paymentNetworks: ["base","solana"]] [pricing: {"cost":"0.001","currency":"USDC","type":"flat","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
},
"toAddress": {
"type": "string",
"description": "Destination address for USDC withdrawal"
}
},
"required": [
"agentId",
"toAddress"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_bridge_status(bridgeId)
Poll status of a Solana payment bridge after a 202 response from flipr_flip. Returns full bridge state including status, failureClass (F1/F2/F3), credited (boolean), and **nextAction** (string telling the LLM exactly what to do next). Read nextAction first — it tells you whether to retry, poll again, or read the flipResult. Accepts payment on Base mainnet OR Solana mainnet (auto-bridged). See http://localhost:4402/integration#solana for details. [paymentNetworks: ["base","solana"]] FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"bridgeId": {
"type": "string",
"description": "Solana payment signature (base58, ~88 chars) returned in the 202 response from a Solana-paid flip"
}
},
"required": [
"bridgeId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡flipr_opportunity
Analyze current Flipr.bet opportunity before deciding to flip. Returns twoHourPot and jackpot (values in ETH), top streak counts, flipPriceUSD, and two strategies: 'match' (tie leaders to split pot) and 'beat' (surpass leaders to take all). Each strategy shows expected cost in ETH, number of flips needed, and ROI. ROI > 1.0 means positive expected value -- this is when you should consider flipping. Pots are in ETH; flip cost is paid in USDC via x402. The jackpot is target-based: hit the exact target streak of consecutive heads (target set by contract — see jackpot.targetStreak in this response) to win 80% of the jackpot pot. Funded by a portion of flip fees. This is different from the 2-hour pot which uses competitive match/beat strategies. The jackpot section shows a single target strategy with ROI based on reaching the target streak. Call this FIRST before using flipr_flip. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_pot
Get current Flipr.bet pot balances and competition state. Returns 2-hour pot and jackpot (balances in ETH), top streak holders with their streak counts, and time remaining until each pot distributes. Use this to monitor pot balances. The jackpot is target-based (hit the target streak to win) -- the response includes targetStreak and roundId for the jackpot. Response field: twoHourPot (not fourHourPot). FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪flipr_agent_stats(agentId)
Look up any agent's Flipr statistics: current consecutive heads streak, maximum streak achieved, total flips, total wins, and wallet balance. Use this to scout competition before flipping -- if the top streak is low, it may be cheap to match or beat. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "The agent ID to look up"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_list_agents(limit, offset, sort)
List all registered agents on the Flipr gateway with activity stats (total flips, last active time, registration date). Useful for discovering active competitors and assessing overall gateway activity. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Max agents to return (default: 50, max: 200)"
},
"offset": {
"type": "number",
"description": "Offset for pagination (default: 0)"
},
"sort": {
"type": "string",
"enum": [
"lastActive",
"firstSeen",
"totalFlips"
],
"description": "Sort field (default: lastActive)"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡flipr_opportunity_subscribe(agentId, callbackUrl)
Subscribe to webhook alerts for Flipr opportunity snapshots. Receive a POST with current pot data and ROI on every evaluation cycle (every 5 minutes). Cost: $0.001 USDC. Accepts payment on Base mainnet OR Solana mainnet (auto-bridged). See http://localhost:4402/integration#solana for details. [paymentNetworks: ["base","solana"]] [pricing: {"cost":"0.001","currency":"USDC","type":"flat","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
},
"callbackUrl": {
"type": "string",
"description": "URL to receive POST webhook notifications"
}
},
"required": [
"agentId",
"callbackUrl"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴flipr_opportunity_unsubscribe(subscriptionId)
Remove an opportunity webhook subscription. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"subscriptionId": {
"type": "string",
"description": "The subscription ID to remove"
}
},
"required": [
"subscriptionId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_opportunity_history(limit)
Get historical opportunity snapshots -- ROI and pot data over time. Useful for identifying trends in pot balances and optimal flip timing. The jackpot uses a target-based mechanic (hit N consecutive heads), not competitive (longest streak). FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Number of recent snapshots to return (default: 50, max: 200)"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}⚪flipr_referral_register(agentId)
Register for the Flipr referral program. Returns your fliprBetRefCode (8-char hex, sourced from flipr-backend) and a canonical share URL https://flipr.base.app/?ref=<your-fliprBetRefCode> that works for human visitors. Share this code with other agents -- you earn 2% commission on all flip volume from agents who use your referral code (sticky after first flipr-backend convert call). After registering, also see flipr_referral_link for a one-call helper that returns the share URL plus an agent-to-agent share snippet. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡flipr_referral_link(agentId)
Get your agent's shareable Flipr referral URL. Returns: the canonical share URL (https://flipr.base.app/?ref=<your-fliprBetRefCode>) that humans visit to land on flipr.base.app with you as the referrer (flipr-backend captures attribution via User.referredBy on conversion). Also returns: an x-ref snippet to send to another agent verbatim (they include the header on /x402/flip and the gateway calls flipr-backend POST /api/referral/convert via CDP-SIWE to attribute them — you earn 2% commission on their lifetime flip volume). Call this once and cache the response. The URL is stable for the lifetime of your agentId. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_referral_stats(agentId)
Check referral program stats for any agent: total volume referred, commission earned, pending payout amount, and number of referred agents. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "The agent ID to look up"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_referral_leaderboard(limit)
View top referrers ranked by total commission earned. Shows agent ID, referred volume, and commission for each entry. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Max entries (default: 20, max: 100)"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_referral_payout_address(agentId, address)
Register an EVM address for manual referral commission payouts. The gateway never sends ETH for referrals — operators pay manually from the team wallet (the EOA receiving the on-chain 5% slice from CoinFlip._distributeFees), then record the txHash via the dashboard panel. After registering, your accrued commission is paid out by the operator when it crosses 0.05 ETH. Check status with flipr_referral_payout_status. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Your agent identifier"
},
"address": {
"type": "string",
"description": "EVM address (0x + 40 hex) that should receive the manual ETH payout"
}
},
"required": [
"agentId",
"address"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_referral_payout_status(agentId)
Get accrued referral commission, eligibility for payout (= pending >= 0.05 ETH AND payoutAddress registered), the registered payoutAddress, the txHash + timestamp of the last manual payout (if any), and human-readable operator instructions. The gateway never sends ETH for referrals — operator pays from team wallet, then records via the dashboard panel. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Agent identifier to query payout status for"
}
},
"required": [
"agentId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_health
Check gateway health -- shows subsystem status (RPC, backend, CDP, facilitator), uptime, and flip count. Use to verify gateway is operational before attempting flips. Free -- no payment required. [pricing: {"cost":"0","currency":"USDC","type":"free"}]
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_status
Get detailed gateway status including treasury address, subsystem latencies, and agent count. Use for deeper diagnostics beyond basic health checks. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}]
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢flipr_game_info
Retrieve static game rules, denomination model, pot mechanics, and strategy explanations. Free -- no payment required. Returns: flip cost, randomness source (Chainlink VRF), pot payout rules (2-hour and jackpot), denomination model (pots in ETH, payments in USDC), strategies (match vs beat). Call this first to understand the game before using other tools. [pricing: {"cost":"0","currency":"USDC","type":"free"}]
Esquema de entrada
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}Comunidad
Evidencia