Agent Token Budget MCP — per-session spend cap with signed budget-exhausted attestations. Twin of bft-progress-council-mcp (spend-axis vs stall-axis guardrail). By MEOK AI Labs.
Project description
Agent Token Budget MCP
🧱 Part of the MEOK A2A Substrate
13 A2A primitives as one signed pipeline for £499/mo (100K calls). See meok.ai/a2a.
Hard spend cap per agent session
The product
Hard token + spend cap per agent session. Agent declares a budget at session start. Every action records its token cost. When 80% of budget is consumed, the agent gets a soft warning. At 100%, the next call is refused with a signed budget-exhausted attestation that auditors can verify.
This is the BFT Progress Council MCP's twin — Progress Council halts on stall, this MCP halts on spend. Together they're the two-axis guardrail for agentic loops.
Tools
| Tool | Purpose |
|---|---|
start_budget(budget_gbp, session_id?, tenant_id?, description?) |
Open a budgeted session |
record_call(session_id, model, input_tokens, output_tokens, note?) |
Record cost of one LLM call |
check_budget(session_id, estimated_next_call_gbp?) |
Pre-flight: should the next call proceed? |
get_summary(session_id) |
Full breakdown by model + signed total |
list_models() |
Supported model IDs + blended £/1K rates |
estimate_cost(model, input_tokens, output_tokens) |
Cost preview |
Supported models
Pre-loaded blended £/1K-token rates for: Claude Opus 4.7, Sonnet 4.6, Haiku 4.5, GPT-5, GPT-5-mini, Gemini 2.5 Pro/Flash, Llama 3.3 70B, Step 3.6 Flash, DeepSeek-R1, Qwen 2.5, Kimi K2.5, Ollama (local = £0). Default rate £0.025/1K applies for unknown models. Override per-session if you have negotiated pricing.
Use cases
- Cap one agent run at £5 of tokens → user upgrades after
- Multi-tenant fleets — track per-tenant spend for billing
- Trial users — £0.50 budget, then upgrade gate fires
- Customer support — "agent used £X helping ticket #Y" as signed evidence
- Pair with
bft-progress-council-mcpfor combined stall + spend guards
Quick install
uvx agent-token-budget-mcp
pip install agent-token-budget-mcp
{
"mcpServers": {
"agent-token-budget": {
"command": "uvx",
"args": ["agent-token-budget-mcp"]
}
}
}
Worked example
# Open £5 budget for one agent session
{"tool": "start_budget", "args": {"budget_gbp": 5.00, "description": "Customer support ticket #42"}}
# → { session_id: "budget_1779...", budget_gbp: 5.0 }
# Every time the agent calls an LLM, record it
{"tool": "record_call", "args": {
"session_id": "budget_1779...",
"model": "claude-opus-4.7",
"input_tokens": 8000,
"output_tokens": 1500,
"note": "Initial diagnosis"
}}
# → { call_cost_gbp: 0.38, total_spent_gbp: 0.38, budget_remaining_gbp: 4.62, status: "ok" }
# Before any expensive call, check_budget()
{"tool": "check_budget", "args": {"session_id": "budget_1779...", "estimated_next_call_gbp": 0.50}}
# → { allowed: true, budget_remaining_gbp: 4.62 }
# When budget hits 100%, next check_budget returns:
# → { allowed: false, reason: "budget_exhausted", signed_attestation: {...verify.meok.ai...} }
Sister MCPs
Part of the MEOK A2A pack:
bft-progress-council-mcp— twin guardrail (stall axis)agent-rate-limiter-mcp— call-count throttleagent-audit-logger-mcp— hash-chained log of every record_callagent-policy-enforcement-mcp— per-agent IAM gates
Full catalogue: meok.ai/anthropic-registry
Protocol coverage + Universal PAYG
| Option | Price | Best for |
|---|---|---|
| Self-host | £0 — MIT | Devs |
| Universal PAYG | £29/mo + £0.0002/call | Spiky usage |
| A2A Substrate | £499/mo | All 13 A2A MCPs |
| Universe | £1,499/mo | All 49 MCPs |
| Defence | £4,990/mo | Enterprise |
Buy: https://meok.ai/a2a
Wire it up — full stack
This MCP is part of the MEOK chain that turns one agent action into a fully signed compliance event. See meok.ai/mcp-stack for the 6-MCP chain:
- bft-progress-council-mcp — anti-loop guardrail
- agent-token-budget-mcp — hard spend cap
- agent-content-watermark-mcp — EU AI Act Article 50(2) watermark
- meok-eu-aigc-icon-mcp — EU Code-of-Practice icon (Nov 2026 cliff)
- agent-audit-logger-mcp — hash-chained audit trail
- a2a-governance-bridge-mcp — fold all signatures into one signed event
Output: ONE auditor-defensible evidence event mapped to EU AI Act Articles 12 + 50, DORA Article 17, ISO 42001 clause 9 — plus a public verify URL.
Licence
MIT. By MEOK AI Labs (CSOAI LTD, UK Companies House 16939677).
💸 Try MEOK in 30 seconds — instant buy ladder
| Tier | Price | What you get | Stripe |
|---|---|---|---|
| Smoke test | £1 | Signed sample MCP-Hardening report + Article 50 PDF | https://buy.stripe.com/dRmcN75ScdQS7oh1Uc8k90U |
| Quick Kit | £9 | EU AI Act Article 50 implementation guide (C2PA + EU-Icon) | https://buy.stripe.com/cNi00la8s1460ZT0Q88k90V |
| Founder Call | £29 | 30-min 1-on-1 with the founder | https://buy.stripe.com/8x228ta8s6oqbExaqI8k90W |
Refundable. UK Stripe — VAT-clean. Builds on the 81-MCP MEOK fleet. Verify any signed report at https://meok.ai/verify.
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 agent_token_budget_mcp-1.1.1.tar.gz.
File metadata
- Download URL: agent_token_budget_mcp-1.1.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e1fbb50f791923eb3c9ad7ed08953fd225f7788d54e37d307a03ed0739c77bd
|
|
| MD5 |
c63e91795325257f3841b2e95bf92448
|
|
| BLAKE2b-256 |
746c83aace3b3dad1776fc77789bf57a1dcd6ef0219d6b33398df3466c0a358e
|
File details
Details for the file agent_token_budget_mcp-1.1.1-py3-none-any.whl.
File metadata
- Download URL: agent_token_budget_mcp-1.1.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0d4a7cf4eefe560c21030824b0355dbf376c2946267533fb59cae77d5c9a7b
|
|
| MD5 |
866496861ebde3a2b2ff3f17ff23bbc5
|
|
| BLAKE2b-256 |
577b6a6e5aeaf0c3c6c29c5bd0ebe901ed58393dd6cc68b42af89fd982103ed3
|