cheatengine-mcp-bridge
miscusi-peek · miscusi-peek/cheatengine-mcp-bridge
Cầu nối MCP này kết nối các tác nhân AI với Cheat Engine, cho phép tự động hóa kỹ thuật đảo ngược, quét con trỏ và phân tích bộ nhớ bằng ngôn ngữ tự nhiên.
Kết nối các tác nhân AI yêu thích của bạn trực tiếp với Cheat Engine thông qua MCP. Tự động hóa quá trình đảo ngược kỹ thuật, quét con trỏ và phân tích bộ nhớ bằng ngôn ngữ tự nhiên.
Xem trước
Bạn có thể làm gì với nó
- Yêu cầu một tác nhân AI tìm các địa chỉ bộ nhớ cụ thể liên quan đến giá trị trò chơi.
- Tự động hóa việc theo dõi các ghi bộ nhớ để hiểu hành vi chương trình.
- Tạo các mẫu AOB duy nhất cho các trình huấn luyện trò chơi với sự hỗ trợ của AI.
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Cheat Engine MCP Bridge
Let multibillion $ AI datacenters analyze the program memory for you.
Create mods, trainers, security audits, game bots, accelerate RE, or do anything else with any program and game in a fraction of a time.
[!NOTE] Thanks everyone for the stars, much appreciated! <3
Specially a big thank you to all the contributors!!
@libangli218, @lauralex, @iamtyroon, @HachiroSan, @Attacktive
The Problem
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.
What if you could just ask?
"Find the packet decryptor hook."
"Find the OPcode of character coordinates."
"Find the OPcode of health values."
"Find the unique AOB pattern to make my trainer reliable after game updates."
That's exactly what this does.
- Stop clicking through hex dumps and start having conversations with the memory.
What You Get:
| Before (Manual) | After (AI Agent + MCP) |
|---|---|
| Day 1: Find packet address | Minute 1: "Find RX packet decryption hook" |
| Day 2: Trace what writes to it | Minute 3: "Generate unique AOB signature to make it update persistent" |
| Day 3: Find RX hook | Minute 6: "Find movement OPcodes" |
| Day 4: Document structure | Minute 10: "Create python interpreter of hex to plain text" |
| Day 5: Game updates, start over | Done. |
Your AI can now:
- Read any memory instantly (integers, floats, strings, pointers)
- Follow pointer chains:
[[base+0x10]+0x20]+0x8→ resolved in ms - Auto-analyze structures with field types and values
- Identify C++ objects via RTTI: "This is a CPlayer object"
- Disassemble and analyze functions
- Debug invisibly with hardware breakpoints + Ring -1 hypervisor
- And much more!
How It Works
flowchart TD
AI[AI Agent: Claude/Cursor/Copilot]
AI -->|MCP Protocol - JSON-RPC over stdio| MCP
MCP[mcp_cheatengine.py - Python MCP Server]
MCP <-->|Named Pipe - Async| PIPE
PIPE["\\.\\pipe\\CE_MCP_Bridge_v99"]
PIPE <--> CE
subgraph CE[Cheat Engine - DBVM Mode]
subgraph LUA[ce_mcp_bridge.lua]
WORKER[Worker Thread - Blocking I/O]
MAIN[Main Thread - GUI + CE API]
WORKER <-->|Sync| MAIN
end
end
MAIN -->|Memory Access| TARGET[Target .exe]
Installation
pip install -r MCP_Server/requirements.txt
Or manually:
pip install mcp pywin32
[!NOTE] 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.
Quick Start
1. Load Bridge in Cheat Engine
- Enable DBVM in Cheat Engine if you plan to use DBVM tools.
- Open Cheat Engine's Lua Engine or script executor.
- Preferred:
File->Execute Script-> openMCP_Server/ce_mcp_bridge.lua->Execute. - If your Cheat Engine build does not show
File->Execute Script, useTable->Show Cheat Table Lua Script, paste thedofile(...)line below, and execute it:
- Preferred:
dofile([[C:\path\to\cheatengine-mcp-bridge\MCP_Server\ce_mcp_bridge.lua]])
Look for: [MCP v12.0.0] MCP Server Listening on: CE_MCP_Bridge_v99
2. Configure MCP Client
Add to your MCP configuration (e.g., mcp_config.json):
{
"servers": {
"cheatengine": {
"command": "python",
"args": ["C:/path/to/MCP_Server/mcp_cheatengine.py"]
}
}
}
Restart the IDE to load the MCP server config.
For Codex, add a TOML server block to ~/.codex/config.toml:
[mcp_servers.cheatengine]
command = "python"
args = ['C:\path\to\cheatengine-mcp-bridge\MCP_Server\mcp_cheatengine.py']
Use single quotes for the Windows path so TOML treats backslashes literally.
TCP relay transport
The TCP relay lets mcp_cheatengine.py talk to Cheat Engine through a TCP socket instead of opening the Windows named pipe itself. Cheat Engine and the Lua bridge still run on Windows, while the MCP server can run anywhere that can reach the relay: another Windows process, a VM, a container, a Linux host, or a remote machine. This can also be used with WSL without changing the Lua bridge.
- On Windows, load
MCP_Server/ce_mcp_bridge.luain Cheat Engine as usual. - On Windows, start the relay:
python C:\path\to\cheatengine-mcp-bridge\MCP_Server\ce_tcp_relay.py --host 127.0.0.1 --port 9876
- In the environment where the MCP server will run, install the MCP dependency without
pywin32, then run/configure the MCP server with TCP transport:
python3 -m pip install -r MCP_Server/requirements-tcp.txt
CE_MCP_TRANSPORT=tcp \
CE_MCP_HOST=127.0.0.1 \
CE_MCP_PORT=9876 \
python3 /path/to/cheatengine-mcp-bridge/MCP_Server/mcp_cheatengine.py
For MCP client configs that support environment variables:
{
"servers": {
"cheatengine": {
"command": "python3",
"args": ["/path/to/cheatengine-mcp-bridge/MCP_Server/mcp_cheatengine.py"],
"env": {
"CE_MCP_TRANSPORT": "tcp",
"CE_MCP_HOST": "127.0.0.1",
"CE_MCP_PORT": "9876"
}
}
}
}
Set --host on the relay and CE_MCP_HOST on the MCP server to addresses that match your network setup. Keep the relay bound to trusted interfaces only, because anyone who can reach it can control the Cheat Engine bridge.
3. Verify Connection
Use the ping tool to verify connectivity:
{"success": true, "version": "12.0.0", "message": "CE MCP Bridge Active"}