How tonytranrp/cheat-engine-mcp works
Cheat Engine MCP exposes Cheat Engine operations to an MCP client through a Python server and a TCP-connected native plugin. The main workflow is client request → registered Python tool → bridge/context → native loader and hot-swappable core → Cheat Engine API, with results returned along that route. Domain tool modules cover process/session access, memory and scans, pointers, tables and structures, debugging, Lua, and exported SDK metadata. Runtime-module wiring and several domain paths are inferred from the README and tree; only sampled source confirms specific implementation details.
Main entry points: __init__.py Tool registration · context.py Tool context · server.py MCP server · scan_tools.py Scanning
Components 23
MCP backend
- MCP server
python/src/ce_mcp_server/server.py - Tool registration
python/src/ce_mcp_server/tools/__init__.py - TCP bridge
python/src/ce_mcp_server/bridge.py - Tool context
python/src/ce_mcp_server/context.py
Native plugin
- Stable loader
native/src/loader/plugin_loader.cpp - Bridge client
native/src/core/mcp_client.cpp - Native core
native/src/core/core_runtime.cpp
CE tool domains
- Process and symbols
python/src/ce_mcp_server/tools/process_tools.py - Memory access
python/src/ce_mcp_server/tools/memory_tools.py - Scanning
python/src/ce_mcp_server/tools/scan_tools.py - Scan helpers
python/src/ce_mcp_server/tools/scan_helper_tools.py - Pointer chains
python/src/ce_mcp_server/tools/pointer_tools.py - Tables and records
python/src/ce_mcp_server/tools/table_tools.py - Structure tools
python/src/ce_mcp_server/tools/structure_tools.py - Debug watches
python/src/ce_mcp_server/tools/debug_tools.py - Lua scripting
python/src/ce_mcp_server/tools/script_tools.py - Lua libraries
python/src/ce_mcp_server/tools/lua_library_tools.py - Exported SDK
python/src/ce_mcp_server/tools/exported_tools.py
Lua runtimes
- Scan runtime
python/src/ce_mcp_server/runtime/scan_runtime.py - Structure runtime
python/src/ce_mcp_server/runtime/structure_runtime.py - Lua runtime
python/src/ce_mcp_server/runtime/lua_runtime.py
Other components
- Codex MCP client
- Cheat Engine
Connections 33
- Codex MCP client → MCP server: MCP requests
- MCP server → Tool registration: registers tools
- MCP server → TCP bridge: starts and stops
- Tool registration → Process and symbols: registers
- Tool registration → Memory access: registers
- Tool registration → Scanning: registers
- Tool registration → Pointer chains: registers
- Tool registration → Tables and records: registers
- Tool registration → Structure tools: registers
- Tool registration → Debug watches: registers
- Tool registration → Lua scripting: registers
- Tool registration → Lua libraries: registers
- Tool registration → Exported SDK: registers
- Tool registration → Scan helpers: registers
- Process and symbols → Tool context: calls
- Memory access → Tool context: calls
- Scanning → Tool context: calls
- Scan helpers → Tool context: calls
- Pointer chains → Tool context: calls
- Tables and records → Tool context: calls
- Structure tools → Tool context: calls
- Debug watches → Tool context: calls
- Lua scripting → Tool context: calls
- Lua libraries → Tool context: calls
- Exported SDK → Tool context: calls
- Tool context → TCP bridge: native calls
- TCP bridge → Bridge client: TCP requests
- Stable loader → Bridge client: starts client
- Bridge client → Native core: dispatches requests
- Native core → Cheat Engine: invokes CE APIs
- Scanning → Scan runtime: uses runtime
- Structure tools → Structure runtime: uses runtime
- Lua scripting → Lua runtime: uses runtime