pyxel-mcp
MCP server for Pyxel, a retro game engine for Python. It gives AI agents a compact set of verbs to run and observe Pyxel programs without a window: headless, deterministic, and scriptable.
The server is deliberately an observation adapter. It does not judge whether a game is good. Agents use the returned state, pixels, audio, docs, and diffs to make task-specific decisions.
Tools that accept script execute trusted local Python. pyxel-mcp isolates Pyxel state per subprocess, but it is not a sandbox for untrusted code.
Why this exists
LLM agents writing Pyxel code without feedback often stop at "the script runs". pyxel-mcp closes that loop:
- Headless runs. Drive frame counts and scheduled inputs without opening a window.
- Subprocess isolation. Each tool call starts fresh; Pyxel state cannot leak between calls.
- Structured output. Tools return JSON with uniform
ok/errorsfields. - Pyxel footguns.
validateand resource readers expose common mistakes such as missingcls, missingcolkey, tilemap(0, 0)traps, and ragged image rows. - No universal quality score. The agent writes the predicates that matter for the current game and visually inspects captured PNGs.






