gameqa
by wjrosa
README.md
# game-qa-agent
**An MCP server that turns an AI agent into a QA team for one game.** It plays the game from the title screen to
the credits, records everything, checks what happened against how the game is meant to work (mechanics, balance,
challenge, UI, UX, text, narrative, visuals, animation, audio, performance, stability), and writes a report of
everything that does not fit, each finding with evidence and a proposed fix.
```
any MCP client (Claude Code, Claude Desktop, ...) ──MCP──► gameqa ──GQP (WebSocket)──► your game + probe
│
spec · session · lenses · review queue · report
```
- **The brain is yours.** gameqa provides the eyes, hands, memory and standards; any MCP client (or the headless
`gameqa run`) does the playing and judging. Better models make it better without a new release.
- **State as text, not only pixels.** A small in-game probe (Unity, Godot, web; ~1 file) gives the agent the game's
state, real input, events and screenshots over the [Game QA Protocol](docs/PROTOCOL.md). Hits-to-die, dead buttons,
overflowing text, sliding enemies and memory leaks are measured, not guessed from a video.
- **A Game Spec is the oracle.** `game.yaml` says how *this* game should work: the progression route, mechanics as
cause → effect, balance targets, glossary, loudness, budgets. Limits that came from defaults are named in the report.
- **Trustworthy reports.** Findings are `verified` (measured, re-seen or reproduced) or `leads`. Coverage says which
beats were really played, which were cheated through, and what was never looked at or heard. A gate (PASS / FAIL /
INCOMPLETE) stays closed until every review item has a verdict with a sentence of what was seen.
Read [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design and why it is shaped this way.
## Try it in one minute
```sh
git clone https://github.com/wjrosa/game-qa-agent && cd game-qa-agent
uv sync
uv run gameqa demo
```
The demo plays *Lantern Keep*, a tiny built-in game with 17 bugs planted on purpose, and writes
`runs/lantern-keep/<id>/REPORT.md` ([a sample](examples/lantern-keep-sample/REPORT.md)). The test suite checks that
every planted bug is caught.
```
FAIL: 14 verified, 6 leads, 6 items to look at
F007 major: rat moves in its 'idle' pose (sliding)
F004 major: Player dies in 3 hits in library
F002 major: Rule broken: Using the library key on the library door opens it
F010 major: Memory grows 109 MB/min in library
F001 major: Exception: NullReferenceException: DrawerAnim.Play()
F018 major: Unfilled placeholder or raw key: "{0} coins"
F013 major: Button 'Options' on title does nothing
...
```
## Connect it to your agent
Claude Code:
```sh
claude mcp add gameqa -- uv --directory /path/to/game-qa-agent run gameqa serve
```
Any MCP client: run `gameqa serve` over stdio. Then ask, for example:
> Use the qa_session prompt. Connect to ws://127.0.0.1:47800/gqp with spec game.yaml and run a full QA session.
The `qa_session` prompt carries the whole method: play like a first-time player, then like a tester; real input
only (cheats for setup, and they mark the beat as `assisted`); notes whenever something feels confusing, unfair or
dull; afterwards, review strips of consecutive frames with describe-first questions (ideally by a fresh subagent that
did not play), verify every lead, propose a fix for every finding, build the report.
## Connect your game
| Engine | Probe | Status |
|---|---|---|
| Web (Construct, Phaser, PixiJS, canvas) | [`probes/web/gqp-probe.js`](probes/web) | tested (full playthrough of the demo in headless Chrome) |
| Unity | [`probes/unity`](probes/unity) (UPM package) | draft: compiles, not yet run in a project |
| Godot 4 | [`probes/godot`](probes/godot) (addon) | draft: not yet run |
| Python games | [`gameqa.probe_server`](src/gameqa/probe_server.py) | tested |
| Anything else | implement [PROTOCOL.md](docs/PROTOCOL.md): 4 required methods | |
Check a probe with `gameqa probe-check ws://127.0.0.1:47800/gqp` (or `reverse://127.0.0.1:47801` for a browser
game). The probe only runs when the game is started with `--gqp` / `GQP=1` / `?gqp`.
## The lenses
| Lens | Measures (code, every run) | Asks (review queue, for eyes) |
|---|---|---|
| stability | exceptions, errors, unclean end | |
| progression | beats not reached, no progress for minutes | |
| mechanics | spec rules (cause → effect), ignored presses | |
| balance / challenge | hits to die, seconds to first hit, deaths per beat, hits from afar, pacing | |
| animation | moving in an idle pose | strips: sliding, popping, jitter |
| performance | fps, p99 frame time, memory growth, load times | |
| UI / accessibility | buttons with no action, text overflow, tiny fonts, off-screen widgets | each screen: readable, aligned, clear |
| UX / SFX | time to gameplay, events with no sound | |
| text / consistency | spelling, placeholders, raw keys, glossary drift, forbidden words | |
| narrative | | the script as played, against the spec's facts and voices |
| visual | black, frozen, magenta, flat-colour frames | strips: hidden player, clipping, placeholders, camera |
| audio | loudness (LUFS), clipping, long silences (ffmpeg) | short clips for a human ear |
The fun, pacing and "does this feel right" judgement comes from the playing agent's notes and the reviewers: there is
no detector for boring, and the report does not pretend there is.
## Command line
```
gameqa serve MCP server on stdio
gameqa demo [--runs DIR] play the built-in game and report
gameqa analyze RUN [--lenses a,b] (re)run the lenses on a run folder; keeps verdicts already given
gameqa report RUN write REPORT.md + report.html
gameqa gate RUN exit 0 PASS, 1 FAIL, 2 INCOMPLETE (for CI)
gameqa probe-check TARGET check a game's probe
gameqa spec-template > game.yaml start a spec
gameqa run --spec game.yaml --target ws://... EXPERIMENTAL: unattended session via Claude Code headless
```
## Requirements
Python 3.11+, ffmpeg on PATH for video and audio analysis. MIT licence.
## Status
v0.1, alpha. What is proven: the protocol, the session recorder, every lens above on the built-in game, the web probe
on a browser game, the MCP tool layer. Not yet: the Unity and Godot probes in real projects, `spec_draft` from a
repository, golden-screenshot comparison, a desktop (pixels-only) adapter. See the roadmap in
[ARCHITECTURE.md](docs/ARCHITECTURE.md). The method behind the lenses came from real misses on shipped games; every
bug a human finds in a run gameqa passed should become a new detector or review question.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues