# flipr-x402 MCP server

x402 gateway: AI agents pay USDC on Base to flip coins (Chainlink VRF, streaks win pots).

## Links
- Registry page: https://www.getdrio.com/mcp/io-github-iainkek-flipr-x402

## Install
- Endpoint: https://flipr-x402.fly.dev/mcp
- Auth: Not captured

## Setup notes
- Remote endpoint: https://flipr-x402.fly.dev/mcp

## Tools
- flipr_flip - Execute a coin flip on Flipr.bet via the Base blockchain (Chainlink VRF 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 on Base (eip155:8453). 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_withdraw - 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 on Base (eip155:8453). [pricing: {"cost":"0.001","currency":"USDC","type":"flat","network":"eip155:8453"}] Endpoint: https://flipr-x402.fly.dev/mcp
- 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_agent_stats - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_list_agents - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_opportunity_subscribe - 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 on Base (eip155:8453). [pricing: {"cost":"0.001","currency":"USDC","type":"flat","network":"eip155:8453"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_opportunity_unsubscribe - Remove an opportunity webhook subscription. FREE — rate-limited only. [pricing: {"cost":"0","currency":"FREE","type":"free","network":"eip155:8453"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_opportunity_history - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_register - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_link - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_stats - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_leaderboard - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_payout_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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- flipr_referral_payout_status - 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- 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"}] Endpoint: https://flipr-x402.fly.dev/mcp
- 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"}] Endpoint: https://flipr-x402.fly.dev/mcp

## Resources
Not captured

## Prompts
Not captured

## Metadata
- Owner: io.github.iainkek
- Version: 0.1.0
- Runtime: Streamable Http
- Transports: HTTP
- License: Not captured
- Language: Not captured
- Stars: Not captured
- Updated: May 9, 2026
- Source: https://registry.modelcontextprotocol.io
