Agent Clearing Desk
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Agent Clearing Desk
A spend gate for AI agents that call paid tools. Each agent key has a hard budget (one-off, daily or monthly) and a tool allowlist; every call is cleared before it runs and returns an Ed25519-signed receipt that anyone can verify offline.
Live desk and judge sandbox: https://agent-clearing-desk.nguyenhieuec.workers.dev
MCP endpoint:
/mcp(Streamable HTTP, JSON responses)REST:
POST /v1/tools/:name/runPublic signing key:
/.well-known/receipt-signing-key.jsonGaluxium Nexus V2 package: submission/galuxium/
How a call is cleared
Unknown tool: 404. Arguments that break the input schema: 400 with the problems. Nothing is charged.
Tool not on the allowlist: 403 with a signed receipt. Too many failed calls this hour: 429.
One conditional
UPDATEreserves the price; if the budget has no room, 402 with a signed receipt.The upstream runs. On failure, timeout or refused arguments the reservation is refunded to its own budget period (502, 504 or 400).
On success the price is charged and the receipt signs the input hash, result hash, amount and upstream cost (SHA-256 over canonical JSON).
Operators add a tool from any MCP server at run time with POST /api/admin/tools; the desk runs the MCP session handshake and reads that server's tools/list for the schema.
An optional upstream credential header is sealed with AES-256-GCM and never returned.
Money is integer millicents.
The audit log and receipts are append-only.
Receipts are visible only within their organization.
Related MCP server: genpark-agent-budget-token-spend-circuit-breaker-skill
Run it
npm install
npm test # real SQLite (node:sqlite, Node 22.5+), production migrations
npm run typecheck
npm run db:migrate:local
npm run devSecrets for a deployment:
Secret | What it is |
| Ed25519 private key as JWK JSON |
| Bearer token for |
| OpenKrill Connect refresh token; seeds the first refresh, later tokens rotate in D1 |
| Optional static OpenKrill API key; when set it replaces the Connect token |
| 32 random bytes in base64; seals credentials of operator-added MCP servers (unset: such credentials are refused) |
OPENKRILL_CLIENT_ID (the Connect client) is a plain var in wrangler.jsonc.
If a refresh token ever stops working, set a new seed and delete the upstream_credentials row.
Scripts:
scripts/run-e2e.mjs: live end-to-end run (operator flow withADMIN_SECRET).scripts/verify-receipt.mjs response.json [public-key.json] [--input args.json]: offline check of the signature, the result hash, the input hash and the readable copy; takes a REST response, an MCPtools/callresult or a bare receipt.scripts/sync-tool-schemas.mjs: copies input schemas from the upstreams.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Zero-custody agentic spend firewall with <50ms kill-switch, 1-tap 2FA holds & audit hash chains.
Pre-spend firewall for AI agents. Approves, blocks, flags transactions against policy rules.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to use payment APIs safely by gating every tool call through deterministic mandates, value checks, and an exactly-once ledger, so they cannot pay twice or exceed authorisation.MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous agents to enforce financial guardrails by tracking real-time token burn and cost velocity, automatically throttling or freezing execution when budgets are exceeded. It also blocks destructive shell commands, prompt injections, and runaway planning loops while sanitizing outputs before they are returned.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to call backend tools under per-agent policy, deciding which tools each agent can see, what arguments it may pass, how often it may call, and which writes wait for human approval. It also redacts secrets and PII from tool results, fences untrusted output against injection, and records every call in a hash-chained audit log.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to call tools only under declarative allow/deny/confirm policies with constraints and rate limits, while recording an append-only, credential-redacted audit trail of each attempted call.MIT