- AgentBill MCP
AgentBill MCP
What is AgentBill?
AgentBill is a preflight gate for AI agent runs. It blocks runaway loops before they start — not after the damage is done.
Why not just use monthly caps?
Monthly caps don't catch the bad single run. One 3-hour research loop can blow your budget before the cap triggers. AgentBill enforces a ceiling at the invocation level.
How it works
- Call
preflight()before the agent runs — AgentBill checks budget and blocks if exceeded - Agent runs
- Call
record_event()after — logs usage for billing
Two tool calls. That's it.
Install
pip install agentbill-sdk
Quick start
from agentbill import AgentBillClient
client = AgentBillClient(api_key="agb_your_key") check = client.preflight(agent_id="researcher", budget=5.00) if not check.approved: raise Exception("Budget exceeded") client.record(agent_id="researcher", cost=check.estimated_cost)
Free tier
1,000 preflight calls/month. No credit card required.
Get your API key: https://agentbill.fly.dev/register
Server Config
{
"mcpServers": {
"agentbill": {
"command": "uvx",
"args": [
"agentbill-mcp"
],
"env": {
"AGENTBILL_API_KEY": "your-api-key"
}
}
}
}