scribly Cheater
Reputation: 1
Joined: 27 Apr 2008 Posts: 38
|
Posted: Sat Sep 26, 2026 2:31 pm Post subject: Native Cheat Engine MCP server, no dependencies |
|
|
here is Gemini's implementation of a MCP server for CE without any dependencies
feel free to do with it what you wish
docs:
Cheat Engine MCP Server
A Model Context Protocol (MCP) server written entirely in pure Cheat Engine Lua (CELua). It exposes Cheat Engine's memory scanning, debugging, disassembly, cheat table management, and Lua execution capabilities to AI assistants such as Google Antigravity, Claude Desktop, Cursor, and any other MCP-compliant client.
Zero external dependencies. No Python required.
Features
[] Dual-Transport Architecture:
[] Server-Sent Events (SSE) over HTTP on http://127.0.0.1:20000/sse (or custom port): Natively supported by Antigravity, Claude Desktop, and Cursor.
[] Direct HTTP POST on http://127.0.0.1:20000/ or /sse: Direct JSON-RPC execution over standard HTTP.
[] Raw TCP Socket Stream on 127.0.0.1:20000: For line-delimited JSON-RPC socket clients and stdio-to-TCP proxies.
[] Antigravity Auto-Detection & Sync:
[] Automatically detects the port configured in ~/.gemini/config/mcp_config.json (e.g. port 20000) on startup.
[] Updating the port inside Cheat Engine's GUI can automatically synchronize with ~/.gemini/config/mcp_config.json.
[] Cheat Engine GUI Integration: Adds an MCP menu to Cheat Engine's main menu bar:
[] Live server status indicator (running port / stopped)
[] One-click Start / Stop / Restart
[] Port configuration dialog
[] "Copy Config for Antigravity"
[] "Copy Config for Claude / Cursor"
[] "Copy Universal Config (Both)"
[] Automatic Extension Loading: Automatically loaded on Cheat Engine startup via loadorder.txt.
[] Dynamic AITools Bridge: Automatically detects and bridges all tools registered in _G.aitools (if Cheat Engine's AITools extension is installed), converting them into standard MCP schemas.
- Thread-Safe: Safely synchronizes with Cheat Engine's main thread for UI, address list, and engine operations.
Connecting MCP Clients
1. Google Antigravity (agy / Antigravity IDE / Antigravity 2.0)
Antigravity natively connects to SSE-based MCP servers using the serverUrl field.
Global Setup (All Sessions & Projects)
Add or edit ~/.gemini/config/mcp_config.json:
| Code: | {
"mcpServers": {
"cheatengine": {
"serverUrl": "http://127.0.0.1:20000/sse"
}
}
} |
Project-Specific Setup
Alternatively, add the configuration to your project root under:
[] .gemini/config/mcp_config.json or
[] .agents/mcp_config.json
Verifying Antigravity Connection
[] Launch or restart Cheat Engine (it loads the MCP extension automatically).
[] Open Antigravity (or run agy).
[] In Antigravity, check Additional Options (...) > MCP Servers to see cheatengine and all available tools.
[] Prompt the assistant (e.g., "What process is currently attached to Cheat Engine?" or "List loaded modules in the target process").
2. Claude Desktop
Add the following to your claude_desktop_config.json:
[] Windows: %APPDATA%\Claude\claude_desktop_config.json
[] macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Linux: ~/.config/Claude/claude_desktop_config.json
| Code: | {
"mcpServers": {
"cheatengine": {
"url": "http://127.0.0.1:20000/sse"
}
}
} |
3. Cursor
In Cursor Settings under Features -> MCP:
[] Click + Add New MCP Server.
[] Set Name: cheatengine
[] Set Type: SSE
[] Set URL: http://127.0.0.1:20000/sse
4. Universal Configuration (Supports All Clients)
Clients like Claude look for "url" whereas Antigravity looks for "serverUrl". Providing both allows one configuration file to work across all tools:
| Code: | {
"mcpServers": {
"cheatengine": {
"url": "http://127.0.0.1:20000/sse",
"serverUrl": "http://127.0.0.1:20000/sse"
}
}
} |
5. Direct HTTP / curl
You can call the server directly with standard JSON-RPC 2.0 requests:
| Code: | # Ping
curl -X POST http://127.0.0.1:20000/
-H "Content-Type: application/json"
-d '{"jsonrpc": "2.0", "id": 1, "method": "ping"}'
List available tools
curl -X POST http://127.0.0.1:20000/
-H "Content-Type: application/json"
-d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}'
Get attached process info
curl -X POST http://127.0.0.1:20000/
-H "Content-Type: application/json"
-d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_opened_process", "arguments": {}}}' |
Configuration & Storage
Cheat Engine Registry
Cheat Engine stores extension settings in the XML registry at:
~/Cheat Engine/Cheat Engine/reg.xml
Under :
[] Port: Socket listening port (default: auto-detected from ~/.gemini/config/mcp_config.json, or 20000).
[] LocalhostOnly: Restricts binding to 127.0.0.1 for security (1 or 0).
- AutoStart: Automatically starts listener when Cheat Engine launches (1 or 0).
To programmatically change settings via Cheat Engine's Lua engine:
| Code: | local s = getSettings('MCPServer', true)
s.Value['Port'] = '20000'
s.Value['LocalhostOnly'] = '1'
s.Value['AutoStart'] = '1' |
Available Tools
[] get_opened_process
[] Description: Returns info on the currently opened target process (PID, name, architecture, 64-bit flag).
[] Key Arguments: None
[] open_process
[] Description: Attaches Cheat Engine to a process by name or PID.
[] Key Arguments: process (string or integer)
[] get_process_list
[] Description: Lists running system processes with PID and process name.
[] Key Arguments: filter (optional string)
[] pause_process
[] Description: Pauses / freezes the target process.
[] Key Arguments: None
[] unpause_process
[] Description: Resumes target process execution.
[] Key Arguments: None
[] read_memory
[] Description: Reads typed data (byte, int16, int32, int64, float, double, pointer, string).
[] Key Arguments: address, type, length, is_wide
[] read_bytes
[] Description: Reads raw bytes from memory (returns hex string and byte array).
[] Key Arguments: address, count
[] write_memory
[] Description: Writes a typed value to a memory address.
[] Key Arguments: address, type, value, is_wide
[] write_bytes
[] Description: Writes raw hex bytes to memory.
[] Key Arguments: address, bytes (hex string or array)
[] resolve_pointer_chain
[] Description: Resolves multilevel pointer paths (base address + array of offsets).
[] Key Arguments: base_address, offsets
[] create_scan
[] Description: Starts a new memory scan (exact, bigger, smaller, between, unknown).
[] Key Arguments: value, var_type, scan_option, start_address, stop_address
[] refine_scan
[] Description: Filters an active scan (exact, increased, decreased, changed, unchanged, etc.).
[] Key Arguments: scan_id, scan_option, value
[] get_scan_results
[] Description: Retrieves found addresses and current values from a scan.
[] Key Arguments: scan_id, start_index, count
[] free_scan
[] Description: Frees and closes a memory scan object.
[] Key Arguments: scan_id
[] disassemble
[] Description: Disassembles instructions starting from an address.
[] Key Arguments: address, count
[] assemble
[] Description: Assembles an instruction and optionally writes it to memory.
[] Key Arguments: instruction, address
[] auto_assemble
[] Description: Executes a Cheat Engine Auto Assembler (AA) script.
[] Key Arguments: script
[] check_auto_assemble_syntax
[] Description: Checks syntax of an Auto Assembler script.
[] Key Arguments: script
[] enum_modules
[] Description: Lists loaded modules (DLLs/executables) with base address and size.
[] Key Arguments: None
[] resolve_symbol
[] Description: Resolves symbols or expressions (mod.dll!func, game.exe+0x1000).
[] Key Arguments: symbol
[] get_symbol_from_address
[] Description: Finds module name and symbol for a memory address.
[] Key Arguments: address
[] get_function_range
[] Description: Estimates start and end address of the function enclosing an address.
[] Key Arguments: address
[] get_address_list
[] Description: Retrieves records from Cheat Engine's cheat table.
[] Key Arguments: None
[] create_memory_record
[] Description: Adds an entry to Cheat Engine's cheat table.
[] Key Arguments: description, address, var_type, script, active
[] set_memory_record
[] Description: Updates an existing cheat table record.
[] Key Arguments: id, value, description, address, active
[] delete_memory_record
[] Description: Deletes a record from the cheat table.
[] Key Arguments: id
[] start_watchpoint
[] Description: Sets a watchpoint to detect what writes to or accesses an address.
[] Key Arguments: address, size, watch_type ("write"/"access")
[] get_watchpoint_results
[] Description: Retrieves instruction hits, hit counts, and register dumps from a watchpoint.
[] Key Arguments: watchpoint_id
[] stop_watchpoint
[] Description: Stops and removes a watchpoint.
[] Key Arguments: watchpoint_id
[] execute_lua
[] Description: Executes arbitrary Lua code inside Cheat Engine with captured print output.
[] Key Arguments: code
MCP Resources
[] cheatengine://process: Dynamic status of the currently opened target process.
[] cheatengine://addresslist: Current address list records and values.
[] cheatengine://modules: List of loaded modules and base addresses.
[] cheatengine://version: Cheat Engine and MCP server version information.
MCP Prompts
[] reverse_engineer_target: Guided workflow for identifying target process architecture, modules, and key structures.
[] find_value_workflow: Guided workflow for locating, refining, and isolating dynamic values using memory scans.
[/list]
| Description: |
|
 Download |
| Filename: |
server.lua |
| Filesize: |
62.63 KB |
| Downloaded: |
2 Time(s) |
|
|