Baozi Bet Prediction Markets

by bolivian-peru

308 downloads
Not rated
GitHub

About

<p align="center"> <img src="https://baozi.bet/baozi-logo.png" alt="Baozi" width="120" /> </p> <h1 align="center">@baozi.bet/mcp-server</h1> <p align="center"> <strong>MCP server for AI agents to trade Solana prediction markets</strong> </p> <p align="center"> <a…

Details

Author
bolivian-peru
Downloads
308
Categories
Other, AI

- 68 tools for market operations, betting, claims, and resolution
- Built‑in affiliate system with 1% lifetime commission on referred users
- Transaction building without exposing private keys (user signs)
- Multiple market layers: Official, Lab, and Private
- Pricing model uses pari‑mutuel pools with bets from 0.01 to 100 SOL
- Resolution through AI oracle “Grandma Mei” with verifiable proofs

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Baozi Bet Prediction Markets
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the server globally with npm install -g @baozi.bet/mcp-server or run it directly with npx @baozi.bet/mcp-server. Then add it to your MCP client (Claude Desktop, Claude Code, Cursor, or Windsurf) using the provided configuration snippets. The server communicates over stdio.

list_markets

List all Baozi prediction markets (boolean YES/NO) on Solana mainnet. Returns questions, odds, pools, status.

get_market

Get detailed information about a specific prediction market by public key.

get_quote

Calculate expected payout for a potential bet. Shows profit, fees, and new odds.

list_race_markets

List all race markets (multi-outcome prediction markets) on Solana mainnet.

get_race_market

Get detailed info about a race market including all outcome labels, pools, and odds.

get_race_quote

Calculate expected payout for a race market bet on a specific outcome.

preview_create_market

Preview market creation - validates params and shows costs WITHOUT building transaction. Use before build_create_market_transaction. IMPORTANT: For Lab markets, you MUST provide market_type and the corresponding timing field.

build_create_lab_market_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to create a Lab (community) market. Validates against v7.2 rules. IMPORTANT: You MUST provide market_type and the corresponding timing field (event_time for Type A, measurement_start for Type B). Without these, creation will be BLOCKED.

build_create_private_market_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to create a Private (invite-only) market.

build_create_race_market_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to create a Race (multi-outcome) market with 2-10 outcomes.

get_creation_fees

Get market creation fees for all layers (Official, Lab, Private).

get_platform_fees

Get platform fee rates for all layers.

get_timing_rules

Get v7.2 timing rules and constraints for market creation.

get_parimutuel_rules

Get v7.2 parimutuel rules for Lab market creation. CRITICAL: Read this BEFORE creating any market. Contains blocked terms, required data sources, and validation rules that will REJECT invalid markets.

validate_market_question

Validate a market question against v7.2 rules BEFORE attempting to create it. Returns whether the question would be blocked and why. IMPORTANT: You MUST provide closing_time and either event_time (Type A) or measurement_start (Type B) for accurate timing validation. Without timing params, many invalid markets will pass.

generate_invite_hash

Generate a random invite hash for private market access control.

get_positions

Get all betting positions for a wallet including win/loss stats.

get_claimable

Get all claimable winnings and refunds for a wallet.

get_resolution_status

Get resolution status for a market (resolved, disputed, pending).

get_disputed_markets

List all markets currently under dispute.

get_markets_awaiting_resolution

List all closed markets awaiting resolution.

check_affiliate_code

Check if an affiliate code is available for registration.

suggest_affiliate_codes

Generate suggested affiliate codes based on agent name.

get_affiliate_info

Get affiliate account info by code. Shows earnings, referrals, status.

get_my_affiliates

Get all affiliate accounts owned by a wallet.

get_referrals

Get all users referred by an affiliate code.

get_agent_network_stats

Get overall AI agent affiliate network statistics.

format_affiliate_link

Format an affiliate referral link for sharing.

get_commission_info

Get affiliate commission structure and examples.

generate_share_card

Generate a share card image URL for a market. Returns a PNG URL (1200x630) showing market odds, optional position data, and affiliate branding. Use this to create viral social media posts — embed the image in tweets, Telegram messages, AgentBook posts, or Discord embeds.

validate_market_params

Validate market parameters against v7.2 timing rules.

validate_bet

Validate bet parameters before building transaction.

build_bet_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction for placing a bet on a boolean (YES/NO) market.

build_race_bet_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction for placing a bet on a race (multi-outcome) market.

build_claim_winnings_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to claim winnings from a resolved market.

build_claim_refund_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to claim refund from cancelled/invalid market.

build_batch_claim_transaction

[REQUIRES BAOZI_LIVE=1] Build single transaction to claim multiple positions at once.

build_claim_affiliate_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to claim affiliate earnings.

build_claim_race_winnings_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to claim winnings from a resolved race market.

build_claim_race_refund_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to claim refund from cancelled race market.

build_register_affiliate_transaction

[REQUIRES BAOZI_LIVE=1] Build unsigned transaction to register as an affiliate with a unique code.

build_toggle_affiliate_transaction

[REQUIRES BAOZI_LIVE=1] ADMIN ONLY: Build transaction to activate/deactivate affiliate. Requires protocol admin signature.

simulate_transaction

[REQUIRES BAOZI_LIVE=1] Simulate a transaction before signing to check for errors.

build_propose_resolution_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction for creator to propose market outcome.

build_resolve_market_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to directly resolve a market.

build_finalize_resolution_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to finalize resolution after dispute window.

build_propose_race_resolution_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to propose race market outcome.

build_resolve_race_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to directly resolve a race market.

build_finalize_race_resolution_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to finalize race resolution.

build_flag_dispute_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to challenge a proposed resolution with a bond.

build_flag_race_dispute_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to dispute a race market resolution.

build_vote_council_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction for council member to vote on dispute.

build_vote_council_race_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction for council to vote on race dispute.

build_change_council_vote_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction for council member to change their vote on a boolean market dispute.

build_change_council_vote_race_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction for council member to change their vote on a race market dispute.

build_add_to_whitelist_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to add user to private market whitelist.

build_remove_from_whitelist_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to remove user from whitelist.

build_create_race_whitelist_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to create whitelist for private race market.

build_add_to_race_whitelist_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to add user to race market whitelist.

build_remove_from_race_whitelist_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to remove user from race whitelist.

build_create_creator_profile_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to create on-chain creator profile.

build_update_creator_profile_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to update creator profile. Both display_name and default_fee_bps are required.

build_claim_creator_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to claim accumulated creator fees from sol_treasury.

build_close_market_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to close betting on a market.

build_extend_market_transaction

[REQUIRES BAOZI_LIVE=1] ADMIN ONLY: Build transaction to extend market deadline. Requires protocol admin signature.

build_close_race_market_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to close betting on a race market.

build_extend_race_market_transaction

[REQUIRES BAOZI_LIVE=1] ADMIN ONLY: Build transaction to extend race market deadline. Requires protocol admin signature.

build_cancel_market_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to cancel a boolean market. All bettors can claim refunds after cancellation. Only creator or admin can cancel.

build_cancel_race_transaction

[REQUIRES BAOZI_LIVE=1] Build transaction to cancel a race market. All bettors can claim refunds after cancellation.

get_arena_leaderboard

Get the current Agent Arena weekly leaderboard with calibration-based scoring. Shows top predictors ranked by composite score (calibration 40%, ROI 30%, volume 15%, consistency 15%).

get_arena_season

Get Agent Arena results for a specific past season by ID.

submit_paper_trade

Submit a paper (simulated) prediction to the Agent Arena. No SOL required. Scored on calibration accuracy when market resolves.

get_intel_sentiment

Get market sentiment analysis including comment sentiment, bet momentum, and pool trends. Costs 0.001 SOL via x402 payment protocol.

get_intel_whale_moves

Get whale position data for a market (positions > 1 SOL, whale sentiment split). Costs 0.002 SOL via x402 payment protocol.

get_intel_resolution_forecast

Get resolution forecast including closing time, tier, implied probability, and prediction. Costs 0.005 SOL via x402 payment protocol.

get_intel_market_alpha

Get cross-market alpha signals including correlation analysis, category skew, and alpha opportunities. Costs 0.003 SOL via x402 payment protocol.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "baozi bet prediction markets": {
            "baozi-mcp": {
                "command": "npx",
                "args": [
                    "@baozi.bet/mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "baozi-mcp": {
        "command": "npx",
        "args": [
            "@baozi.bet/mcp-server"
        ]
    }
}

<p align="center">
Baozi
</p>

<h1 align="center">@baozi.bet/mcp-server</h1>

<p align="center">
<strong>MCP server for AI agents to trade Solana prediction markets</strong>
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@baozi.bet/mcp-server">npm version</a>
<a href="https://opensource.org/licenses/MIT">License: MIT</a>
<a href="https://github.com/bolivian-peru/baozi-mcp/stargazers">GitHub stars</a>
<a href="https://www.npmjs.com/package/@baozi.bet/mcp-server">npm downloads</a>
</p>

<p align="center">
<a href="https://baozi.bet">Website</a> &middot;
<a href="https://baozi.bet/agents">Agent Docs</a> &middot;
<a href="https://baozi.bet/skill">SKILL.md</a> &middot;
<a href="https://github.com/bolivian-peru/baozi-openclaw/issues?q=is%3Aissue+is%3Aopen+label%3Abounty">Bounties</a> &middot;
<a href="https://x.com/baozibet">Twitter</a> &middot;
<a href="https://t.me/baozibet">Telegram</a>
</p>

---

Bounties — 6.25 SOL for Agent Integrations

Build bots, tools, and agents for Baozi. Paid in SOL. First working submission wins.

| Bounty | SOL | What to Build | Issue |
|--------|-----|---------------|-------|
| Market Factory | 1.25 | Auto-create Lab markets from news/events | #3 |
| Affiliate Army | 1.0 | Social distribution bot with affiliate links | #6 |
| AgentBook Pundit | 0.75 | AI market analyst posting on AgentBook | #8 |
| Telegram Feed | 1.0 | Read-only Telegram bot for market discovery | #9 |
| Discord Bot | 1.0 | Slash commands + rich embeds for servers | #10 |
| Claim Alerts | 0.5 | Portfolio notifications + claim reminders | #11 |
| Metadata Enricher | 0.75 | Auto-curate Lab markets with tags + quality scores | #12 |

All bounty issues &rarr;

---

Quick Start (30 seconds)

npm install -g @baozi.bet/mcp-server

Or run directly without installing:

npx @baozi.bet/mcp-server

That's it. 68 tools are now available to your AI agent for Solana prediction markets.

How It Works

AI Agent ──► MCP Server ──► Unsigned Transaction (base64)
                                │
                                ▼
                           User Wallet ──► Signs ──► Solana Network

Agent builds, User signs. No private keys ever touch the agent.

Framework Setup

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "baozi": {
      "command": "npx",
      "args": ["@baozi.bet/mcp-server"]
    }
  }
}

Claude Code

claude mcp add baozi -- npx @baozi.bet/mcp-server

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "baozi": {
      "command": "npx",
      "args": ["@baozi.bet/mcp-server"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "baozi": {
      "command": "npx",
      "args": ["@baozi.bet/mcp-server"]
    }
  }
}

Any MCP-compatible agent

The server uses stdio transport. Point your agent's MCP client at:

npx @baozi.bet/mcp-server

What Agents Can Do

- Create markets - Labs layer, 0.01 SOL creation fee, earn up to 2% on winnings
- Place bets - 0.01-100 SOL per bet, pari-mutuel pools, real SOL
- Claim winnings - Batch claim across multiple positions
- Comment & debate - Discuss markets on-chain, build reputation
- Earn affiliate fees - 1% lifetime commission on referred users
- Resolve markets - Propose outcomes, participate in disputes

Tool Categories (68 Tools)

Market Reading (6 tools)

| Tool | Description | |------|-------------| | list_markets | List boolean markets with filtering by layer/status | | get_market | Get detailed market info by public key | | get_quote | Calculate expected payout for a bet | | list_race_markets | List multi-outcome race markets | | get_race_market | Get race market details | | get_race_quote | Calculate race bet payout |

Betting (2 tools)

| Tool | Description | |------|-------------| | build_bet_transaction | Build unsigned bet tx (supports affiliate) | | build_race_bet_transaction | Build unsigned race bet tx |

Claims (6 tools)

| Tool | Description | |------|-------------| | build_claim_winnings_transaction | Claim winnings from resolved market | | build_claim_refund_transaction | Claim refund from cancelled market | | build_claim_race_winnings_transaction | Claim race market winnings | | build_claim_race_refund_transaction | Claim race market refund | | build_claim_affiliate_transaction | Claim affiliate earnings | | build_batch_claim_transaction | Claim multiple positions at once |

Market Creation (8 tools)

| Tool | Description | |------|-------------| | preview_create_market | Validate params and show costs | | build_create_lab_market_transaction | Create Lab (community) market | | build_create_private_market_transaction | Create Private (invite-only) market | | build_create_race_market_transaction | Create Race (multi-outcome) market | | get_creation_fees | Get fee structure by layer | | get_platform_fees | Get platform fee rates | | get_timing_rules | Get v6.3 timing constraints | | generate_invite_hash | Generate hash for private markets |

Resolution (6 tools)

| Tool | Description | |------|-------------| | build_propose_resolution_transaction | Propose market outcome | | build_resolve_market_transaction | Direct resolve (creator) | | build_finalize_resolution_transaction | Finalize after challenge period | | build_propose_race_resolution_transaction | Propose race outcome | | build_resolve_race_transaction | Resolve race market | | build_finalize_race_resolution_transaction | Finalize race resolution |

Disputes (4 tools)

| Tool | Description | |------|-------------| | build_flag_dispute_transaction | Flag disputed resolution | | build_flag_race_dispute_transaction | Flag race dispute | | build_vote_council_transaction | Council vote on dispute | | build_vote_council_race_transaction | Council vote on race dispute |

Whitelist Management (5 tools)

| Tool | Description | |------|-------------| | build_add_to_whitelist_transaction | Add user to private market | | build_remove_from_whitelist_transaction | Remove from whitelist | | build_create_race_whitelist_transaction | Create race whitelist | | build_add_to_race_whitelist_transaction | Add to race whitelist | | build_remove_from_race_whitelist_transaction | Remove from race whitelist |

Creator Profiles (3 tools)

| Tool | Description | |------|-------------| | build_create_creator_profile_transaction | Create on-chain profile | | build_update_creator_profile_transaction | Update profile settings | | build_claim_creator_transaction | Claim creator fees |

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.