Skip to main content

💳 Bonanza MCP

MCP server for AI agent payments — spending firewall, budget checks, and approval flows

PyPI Python License MCP x402

Use Bonanza's spending firewall directly from Claude, GPT, or any MCP-compatible AI agent. Check budgets, evaluate payments, approve spending, and audit transactions — all through natural language.

Why?

AI agents are making payments, but they need guardrails. Bonanza MCP brings our spending firewall to the Model Context Protocol — the standard way AI models interact with tools.

Instead of writing custom code, your AI agent can simply call:

"Check if I can pay $5.00 for weather data" "What's my remaining budget?" "Approve payment to api.premium-data.com" "Show my spending history"

Installation

pip install bonanza-mcp

With x402 protocol support:

pip install bonanza-mcp[x402]

Quick Start

1. Configure Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bonanza": {
      "command": "bonanza-mcp",
      "args": ["--max-budget", "10.00", "--require-approval-above", "5.00"]
    }
  }
}

2. Use in conversation

You: Check my budget
Claude: Your current spending is $2.50 out of $10.00 (25%). You have $7.50 remaining.

You: Can I pay $3.00 for API data from weather.com?
Claude: ✅ Payment approved: $3.00 to weather.com
   Reason: All checks passed
   Risk level: LOW (0.20)
   Remaining budget: $4.50

You: Pay $8.00 for premium AI analysis
Claude: ❌ Payment blocked: Session budget exceeded: $2.50 + $8.00 > $10.00

You: Pay $6.00 for verified data from api.trusted.com
Claude: ⏳ Requires human approval: $6.00 exceeds the approval threshold ($5.00)
   Approval URL: https://bonanza-labs.com/firewall/approve/abc-123

3. Use programmatically

from bonanza_mcp import BonanzaMCPServer

server = BonanzaMCPServer(
    max_budget_usd=10.00,
    require_approval_above=5.00,
    trusted_vendors=["api.weather.com", "api.data.gov"],
    allowed_networks=["base", "solana"],
)

# Run as MCP server
server.run()

MCP Tools

Tool Description
check_budget Show current spending and remaining budget
evaluate_payment Evaluate a payment against firewall policy
approve_payment Approve a pending payment
reject_payment Reject a pending payment
spending_history View recent spending with filters
set_budget Update the budget for the current session
add_vendor Add a vendor to the trusted list
remove_vendor Remove a vendor from the trusted list
risk_assessment Assess risk level for a vendor/amount

Architecture

┌─────────────┐     ┌──────────────────┐     ┌─────────────┐
│  AI Agent   │────▶│  Bonanza MCP     │────▶│  Firewall   │
│  (Claude/   │     │  Server           │     │  Engine     │
│   GPT/...)  │     │                  │     │             │
└─────────────┘     │  ┌────────────┐  │     │  ┌────────┐ │
                    │  │ Budget     │  │     │  │ Policy  │ │
                    │  │ Check      │──┼────▶│  │ Engine  │ │
                    │  ├────────────┤  │     │  └────────┘ │
                    │  │ Risk       │  │     │             │
                    │  │ Score      │  │     │  ┌────────┐ │
                    │  ├────────────┤  │     │  │ Audit   │ │
                    │  │ Vendor     │  │────▶│  │ Log     │ │
                    │  │ Allowlist  │  │     │  └────────┘ │
                    │  └────────────┘  │     └─────────────┘
                    └──────────────────┘

Comparison

Feature bonanza-mcp AgentBudget MCP Lightning MCP
Budget limits ✅ ✅ ❌
Vendor allowlist ✅ ❌ ❌
Risk scoring ✅ ❌ ❌
Human approval queue ✅ ❌ ❌
Stripe checkout ✅ ❌ ❌
x402 integration ✅ ❌ ❌
Crypto (USDC/SOL) ✅ ❌ ✅
Audit trail ✅ ✅ ❌
MCP protocol ✅ ❌ ✅

Requirements

  • Python 3.10+
  • mcp>=1.0.0
  • pydantic>=2.0
  • httpx>=0.24

License

Apache License 2.0 — see LICENSE for details.

Links


Built by Bonanza Labs 🧨

Metadata

Release files for bonanza-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bonanza-mcp 0.1.0
File Size Uploaded Provenance
bonanza_mcp-0.1.0.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bonanza-mcp 0.1.0
File Interpreter ABI Platform
bonanza_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / bonanza_mcp-0.1.0.tar.gz

Download URL bonanza_mcp-0.1.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f96131926652f6a5764326692841641aefe33b6f329a5b8734bd1ef3970d6ee1
BLAKE2b-256 checksum
How to use checksums
dd25b33acb0c4ec5c162bb970ab90967ba17a3f07e1bce38484e3875f21ceef6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / bonanza_mcp-0.1.0-py3-none-any.whl

Download URL bonanza_mcp-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45101af91bc04549f3c7c47a7ce434bc5efa1dc72916ddcc4b5d99ef9a477e2d
BLAKE2b-256 checksum
How to use checksums
cb3102a9d9d8cfac2dbed84410515645f2f893b40937d76f36b7e7362b034fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for bonanza-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page