dwgx@blog:~$dwgx
> cd ../posts

Wrapping an LLM Skin Around Cheat Engine: CEGM

// created

CEGM is an LLM skin wrapped around Cheat Engine, built specifically for memory experiments on single-player offline games. The moment CE starts, a Lua autorun I dropped in fires up a Python broker on the side. On a single port, 27077, it opens two entry points: an MCP endpoint for external clients, and a browser dashboard where you can chat directly.

/mcp is an MCP Streamable HTTP endpoint. Point MCP clients like Claude Desktop, Cursor, Claude Code, or Codex at it and they get the full tool list, no need to configure them one by one. As long as CE is running, that URL is live. The root path / serves the browser dashboard: a chat box, a real-time timeline of tool calls, before/after diffs of memory writes, plus a drawer for stashing your own LLM key.

The ~180 tools that actually do the work aren’t mine. They come from miscusi-peek/cheatengine-mcp-bridge (MIT), which I vendored in as a git submodule. The entire tool surface from MCP down to CE is theirs. What I added is the thin layer on top: preview before commit on writes, named snapshots, restore points, and for Phase 3 I want a recipe library for common patterns.

Similar projects mostly just shove tool calls headlessly at whatever client you’re holding, so you never really know what memory the model touched. CEGM bets on observability plus safety: every call is laid out for you, destructive operations preview first, and if something goes wrong you can roll back. For experimenting on single-player memory, that’s exactly what I want: visible, and reversible.

The external MCP client and the browser dashboard go through the same broker on the same port:

外部 MCP 客户端 / 浏览器
        │  HTTP MCP / WS

  cegm-broker (Python, 自动拉起)
  127.0.0.1:27077  /mcp · /events · /api/* · /
        │  stdio MCP

  cheatengine-mcp-bridge (vendored, MIT)
        │  named pipe

  Cheat Engine 7.5+

Still alpha for now (v0.1.0a1). To be clear: this targets single-player offline games only. It doesn’t touch online multiplayer, and it’s not for bypassing anti-cheat. License follows upstream CE at GPL-2.0-only.