Skip to main content
Glama

๐Ÿง  ce-mcp โ€” Cheat Engine MCP Server

Give an AI agent full, programmatic control of Cheat Engine through the Model Context Protocol.

ce-mcp lets a model like Claude attach to a running process, scan and edit memory, build cheat tables, resolve pointer chains, disassemble/assemble code, run Auto Assembler scripts, and inspect Unity/Mono games โ€” the same workflow a human reverse-engineer follows in the Cheat Engine UI, exposed as clean MCP tools.

"Attach to the game, find my health value, then freeze it."
        โ”‚
   โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    MCP/stdio    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   HTTP/JSON   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚   AI agent   โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚  ce-mcp       โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ Cheat Engine โ”‚
   โ”‚ (Claude etc) โ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ (Python,      โ”‚ โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚ Lua bridge   โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚  FastMCP)     โ”‚  37712        โ”‚ (in-process) โ”‚
                                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Why this design

Cheat Engine has no external API โ€” its automation surface lives entirely in its embedded Lua engine. ce-mcp bridges that gap with two cooperating halves:

Half

Lives in

Job

Lua bridge (lua/ce_mcp_bridge.lua)

Inside Cheat Engine

Tiny loopback HTTP/JSON server that calls CE's Lua API directly โ€” scanning, reading/writing, AA, debugger, Mono. Ships its own hand-written JSON parser (no external deps).

MCP server (src/ce_mcp/)

Python process

Speaks MCP over stdio to the agent, translates each tool call into an HTTP request to the bridge. Built on the official mcp SDK (FastMCP).

This keeps the agent-facing contract clean and typed, while all the CE-specific magic stays where it has to be โ€” inside Cheat Engine.


Related MCP server: ce-mcp

๐Ÿ› ๏ธ Capabilities

40+ tools covering effectively the whole manual workflow:

Group

Tools

Process

process_list, process_attach, process_detach, process_current, process_modules, process_regions

Memory

memory_read, memory_read_batch, memory_write, memory_dump, memory_alloc, memory_free

Scanning

scan_first, scan_next, scan_results, scan_reset, scan_aob

Cheat table

table_list, table_add, table_remove, table_set_value, table_freeze, table_enable, table_hotkey, table_save, table_load, table_clear

Pointers

pointer_resolve, pointer_scan

Code

disassemble, assemble, auto_assemble

Debugger

find_what_writes, find_what_accesses, breakpoint

Mono/Unity

mono_init, mono_classes

Misc

speedhack, lua_execute (raw Lua escape hatch), ce_status, ce_version, ce_routes

Every scan type Cheat Engine supports is available: exact, bigger, smaller, between, unknown, changed, unchanged, increased, decreased, increasedby, decreasedby. Every value type too: byte โ€ฆ qword, float, double, string (incl. UTF-16), and AOB byte arrays with wildcards.


๐Ÿš€ Quick start

1. Requirements

  • Windows with Cheat Engine 7.x installed

  • Python 3.10+

2. Install the Python server

git clone https://github.com/imrx44/mcp.git
cd mcp
pip install -e .
# or, without packaging:  pip install -r requirements.txt

3. Start the in-CE bridge

  1. Open Cheat Engine.

  2. Table โ–ธ Cheat Table Lua Script (Ctrl+Alt+L).

  3. Paste the contents of lua/ce_mcp_bridge.lua and click Execute.

  4. The CE console prints: [CE-MCP] listening on http://127.0.0.1:37712.

๐Ÿ’ก To auto-start it every time, drop the file into Cheat Engine's autorun/ folder.

4. Wire it into your MCP client

Add the block from examples/claude_desktop_config.json to your Claude Desktop config (or any MCP client), pointing PYTHONPATH at this repo's src/. Restart the client and the cheat-engine tools appear.

5. Verify

Ask the agent: "Run ce_status." โ€” you should get the Cheat Engine version back.


๐ŸŽฎ Example: freeze your health (end to end)

A natural-language session the agent can now carry out by itself:

1. process_list  filter="game"            โ†’ find the pid
2. process_attach process="game.exe"
3. scan_first  value=100  value_type="4byte"  scan_type="exact"
   ... take damage in-game ...
4. scan_next   value=92  scan_type="exact"
   ... repeat until one result remains ...
5. scan_results                            โ†’ 0x1F3A4C20
6. table_add   address="0x1F3A4C20"  description="Health"  type="4byte"
7. table_freeze id=<id>                    โ†’ health locked

And a code-injection ("godmode") cheat via Auto Assembler:

auto_assemble(script="""
[ENABLE]
aobscanmodule(hpHook,game.exe,29 87 ?? ?? ?? ??)   // sub [edi+offset],eax
alloc(newmem,128,hpHook)
label(ret)
newmem:
  // skip the subtract โ†’ take no damage
  jmp ret
hpHook:
  jmp newmem
  nop 2
ret:
[DISABLE]
hpHook:
  db 29 87 ?? ?? ?? ??
dealloc(newmem)
""")

โš™๏ธ Configuration

The Python server reads these environment variables:

Variable

Default

Meaning

CE_MCP_HOST

127.0.0.1

Bridge host

CE_MCP_PORT

37712

Bridge port (must match the Lua file)

CE_MCP_TIMEOUT

60

HTTP timeout (s) โ€” raise for long scans


๐Ÿ”’ Security notes

  • The bridge binds to loopback only and has no authentication โ€” anything that can reach localhost:37712 can drive Cheat Engine. Don't expose the port.

  • This is a debugging / reverse-engineering tool. Use it on software you own or are authorised to analyse, and respect the terms of service of online games.


๐Ÿงฉ Architecture details

  • No external Lua dependencies. The bridge implements its own recursive-descent JSON encoder/decoder, so it runs on a stock Cheat Engine install.

  • Non-blocking server. The HTTP accept loop runs on a CE timer, so it never freezes the Cheat Engine UI.

  • Stateful scan session. scan_first creates a CE MemScan/FoundList that later scan_next/scan_results/scan_reset calls operate on โ€” mirroring the UI.

  • Clean error contract. Every response is { ok, data | error }; the Python client raises a typed BridgeError that tools surface as a readable message.

See docs/TOOLS.md for the full per-tool reference.


๐Ÿ“ Project layout

MCP/
โ”œโ”€โ”€ lua/
โ”‚   โ””โ”€โ”€ ce_mcp_bridge.lua        # In-Cheat-Engine HTTP/JSON bridge
โ”œโ”€โ”€ src/ce_mcp/
โ”‚   โ”œโ”€โ”€ server.py                # FastMCP server + all tool definitions
โ”‚   โ”œโ”€โ”€ client.py                # Async HTTP client for the bridge
โ”‚   โ”œโ”€โ”€ __main__.py              # python -m ce_mcp
โ”‚   โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ examples/
โ”‚   โ””โ”€โ”€ claude_desktop_config.json
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ TOOLS.md                 # Full tool reference
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md

๐Ÿ“œ License

MIT โ€” see LICENSE.

Not affiliated with Cheat Engine or its author. "Cheat Engine" is the property of its respective owners.

Available Tools

42 tools
assembleA

Assemble a single instruction (e.g. 'mov eax,1') to bytes. address provides context for relative operands.

Inputs: code (required), address.

auto_assembleA

Run a Cheat Engine Auto Assembler script โ€” the core of code-injection cheats (godmode, infinite ammo, etc.).

Pass enable=False to run the script's [DISABLE] section to revert. Example godmode skeleton::

[ENABLE]
aobscanmodule(hook,game.exe,29 87 ?? ?? ?? ??)  // sub [edi+x],eax
alloc(newmem,128,hook)
label(ret)
newmem:
  // do nothing instead of subtracting health
  jmp ret
hook:
  jmp newmem
  nop 2
ret:
[DISABLE]
hook:
  db 29 87 ?? ?? ?? ??
dealloc(newmem)

Inputs: script (required), enable.

breakpointB

Set (or, with remove=True, clear) a breakpoint at address.

Inputs: address (required), size, remove.

ce_routesA

List every low-level route the in-CE bridge exposes (for debugging).

Inputs: no named parameters.

ce_statusA

Check the bridge is reachable and report the Cheat Engine version.

Inputs: no named parameters.

ce_versionA

Get Cheat Engine version, Lua version, and install directory.

Inputs: no named parameters.

disassembleC

Disassemble count instructions starting at address.

Inputs: address (required), count.

find_what_accessesB

Collect instructions that READ OR WRITE address over duration seconds. Useful to find a base instruction for pointer/structure work.

Inputs: address (required), duration.

find_what_writesB

Attach the debugger and collect the instructions that WRITE to address over duration seconds. The classic way to find the code that changes a value (e.g. the instruction that decrements health).

Inputs: address (required), duration.

lua_executeA

Escape hatch: run arbitrary Lua inside Cheat Engine and capture print output + return value. Use when no dedicated tool covers what you need.

Inputs: code (required).

memory_allocB

Allocate executable memory in the target (for code caves). Optionally near an address so 32-bit relative jumps remain in range.

Inputs: near, size.

memory_dumpA

Hex-dump a region of memory (16 bytes/row, hex + ASCII). Max 64 KiB.

Inputs: address (required), size.

memory_freeC

Free memory previously allocated with memory_alloc.

Inputs: address (required).

memory_readB

Read a value from memory.

address accepts hex ('0x7FF...'), decimal, a symbol, or 'module+offset'. size applies to string/aob reads. wide reads UTF-16 strings. type is one of: byte, 2byte/word, 4byte/int, 8byte/qword, float, double, string, aob (space-separated hex), pointer.

Inputs: address (required), size, type, wide, +1 more.

memory_read_batchA

Read many addresses in one round trip.

reads is a list of objects like {"address": "0x...", "type": "float"}.

Inputs: reads (required).

memory_writeA

Write a value to memory.

type is one of: byte, 2byte/word, 4byte/int, 8byte/qword, float, double, string, aob, pointer. For aob, pass value as a hex string like 'AA BB CC'.

Inputs: value (required), address (required), type, wide.

mono_classesA

Enumerate Mono/Unity classes (namespace, name, class pointer). Optional substring filter. Requires mono_init first.

Inputs: filter.

mono_initA

Initialise Cheat Engine's Mono data collector (for Unity/Mono games). Call once after attaching, before mono_classes.

Inputs: no named parameters.

pointer_resolveA

Resolve a multi-level pointer chain.

Reads the pointer at base, adds offsets[0], reads again, and so on โ€” returning the final address and the full chain. Use this to verify a 'module+offset -> [+off] -> [+off]' path before adding it to the table.

Inputs: base (required), offsets.

pointer_scanA

Start a pointer scan for address (finds stable pointer paths to it). Runs asynchronously inside Cheat Engine; inspect/refine results in CE's UI.

Inputs: address (required), max_level, max_offset.

process_attachA

Attach (open) a process by PID (int) or by executable name (e.g. 'game.exe').

Required before any scan / read / write. Returns pid, name, and whether the target is 64-bit.

Inputs: process (required).

process_currentA

Report which process is currently attached, if any.

Inputs: no named parameters.

process_detachA

Detach from the currently open process.

Inputs: no named parameters.

process_listA

List running processes (pid + name). Optionally substring-filter.

Inputs: filter.

process_modulesA

List loaded modules (name, base address, size, path). Optional filter.

Module base addresses are the anchor for stable 'module+offset' pointers.

Inputs: filter.

process_regionsA

Enumerate committed memory regions (base, size, protection flags).

Inputs: no named parameters.

scan_aobB

Array-of-bytes pattern scan. pattern like 'DE AD ?? EF' (?? = wildcard). Returns matching addresses. Great for finding code to hook.

Inputs: pattern (required), stop, start, protection.

scan_firstA

Run a first scan over the attached process and return the match count.

scan_type: exact, bigger, smaller, between (needs value2), unknown, changed, unchanged, increased, decreased, increasedby, decreasedby. For 'unknown' start a value-agnostic scan, then narrow with scan_next. Use scan_results to page through matches.

Inputs: stop, start, value, value2, +3 more.

scan_nextB

Narrow the active scan (next scan). Same scan_type vocabulary as scan_first. Typical: scan changed/unchanged/increased/decreased while the in-game value moves, until few matches remain.

Inputs: value, value2, scan_type.

scan_resetA

Discard the active scan and free its memory.

Inputs: no named parameters.

scan_resultsA

Page through the current scan's matches (address + value). Max 1000/call.

Inputs: limit, offset.

speedhackA

Set the speedhack multiplier (1.0 = normal, 2.0 = double speed, 0.5 = half). Affects the game's perception of time.

Inputs: speed (required).

table_addA

Add an entry to the cheat table. address may be a literal address or a 'module+offset' expression. Returns the new entry's id.

Inputs: address (required), type, value, description.

table_clearA

Remove all entries from the cheat table.

Inputs: no named parameters.

table_enableC

Activate/deactivate an entry (e.g. an Auto Assembler 'script' entry).

Inputs: id (required), active.

table_freezeB

Freeze (or unfreeze) a cheat-table entry so its value is held constant.

Inputs: id (required), frozen.

table_hotkeyB

Bind a hotkey to an entry. action: 1=toggle freeze, 2=set value, 3=decrease, 4=increase. keys is a virtual-key code or list of codes.

Inputs: id (required), keys (required), value, action.

table_listA

List entries in the cheat table (id, description, address, value, frozen).

Inputs: no named parameters.

table_loadA

Load a .CT file. merge keeps existing entries; otherwise replaces.

Inputs: path (required), merge.

table_removeB

Remove a cheat-table entry by id.

Inputs: id (required).

table_saveB

Save the current cheat table to a .CT file at path (on the CE host).

Inputs: path (required).

table_set_valueC

Set the value of a cheat-table entry (writes it to the target).

Inputs: id (required), value (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    B3.2/5.0

    Scored across 42 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, even within groups like scanning or table management. A few pairs (e.g., find_what_accesses vs find_what_writes) could be confused, but descriptions clarify the differences. Overall, the tool surface is well-organized.

    Naming Consistency3/5

    Tools use snake_case consistently, but the order of verb and noun varies: some are verb_noun (e.g., memory_read), others noun_verb (e.g., table_add). The ce_* prefix and occasional verb-first names (e.g., breakpoint, disassemble) break the pattern, making it somewhat predictable but not perfectly consistent.

    Tool Count2/5

    42 tools is high for a single-purpose server, exceeding the 'heavy' threshold of 25+. While each tool serves a specific Cheat Engine function, the sheer number may overwhelm agents and increase selection errors. A more compact set could cover the same functionality.

    Completeness4/5

    The tool set covers the core Cheat Engine workflows: process management, memory scanning/reading/writing, pointer handling, code injection, table management, and Mono support. Minor gaps exist (e.g., no generic 'find what reads'), but the surface is comprehensive for game hacking automation.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform low-level Windows process memory research, including process attachment, memory scanning, reading/writing, pointer chasing, remote code execution, and inline hooking via MCP tools and Lua scripting.
      18 PyPI
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI to directly control Cheat Engine for process attachment, memory scanning, reading/writing, address list management, speed hack, Lua/Auto Assembler execution, and CT file management via the MCP protocol.
      5
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Cheat Engine 7.6 that enables AI agents to perform memory scanning, reading/writing, process manipulation, debugging, and code injection via a Lua named pipe bridge.
      4
      GPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to control Cheat Engine for memory reading/writing, scanning, debugging, and .NET/Mono game reverse engineering through 43 Chinese-language MCP tools, with thread-safe named-pipe communication.
      MIT