Tools from a manifest
Describe actions once, in JSON or YAML. Strict validation reports every problem at once.
An agent reads a player’s state, sells some food, and is stopped by a daily cap and a cooldown.
Every command is real. Run it yourself with scripts/demo.sh.

The agent never talks to your backend. It calls a tool on the gateway, and the gateway decides whether that call may happen, in a fixed order, before anything reaches the game.
A one hour soak test at a steady rate, with real Redis and Postgres behind the gateway. Flat lines mean the gateway does not leak memory, connections or policy state while it runs.
| Measure | Value |
|---|---|
| Calls in total | 359,763 (287,870 succeeded, 71,892 denied by policy or the backend, 1 failed) |
| Latency p50, p95, p99 and the slowest call | 1.87, 4.45, 6.55 and 202.09 ms |
| Gateway memory, first and last sample | 11 and 17.8 MiB (peak 18.9) |
| Gateway CPU | 7.1 to 14.4 percent of one core |
| Redis policy keys | 666 at the start, 4,000 at the end (two per simulated player) |
| Postgres sessions | 7 at the start, 14 at the end. This is the gateway's pool filling towards its cap of 8, plus Postgres's own background processes. It was level for the second half of the run. |
| Readiness failures | 0 in 97 samples |
Measured on Darwin arm64, Docker Compose, one gateway, Redis, Postgres and a fake backend on the same machine, on 2026-11-19. It is a single machine with a fake backend that answers instantly, so the figures show what the gateway adds (policy, validation, signing, audit and the Redis and Postgres round trips), not what your game's own backend will cost. 71,892 calls were denied on purpose by the demo's limits and the fake backend, and are not failures. Repeat it yourself withscripts/soak.sh, described in the runbook.
The same signed request, sent straight to the backend and then through the gateway, at the same load. The difference is the gateway’s own work.
| Run | p50 | p95 | p99 | Calls per second |
|---|---|---|---|---|
| A read tool, alone, 100/s | 0.66 ms | 1.93 ms | 4.15 ms | 100 |
| A read tool, through the gateway, 100/s | 2.91 ms | 5.46 ms | 8.23 ms | 100 |
| A read tool, added by the gateway | +2.25 ms | +3.54 ms | +4.08 ms | |
| A capped action tool, alone, 100/s | 0.71 ms | 1.66 ms | 2.94 ms | 100 |
| A capped action tool, through the gateway, 100/s | 3.23 ms | 5.12 ms | 6.65 ms | 100 |
| A capped action tool, added by the gateway | +2.52 ms | +3.46 ms | +3.71 ms | |
| A read tool, alone, flat out | 0.16 ms | 0.87 ms | 1.57 ms | 117,899 |
| A read tool, through the gateway, flat out | 2.47 ms | 3.83 ms | 5.43 ms | 11,964 |
| A capped action tool, alone, flat out | 0.18 ms | 1.06 ms | 1.75 ms | 101,532 |
| A capped action tool, through the gateway, flat out | 2.59 ms | 4.41 ms | 6.38 ms | 11,260 |
Median of 3 repetitions, each 60 seconds paced and 20 seconds flat out after a 5 second warmup, with 32 workers and 20,000 simulated players. Measured on Docker Desktop (aarch64), Docker 29.9.3 with 8 CPUs and 8 GiB, one gateway, Redis, Postgres and a fake backend on the same machine, on 2026-11-19. The fake backend answers in microseconds, so almost all of the time shown is the gateway's own work (policy in Redis, validation, signing, the audit write), and a real game backend that takes tens of milliseconds will make the gateway's share much smaller. "Flat out" is limited by this one laptop and by the load generator, so read it as a floor for one gateway process, not a ceiling. Repeat it withscripts/bench-overhead.sh, described in the runbook.
Tools from a manifest
Describe actions once, in JSON or YAML. Strict validation reports every problem at once.
Policy per tier
Read, safe, medium and sensitive tiers. Sensitive tools stay hidden from agents.
Caps and cooldowns
Daily call and amount caps, cooldowns and rate limits. Caps reserve first, so concurrent calls cannot overspend.
Signed backend calls
HMAC-SHA256 with a timestamp and an idempotency key. Any language can verify it in a few lines.
Player confirmations
Mark a tool confirm and the player approves each call in your own UI before it runs.
OAuth linking
An embedded OAuth 2.1 server links a player’s agent with PKCE. Players list and revoke agents.
Kill switches
Turn off a tool, a player or everything, and the next call is refused.
Audit with hashed arguments
Every attempt is recorded, allowed or denied. The log keeps hashes, not game data.
Live manifest and keys
Upload and roll back manifests, and rotate signing keys, without a restart.
MCP over streamable HTTP
Works with any MCP client. A stdio bridge covers desktop clients.
Six rules the gateway is built around, in plain words.
Map each tool onto a REST endpoint you already have. No backend code.
Your backend verifies the signature and handles tool calls, in any language.
For games whose logic runs in the client. The game opens a WebSocket and the gateway sends calls down it.
version: 1tools: - name: sell_resource description: Sell food, water or materials at the current sell price. tier: medium caps: {per_day_amount: 300, amount_param: quantity} http: {method: POST, url: /api/v1/market/sell} params: resource: {type: string, enum: [food, water, materials]} quantity: {type: integer, min: 1, max: 1000}POST /api/v1/market/sellX-AG-Key-Id: studio-1X-AG-Timestamp: 1767268800X-AG-Player: player-7X-AG-Idempotency-Key: 3f2c9a1e-7b44-4c0e-9d41-0a6f1b2c8d55X-AG-Signature: 9b1e...hex HMAC-SHA256 of the request...{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "sell_resource", "arguments": { "resource": "food", "quantity": 50 } }}