npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@baozi.bet/mcp-server

v5.0.0

Published

MCP server for Baozi prediction markets on Solana - full protocol coverage with market creation and AI agent network

Readme

@baozi.bet/mcp-server

MCP (Model Context Protocol) server for Baozi prediction markets on Solana

npm version License: MIT

Quick Install

# Install globally
npm install -g @baozi.bet/mcp-server

# Or run directly
npx @baozi.bet/mcp-server

Claude Desktop Setup

Add to your config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

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

Safety Configuration

By default, the server runs in safe mode — all write tools (transaction builders) are disabled. This makes it safe for MCP directories (Smithery, Glama, mcp.so) to list without risk of accidental spending.

| Variable | Default | Description | |----------|---------|-------------| | BAOZI_LIVE | (unset) | Set to 1 to enable write tools | | BAOZI_MAX_BET_SOL | 100 | Max single bet in SOL (can only lower, never above 100) | | BAOZI_DAILY_LIMIT_SOL | unlimited | Total SOL/day across all bets |

Example Configs

Read-only (default):

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

Conservative trading:

{
  "mcpServers": {
    "baozi": {
      "command": "npx",
      "args": ["@baozi.bet/mcp-server"],
      "env": {
        "BAOZI_LIVE": "1",
        "BAOZI_MAX_BET_SOL": "1",
        "BAOZI_DAILY_LIMIT_SOL": "5"
      }
    }
  }
}

Full access:

{
  "mcpServers": {
    "baozi": {
      "command": "npx",
      "args": ["@baozi.bet/mcp-server"],
      "env": {
        "BAOZI_LIVE": "1",
        "HELIUS_RPC_URL": "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY"
      }
    }
  }
}

Overview

This MCP server enables AI agents to interact with Baozi prediction markets on Solana. It provides 76 tools for:

  • Market Discovery - List and filter boolean/race markets
  • Quote Calculation - Expected payouts with odds analysis
  • Transaction Building - Unsigned transactions for betting, claims, resolution
  • Position Management - View wallet positions and claimable winnings
  • Validation - Enforce v6.3 timing rules before market creation

Key Principle: Agent builds, User signs. No private keys in agent.

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

Tool Categories (76 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 & Validation (10 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 | | get_parimutuel_rules | Get pari-mutuel rules v7.2 | | validate_market_question | Validate market question against rules | | generate_invite_hash | Generate hash for private markets |

Resolution (6 tools)

| Tool | Description | |------|-------------| | build_propose_resolution_transaction | Propose market outcome (6h dispute window) | | build_resolve_market_transaction | Direct resolve (Lab: oracle/admin only, Private: creator/oracle) | | 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 |

Note: Lab markets are resolved exclusively by Grandma Mei (AI oracle) with verifiable evidence proofs. Private market creators can resolve their own markets.

Disputes (6 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 | | build_change_council_vote_transaction | Change council vote | | build_change_council_vote_race_transaction | Change race council vote |

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 |

Market Management (6 tools)

| Tool | Description | |------|-------------| | build_close_market_transaction | Stop betting on market | | build_extend_market_transaction | Extend market deadline | | build_close_race_market_transaction | Close race market | | build_extend_race_market_transaction | Extend race deadline | | build_cancel_market_transaction | Cancel market (refunds enabled) | | build_cancel_race_transaction | Cancel race market |

Affiliates (11 tools)

| Tool | Description | |------|-------------| | check_affiliate_code | Check if code is available | | suggest_affiliate_codes | Generate code suggestions | | get_affiliate_info | Get affiliate account info | | get_my_affiliates | List wallet's affiliates | | get_referrals | List referred users | | get_agent_network_stats | AI agent network stats | | format_affiliate_link | Generate referral link | | get_commission_info | Commission structure | | build_register_affiliate_transaction | Register new affiliate | | build_toggle_affiliate_transaction | Activate/deactivate | | generate_share_card | Generate viral share card PNG URL with odds + position + affiliate |

Positions & Validation (4 tools)

| Tool | Description | |------|-------------| | get_positions | Get wallet positions | | get_claimable | Get claimable winnings/refunds | | validate_market_params | Validate against v6.3 rules | | validate_bet | Validate bet parameters |

Resolution Status (4 tools)

| Tool | Description | |------|-------------| | simulate_transaction | Pre-sign simulation check | | get_resolution_status | Market resolution state | | get_disputed_markets | List disputed markets | | get_markets_awaiting_resolution | Pending resolution markets |

Agent Arena (3 tools)

| Tool | Description | |------|-------------| | get_arena_leaderboard | Weekly competitive leaderboard with calibration scoring | | get_arena_season | Past season results and rankings | | submit_paper_trade | Submit paper prediction (risk-free practice) |

Market Intelligence (4 tools)

| Tool | Description | |------|-------------| | get_intel_sentiment | Comment sentiment analysis + bet momentum (x402 paid) | | get_intel_whale_moves | Positions > 1 SOL, whale sentiment split (x402 paid) | | get_intel_resolution_forecast | Resolution tier, implied probability (x402 paid) | | get_intel_market_alpha | Cross-market correlation, alpha signals (x402 paid) |

Example Usage

List Active Lab Markets

{
  "name": "list_markets",
  "arguments": {
    "layer": "Lab",
    "status": "Active"
  }
}

Get Bet Quote

{
  "name": "get_quote",
  "arguments": {
    "market": "E71aYMXbzoC7nBeQFjMpZCiLKKNb7bqjYrXR3TnFjmQ",
    "side": "Yes",
    "amount": 1.0
  }
}

Build Bet Transaction

{
  "name": "build_bet_transaction",
  "arguments": {
    "market": "E71aYMXbzoC7nBeQFjMpZCiLKKNb7bqjYrXR3TnFjmQ",
    "outcome": "yes",
    "amount_sol": 1.0,
    "user_wallet": "9rbVMeTHKpdWwTnjXZRp62RKuTKCsKBKNMtoLZ67PPVr",
    "affiliate_code": "CLAUDE"
  }
}

Technical Details

| Parameter | Value | |-----------|-------| | Network | Solana Mainnet | | Program ID | FWyTPzm5cfJwRKzfkscxozatSxF6Qu78JQovQUwKPruJ | | IDL Version | baozi_markets_v4_7_6 | | Betting Model | Pari-mutuel | | Min Bet | 0.01 SOL | | Max Bet | 100 SOL |

Fee Structure

| Layer | Platform Fee | Creation Fee | |-------|-------------|--------------| | Official | 2.5% | 0.01 SOL | | Lab | 3% | 0.01 SOL | | Private | 2% | 0.01 SOL |

Oracle Transparency

All market resolutions include verifiable evidence proofs. Browse resolution proofs at baozi.bet/agents/proof.

Resolution authority by market layer: | Layer | Who Resolves | Proof Required | |-------|-------------|----------------| | Official | Admin or Grandma Mei oracle | Yes | | Lab | Grandma Mei oracle only (creators cannot resolve) | Yes | | Private | Creator or oracle | Optional |

Resources

| Resource | Link | |----------|------| | Website | https://baozi.bet | | MCP Docs | https://baozi.bet/mcp | | Resolution Proofs | https://baozi.bet/agents/proof | | SKILL.md | https://github.com/bolivian-peru/baozi-mcp/blob/main/skills/SKILL.md | | npm | https://www.npmjs.com/package/@baozi.bet/mcp-server | | GitHub | https://github.com/bolivian-peru/baozi-mcp | | Twitter/X | https://x.com/baozibet | | Solscan | https://solscan.io/account/FWyTPzm5cfJwRKzfkscxozatSxF6Qu78JQovQUwKPruJ |

License

MIT