Skip to content
SkilledDragonEngineering Intelligence
MinilabKeylessOctober 21, 2026

CajaGuard matched 25 of 25 checkout scenarios, including a basket split four ways

CajaGuard is a local MCP proxy that gates UCP complete_checkout with spend caps, a merchant allowlist and signed human approvals. All 25 scenarios matched against a fixture shop.

By David Discua

Measured in the lab

25/25
scenarios as expected
7
calls that reached the shop
0.454 ms
guard p50, allowed checkout
1.694 ms
p50 through the stdio proxy
allowwithin caps5
allow_approvedsigned approval2
blockedneeds a valid approval8
deniedhard rule10
  • Fourth USD 45.00 split checkout denied as over_window_cap
  • Replayed approval blocked as approval_already_used
  • Approval with an edited expires_at blocked as approval_bad_signature
  • Agent-sent totals refused as request_field_not_allowed
  • Raw PAN and live-looking token denied as test_mode_credential

From reports/cajaguard.json · run on October 21, 2026. Bun 1.4.3, @modelcontextprotocol/sdk 1.32.1, UCP spec v2026-08-25; fixture shop only, real Ed25519 keys

How it is wired

UCP toolsget_checkoutapprove idShopping agentApproverEd25519 signatureCajaGuardMCP proxyCommerce serverfixture shop

01/03A shopping agent calls UCP tools through CajaGuard.

Shopping MCP servers that speak the Universal Commerce Protocol can create a checkout and place the order, so an agent that can browse can also pay. CajaGuard is a local MCP proxy that passes every UCP tool through except complete_checkout, which it checks against per-currency spend caps, a rolling window, a merchant allowlist and, above a threshold, a signed, single-use human approval. We ran 25 scenarios against a fixture shop and every one got the expected verdict. Nothing here touched a real store or payment handler.

The catch

The shop is a fixture in the repo. Its tool names and argument shapes follow the pinned UCP spec (tag v2026-08-25) and Shopify's Checkout, Cart and Catalog MCP docs, and its totals carry no tax, shipping or discounts. No real Shopify store, Bearer-token auth or payment handler was exercised.

The trust root is local. An agent that can read the approver's private key, or write the config, the spend ledger or consumed.jsonl, can get around the gate. Only calls through the proxy are gated, so an agent with the shop endpoint, a browser or a stored card has other ways to pay. We could not find a Shop Pay token format in the UCP spec or Shopify's docs, so CajaGuard does not recognize Shop Pay tokens as such. In test mode only allowlisted test handlers pass, which refuses a shop_pay instrument by its handler id.

What we ran (keyless)

bun install --frozen-lockfile
bun run cajaguard keygen
bun run demo buy "Trail socks" 2
bun run demo buy "Day pack"
bun run report

From reports/cajaguard.json, generated on October 21, 2026 (Bun 1.4.3, MCP TypeScript SDK 1.32.1, real Ed25519 keys). USD caps were approval above 50.00, 100.00 per transaction and 150.00 per 24-hour window. Nine of the 25 rows:

ScenarioTotalVerdictReasonReached shop
2 x Trail socks, test tokenUSD 24.00allowwithin_capsyes
Down parkaUSD 219.00deniedover_per_transaction_capno
Day pack, no approval yetUSD 89.00blockedpending_approvalno
Day pack + signed approvalUSD 89.00allow_approvedsigned_approvalyes
Same approval replayedUSD 89.00blockedapproval_already_usedno
Approval with edited expires_atUSD 89.00blockedapproval_bad_signatureno
Basket grew 5 to 8 socksUSD 96.00blockedpending_approvalno
Split purchase 4 of 4USD 45.00deniedover_window_capno
Raw PAN in test mode-deniedtest_mode_credentialno

Seven of the 25 calls reached the shop. In the split, three USD 45.00 Rain shell checkouts went through and the fourth was denied, because completed spend, approved spend included, counts toward the window. Over 200 runs, the guard decided an allowed checkout at p50 0.454 ms. A full complete_checkout through the stdio proxy to the fixture took p50 1.694 ms over 20 runs.

How it is wired

On complete_checkout, CajaGuard calls the shop's own get_checkout and takes the total, currency, status and merchant from it. If the agent sends totals, currency or line_items, the call is refused, because UCP marks those fields as business-owned. Amounts must be integers in ISO 4217 minor units, so a shop that reports 49.99 is refused. Above the threshold, the gate writes a pending request whose id is a SHA-256 digest of the payment, and a human runs cajaguard approve <id>, which re-reads the checkout, asks y/N and writes an Ed25519-signed approval with an expiry. The gate spends it once, before the payment call.

Minilab (open source)

The tool shapes come from Universal-Commerce-Protocol/ucp (3,443 stars, Apache-2.0, Python), whose spec files are vendored unmodified. The design was inspired by gethelio/helio (14 stars, Apache-2.0, TypeScript), an MCP governance proxy that is not bundled or called. Star counts are as of October 24, 2026. Re-run bun run report and check that it still says 25/25, then copy examples/cajaguard.demo.json to set your own caps.

Run it yourself

SkilledDragonCorp/cajaguard

Clone, install and run the report with no API keys. The numbers above are what that run writes.

bun install --frozen-lockfile && bun run report

SkilledDragon is not affiliated with Shopify, the Universal Commerce Protocol project, Helio, Anthropic or the Model Context Protocol project. Numbers are from our own keyless lab run against a fixture shop; re-run the report before relying on them. Marks belong to their owners.

All labs