Game Loop MCP — AI skill for Claude Code
Let an AI agent run your game: MCP server + tiny in-game listener (Unity, Python, any engine) to launch a dev build, run commands on its main thread, wait for states, screenshot, read logs and close i.
How to install Game Loop MCP
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open wjrosa/game-loop-mcp and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Game Loop MCP does
Let an AI agent run your game: MCP server + tiny in-game listener (Unity, Python, any engine) to launch a dev build, run commands on its main thread, wait for states, screenshot, read logs and close it safely.
Alternatives in AI
- Sentrux — Real-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improveme 2.9k ★
- Session Kit — Close the terminal windows, not the AI coding sessions 649 ★
- UnityMCP — Drive the Unity Editor from an AI agent or the terminal 346 ★
README
game-loop-mcp
Let an AI coding agent **run your game and look at it**: launch a development build, ask it questions, drive it, wait for a state, screenshot it, read its log and close it. The agent can then check its own change in the real game before handing the work back, instead of editing code and hoping.
agent ──MCP──▶ game-loop-mcp (Node, zero dependencies) ──TCP 127.0.0.1──▶ listener inside your game
launch · exec · wait · screenshot · log · close runs commands on the main thread
It grew out of three games we develop with [Claude Code](https://code.claude.com), two online games and a Unity game. Each had a hand-written "drive the running client" MCP server, and they turned out to be the same tool. This is that tool, made generic, with the rules those games taught us built in.
The two halves
**Inside the game, a listener.** A few hundred lines, one file:
- runs text commands on the game's own thread, so handlers can touch game state;
- exists only in development builds, and listens only when started with
GAME_RPC=1; - answers
help,ping(pid=,scene=,fps=...),arm, optionallyshot, plus whatever commands you register:hp,inventory,teleport 10 0 5,load Level2,spawn goblin,give gold 100...
Ready-made listeners:
| file | notes | |
|---|---|---|
| Unity | `listeners/unity/GameLoopRpc.cs` | drop into Assets/. Compiled only into the Editor and Development Builds. Built in: scene, objects, find, timescale, load, quit, and shot (game view with UI, works covered or minimised) |
| Python | `listeners/python/gameloop_rpc.py` | stdlib only. Call rpc.pump() once per frame |
| anything else | `PROTOCOL.md` | one command per line, replies end with a . line. Port it to Godot, Unreal, C++, Rust... |
**Outside, the MCP server** [`server/game-loop-mcp.js`](server/game-loop-mcp.js).
Related Skills
Csharp Unity Conventions
C# and Unity constraints a model gets wrong: global.json SDK pinning, Unity's C# 9 ceiling, main-thread async
Bench Watch
Launch or attach to a Plumbline benchmark slice, poll it to completion, and emit the canonical anti-Goodhart p
Glade MCP
Connect any MCP-compatible AI client (Claude Code, Cursor, Windsurf) to Unity or Godot. 235+ granular tools, a
Unity MCP Plugin
Unity MCP Plugin (UPM) — Editor bridge for AI-assisted game development. Enables Claude, Cursor & MCP-compatib
MCP Game Deck
Unity Editor package that bridges Claude AI to Unity via MCP. 268 tools, embedded chat UI, knowledge-driven ag
AI Game Dev Plugin
Claude Code plugins for AI game development — Unreal, Unity & Godot. Let Claude create a project, install the
Related Agents
Game QA
Game QA. Runs the autonomous self-verify loop (build → launch .exe → screenshot → read PNG → verdict). Catches
Game Developer
Game development across all platforms (PC, Web, Mobile, VR/AR). Use when building games with Unity, Godot, Unr
3D Artist
3D art and asset creation specialist for game development. Use PROACTIVELY for 3D modeling, texturing, animati