MCP server for AI agent payments โ spending firewall, budget checks, and approval flows via the Model Context Protocol
Project description
๐ณ Bonanza MCP
MCP server for AI agent payments โ spending firewall, budget checks, and approval flows
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.0pydantic>=2.0httpx>=0.24
License
Apache License 2.0 โ see LICENSE for details.
Links
- Website: bonanza-labs.com
- Live Demo: bonanza-labs.com/firewall
- x402 Adapter: pypi.org/project/bonanza-x402
- MCP Protocol: modelcontextprotocol.io
- GitHub: github.com/c6zks4gssn-droid/bonanza-labs-website
Built by Bonanza Labs ๐งจ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bonanza_mcp-0.1.0.tar.gz.
File metadata
- Download URL: bonanza_mcp-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96131926652f6a5764326692841641aefe33b6f329a5b8734bd1ef3970d6ee1
|
|
| MD5 |
39caf1fae02a328c06edefcdf5d4f037
|
|
| BLAKE2b-256 |
dd25b33acb0c4ec5c162bb970ab90967ba17a3f07e1bce38484e3875f21ceef6
|
File details
Details for the file bonanza_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bonanza_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45101af91bc04549f3c7c47a7ce434bc5efa1dc72916ddcc4b5d99ef9a477e2d
|
|
| MD5 |
a577527875b8562c2dd77b0b5f070739
|
|
| BLAKE2b-256 |
cb3102a9d9d8cfac2dbed84410515645f2f893b40937d76f36b7e7362b034fd7
|