| 1 | [Demo](https://github.com/user-attachments/assets/a184a006-f569-4b55-858a-ed80a7139035) |
| 2 | |
| 3 | # Cheat Engine MCP Bridge |
| 4 | |
| 5 | **Let multibillion $ AI datacenters analyze the program memory for you.** |
| 6 | |
| 7 | Create mods, trainers, security audits, game bots, accelerate RE, or do anything else with any program and game in a fraction of a time. |
| 8 | |
| 9 | [](#) [](https://python.org) |
| 10 | |
| 11 | > [!NOTE] |
| 12 | > Thanks everyone for the stars, much appreciated! <3 |
| 13 | > |
| 14 | > Specially a big thank you to all the contributors!! |
| 15 | > |
| 16 | > [@libangli218](https://github.com/libangli218), [@lauralex](https://github.com/lauralex), [@iamtyroon](https://github.com/iamtyroon), [@HachiroSan](https://github.com/HachiroSan), [@Attacktive](https://github.com/Attacktive) |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | ## The Problem |
| 21 | |
| 22 | You're staring at gigabytes of memory. Millions of addresses. Thousands of functions. Finding *that one pointer*, *that one structure* takes **days or weeks** of manual work. |
| 23 | |
| 24 | **What if you could just ask?** |
| 25 | |
| 26 | > *"Find the packet decryptor hook."* |
| 27 | > *"Find the OPcode of character coordinates."* |
| 28 | > *"Find the OPcode of health values."* |
| 29 | > *"Find the unique AOB pattern to make my trainer reliable after game updates."* |
| 30 | |
| 31 | **That's exactly what this does.** |
| 32 | |
| 33 | _- Stop clicking through hex dumps and start having conversations with the memory._ |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## What You Get: |
| 38 | |
| 39 | | Before (Manual) | After (AI Agent + MCP) | |
| 40 | |-----------------|---------------------| |
| 41 | | Day 1: Find packet address | Minute 1: "Find RX packet decryption hook" | |
| 42 | | Day 2: Trace what writes to it | Minute 3: "Generate unique AOB signature to make it update persistent" | |
| 43 | | Day 3: Find RX hook | Minute 6: "Find movement OPcodes" | |
| 44 | | Day 4: Document structure | Minute 10: "Create python interpreter of hex to plain text" | |
| 45 | | Day 5: Game updates, start over | **Done.** | |
| 46 | |
| 47 | **Your AI can now:** |
| 48 | - Read any memory instantly (integers, floats, strings, pointers) |
| 49 | - Follow pointer chains: `[[base+0x10]+0x20]+0x8` → resolved in ms |
| 50 | - Auto-analyze structures with field types and values |
| 51 | - Identify C++ objects via RTTI: *"This is a CPlayer object"* |
| 52 | - Disassemble and analyze functions |
| 53 | - Debug invisibly with hardware breakpoints + Ring -1 hypervisor |
| 54 | - And much more! |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## How It Works |
| 59 | ```mermaid |
| 60 | flowchart TD |
| 61 | AI[AI Agent: Claude/Cursor/Copilot] |
| 62 | |
| 63 | AI -->|MCP Protocol - JSON-RPC over stdio| MCP |
| 64 | |
| 65 | MCP[mcp_cheatengine.py - Python MCP Server] |
| 66 | |
| 67 | MCP <-->|Named Pipe - Async| PIPE |
| 68 | |
| 69 | PIPE["\\.\\pipe\\CE_MCP_Bridge_v99"] |
| 70 | |
| 71 | PIPE <--> CE |
| 72 | |
| 73 | subgraph CE[Cheat Engine - DBVM Mode] |
| 74 | subgraph LUA[ce_mcp_bridge.lua] |
| 75 | WORKER[Worker Thread - Blocking I/O] |
| 76 | MAIN[Main Thread - GUI + CE API] |
| 77 | WORKER <-->|Sync| MAIN |
| 78 | end |
| 79 | end |
| 80 | |
| 81 | MAIN -->|Memory Access| TARGET[Target .exe] |
| 82 | ``` |
| 83 | --- |
| 84 | |
| 85 | ## Installation |
| 86 | |
| 87 | ```bash |
| 88 | pip install -r MCP_Server/requirements.txt |
| 89 | ``` |
| 90 | Or manually: |
| 91 | ```bash |
| 92 | pip install mcp pywin32 |
| 93 | ``` |
| 94 | |
| 95 | > [!NOTE] |
| 96 | > Native pipe mode is **Windows only** because it uses Named Pipes (`pywin32`). Use TCP relay transport when the MCP server runs outside the Windows environment that hosts Cheat Engine and cannot open the named pipe directly. |
| 97 | |
| 98 | --- |
| 99 | |
| 100 | ## Quick Start |
| 101 | |
| 102 | ### 1. Load Bridge in Cheat Engine |
| 103 | 1. Enable DBVM in Cheat Engine if you plan to use DBVM tools. |
| 104 | 2. Open Cheat Engine's Lua Engine or script executor. |
| 105 | - Preferred: `File` -> `Execute Script` -> open `MCP_Server/ce_mcp_bridge.lua` -> `Execute`. |
| 106 | - If your Cheat Engine build does not show `File` -> `Execute Script`, use `Table` -> `Show Cheat Table Lua Script`, paste the `dofile(...)` line below, and execute it: |
| 107 | |
| 108 | ```lua |
| 109 | dofile([[C:\path\to\cheatengine-mcp-bridge\MCP_Server\ce_mcp_bridge.lua]]) |
| 110 | ``` |
| 111 | |
| 112 | Look for: `[MCP v12.0.0] MCP Server Listening on: CE_MCP_Bridge_v99` |
| 113 | |
| 114 | ### 2. Configure MCP Client |
| 115 | Add to your MCP configuration (e.g., `mcp_config.json`): |
| 116 | ```json |
| 117 | { |
| 118 | "servers": { |
| 119 | "cheatengine": { |
| 120 | "command": "py |