gamacua — verified desktop actions, with a receipt for every click
An MCP server that drives a real desktop through our HC daemon and proves what happened: every action returns a hash-chained receipt with the screen state before and after, so "done" is a claim you can check offline.
cua_observe(node) → screenshot sha, size, OCR text, window titles
cua_click_text(node, text) → click + receipt (changed: true/false)
cua_click_id(node, element_id, sha) → click a set-of-marks id, refuses if the screenshot is stale
cua_type(node, text) → type + receipt
cua_verify(node, expect_text) → wait for the expected state
cua_receipts_tail(n) → last n receipts (hash chain)
cua_receipts_verify() → offline chain check, no daemon needed
Contract
mcp_contract.json is the machine-readable promise: server name, version, transport (stdio), and every tool with
its JSON Schema input plus a tools_sha256 over the canonical tool list. The file is generated from the same code
that serves the tools, so it cannot drift:
gamacua --contract # print the contract
gamacua --write-contract # regenerate mcp_contract.json
gamacua --selftest # {"ok": true, "tools": 9, "contract": "gamacua/0.1.3#…"}
gamacua --version # gamacua 0.1.3
--selftest speaks JSON-RPC to a fresh stdio server (initialize, tools/list), validates every input schema and
compares it with the contract. It needs no token, no HC daemon and no network; a failing check exits 1.
Three calls
1. A receipt with before/after state — the action only counts if the screen sha changed:
{"tool": "cua_click_label", "arguments": {"node": "kuca", "text": "Datoteka"}}
→ {"ok": true, "changed": true, "matched": "Datoteka",
"receipt": {"tool": "tap", "before_sha": "c4f19beb…", "after_sha": "9b02c1d7…",
"changed": true, "verdict": "ok", "prev_hash": "…", "hash": "96fdd339…"}}
2. The hash chain — each receipt commits to the previous one, so history cannot be rewritten silently:
{"tool": "cua_receipts_tail", "arguments": {"n": 2}}
→ [{"tool": "tap", "prev_hash": "…", "hash": "96fdd339…"},
{"tool": "key", "prev_hash": "96fdd339…", "hash": "09a67782…"}]
3. Verification — recompute the whole chain offline (works without the HC daemon):
{"tool": "cua_receipts_verify", "arguments": {}}
→ {"ok": true, "count": 6, "broken_at": null, "head": "ff42f62c…", "file": "/root/.gamacua/receipts.jsonl"}
If anyone edits a receipt, the next line's prev_hash no longer matches and broken_at points at it.
Why this exists
Cloud computer-use agents cannot show that an action happened. Anthropic's own docs warn the model "acts as if its actions succeeded"; in a published measurement an unwrapped agent reported "done" on 44/44 runs and passed 0/44. This server makes the opposite trade: an action only counts as done when the screen or the system of record changed, and the proof is written to an append-only receipt chain.
Install
pip install -e .
export GAMA_HC_TOKEN="$(cat ~/.gama_hc_token)" # or set it in the MCP config
export GAMACUA_ALLOW_ACTIONS=1 # read-only unless set
MCP client config (Claude Desktop / Cursor / any MCP host). pip install -e .
installs a gamacua console script, so no absolute path is needed:
{
"mcpServers": {
"gamacua": {
"command": "gamacua",
"env": { "GAMACUA_ALLOW_ACTIONS": "1" }
}
}
}
Without installing, point python3 at the module inside the checkout:
"command": "python3", "args": ["-m", "gamacua_mcp"] run from the repo root.
Demo (real Windows desktop, 2 Dec 2026)
python3 demo_public.py --node kuca — 10 steps, only Notepad and our own test text (no user files, no
accounts, no internal systems):
1. observe (baseline) ok scale=[1.25,1.25]
2. open notepad ok
3. window present ok 19 windows
4. click label 'Datoteka' ok changed=true ← OCR + DPI scaling + receipt
5. key esc ok changed=true
6. type text ok changed=true
7. verify text via OCR ok found
8. key enter ok changed=true
9. close notepad (alt+f4) ok changed=true
10. discard changes ok changed=true
6 receipts, hash chain verified (prev_hash of each row equals hash of the previous one):
tap changed=True 96fdd339→09a67782
key changed=True 143b6710→f064dab8
type changed=True 30cc2499→8fe43e93
key changed=True 54ed9438→1edc2f13
key changed=True 028af98d→93e0e85a
tap changed=True 63debd6c→ff42f62c
Artifacts: demo/summary_public.json and demo/receipts_public.jsonl.
Receipts
~/.gamacua/receipts.jsonl, one JSON object per action:
{"ts":"2026-12-02T21:04:00Z","node":"contabo","tool":"click_text","args_sha":"…",
"before_sha":"c4f19beb…","after_sha":"…","changed":true,"proof":{"daemon":true},
"verdict":"ok","prev_hash":"…","hash":"…"}
hash = sha256(ts, node, tool, args_sha, before_sha, after_sha, changed, proof, verdict, prev_hash) — tamper with
any earlier line and the chain breaks. gama-mandate is used when present to sign the whole chain with Ed25519.
Safety
- token is read from
GAMA_HC_TOKENor~/.gama_hc_token, never from code; - read-only by default: actions require
GAMACUA_ALLOW_ACTIONS=1; cua_click_idrefuses to act when the current screen sha differs from the one the model looked at;- no shell, no file writes outside the receipts file.
Status
v0.1.3 — observe / click / type / verify / receipts / offline chain verification working against the fleet;
protocol-only --selftest and mcp_contract.json added.
Next: local set-of-marks fallback (no remote GPU), DPI/multi-monitor, replay compilation, audit report.
MIT.
Links
- Site — https://gamai.io
- GitHub — https://github.com/gamai-io
- Models and datasets — https://huggingface.co/BH-Language-AI
- Writing — https://dev.to/renatoschustdot
- X — https://x.com/gamai_io
- LinkedIn — https://www.linkedin.com/company/gamai-io/
- The receipt format and the benchmark for the same failure mode: https://github.com/gamai-io/crossnode-bench
Metadata
Release files for gamacua 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gamacua-0.1.3.tar.gz | 17.3 kB | Without provenance | Details for gamacua-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gamacua-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for gamacua-0.1.3-py3-none-any.whl |
Total release size: 29.4 kB
Release files / gamacua-0.1.3.tar.gz
| Download URL | gamacua-0.1.3.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06afcc380c5aeb7082f8977e3b386de414f9d50764413abe2e4e61deb45a2b20
|
|
BLAKE2b-256 checksum How to use checksums |
dd4217cb9d8fb657a9d3684317eb9e3207c17993c17ad8d78a731c9c13fa5d6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / gamacua-0.1.3-py3-none-any.whl
| Download URL | gamacua-0.1.3-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa7b8972db567d259f82d4434b076851f8cc89ee26c3259724eddd50b245cb65
|
|
BLAKE2b-256 checksum How to use checksums |
c2ff7ab17808c60a1520493c1040fb33b8fbd56d4a1b84f252b95b097c6f2a4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for gamacua 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.