Game-Crawler

Joaovitor404silva/Game-Crawler Checked 4 days ago

Live in-process debugger, input bot and MCP server for PC games: Unreal reflection, memory, hooks, breakpoints and a hot-reload C++ plugin API

A live, in-process debugger and input bot for 64-bit Windows games, built for modders and for AI coding agents. Memory, hooks, hardware breakpoints, plugins and the input bot work on any engine (tested on Unreal and X-Ray); Unreal Engine games (UE 4.25+ and UE 5.x) also get full reflection. It loads into a dev *copy* of the game through a version.dll proxy and exposes everything over a local TCP port. It comes with a CLI and an MCP server, so Claude Code (or any MCP client) can inspect and drive the running game. No per-game signatures.

Summary extracted from the README.

Game Crawler

A live, in-process debugger and input bot for 64-bit Windows games, built for modders and for AI coding agents. Memory, hooks, hardware breakpoints, plugins and the input bot work on any engine (tested on Unreal and X-Ray); Unreal Engine games (UE 4.25+ and UE 5.x) also get full reflection. It loads into a dev copy of the game through a version.dll proxy and exposes everything over a local TCP port. It comes with a CLI and an MCP server, so Claude Code (or any MCP client) can inspect and drive the running game.

  • Find UObjects, read and write properties, call UFunctions on the game thread
  • Read and write memory, evaluate pointer chains, resolve symbols from a names database
  • Inline hooks and hardware breakpoints / write watches, with caller stacks and aggregated hits
  • Typed TArray / TSet / TMap dumps, actor components, bone poses, SDK and function dumps
  • C++ plugins that hot reload on save, and hot reload of the debugger core itself without restarting the game
  • 46 MCP tools; the offline tools (names, decomp, log, hits) also work without the game running

No per-game signatures. On start it finds GUObjectArray and the FNamePool by scanning the exe's .data section, detects the FField / UFunction layout from known engine classes, and finds the ProcessEvent vtable slot from Default__Object.

Single-player dev tool. It never modifies your game install: it builds a separate dev folder made of links to the game files and puts the proxy there. Tested on S.T.A.L.K.E.R. 2 (UE 5.5), Backseat Drivers (UE 5), Deep Rock Galactic (UE 4.27) and Hogwarts Legacy (UE 4.27, DRM-wrapped exe); generic tools and the input bot also on S.T.A.L.K.E.R. Anomaly (X-Ray). Other engine versions and custom engine forks may need fixes. Unofficial, offline use only, at your own risk; read the Disclaimer.


How it works

Piece Role
src/make_devroot.ps1 Builds the dev folder (default C:\GameCrawlerRoot\<game>): junctions and hardlinks to the install, the version.dll proxy in Binaries\Win64, no other proxy DLLs (UE4SS, dxgi, dinput8, ...), no Mods/~mods/LogicMods, no Saved, plus steam_appid.txt for Steam games so they start outside Steam's launcher. Idempotent.
version.dll (src/core/proxy.cpp) Forwards every export to System32\version.dll and loads bin\GameCrawler.dll from the folder in CRAWLER_HOME or crawler_home.txt.
GameCrawler.dll (src/core/loader.cpp) Loader: log, TCP server on 127.0.0.1:27060, game-thread pump (hook on PeekMessage for any game, plus ProcessEvent on Unreal; main thread only), hot reload of the core.
GameCrawlerCore.dll (src/core/* + src/engines/*) Every command. src/core is engine-neutral (memory, hooks, breakpoints, capture, plugins); src/engines/<engine>/ holds one backend per engine (ue today) behind src/engines/engine.h; engine shows which one was detected. Loaded from a shadow copy, so it can be rebuilt and reloaded while the game runs.
crawler.js CLI client.
mcp/server.js MCP server (stdio, JSON-RPC 2.0, no dependencies).
plugins/ Plugin API (crawler_api.h) and example.

Requirements

  • Windows 10/11 x64, a 64-bit game without anti-cheat (Unreal Engine for the engine tools; generic tools and the input bot work on any game)
  • Visual Studio 2022 (any edition) with the MSVC x64 C++ tools; the build finds it through vswhere
  • Node.js 18+
  • PowerShell 5.1+ (hardlinks need the dev folder on the same drive as the game, otherwise files are copied)

Setup

git clone --recursive <this repo>        # MinHook is a submodule (src/minhook)
cd Game-Crawler
cmd /c src\build.bat                                         # -> bin\GameCrawler.dll, bin\GameCrawlerCore.dll, bin\proxy\version.dll
powershell -File src\make_devroot.ps1 -Exe "<game>\<Project>\Binaries\Win64\<Project>-Win64-Shipping.exe"
powershell -File launch.ps1 -DevRoot C:\GameCrawlerRoot\<game>     # windowed 1280x720, saves in Saved_dev
node crawler.js ping                                           # -> pong pid=... core=loaded
node crawler.js uinfo                                          # reflection layout, once the engine is up

Use the *-Win64-Shipping.exe in Binaries\Win64, not the small launcher exe in the game root. launch.ps1 refuses to start a second dev game; -Force launches it next to a normal copy, -GameArgs overrides the command line. Steam games may need Steam running.

Register the MCP server

claude mcp add game-crawler -- node <path>\Game-Crawler\mcp\server.js

CLI

node crawler.js [--json] [--port N] <command>, -i interactive, -f file script.

ping
find class:PlayerController
get pawn BaseEyeHeight
set pawn CharacterMovement.MaxWalkSpeed 900
call pawn K2_GetActorLocation
dumpsdk sdk.tsv
bpw 0x13a8073d040 8               # who writes these 8 bytes (hits in the log), then: bpc all
con "t.MaxFPS 30"

Main command groups:

  • loader: ping, reload (after src\build.bat core), unload
  • memory: rd <addr> [n], wr <addr> <hex>, ptr <expr>, aob <pattern>, rva, va, mods, sym <addr>
  • reflection: find <substr|class:Name|isa:Name> [near=<obj|x,y,z>] [r=<cm>] [loc], obj, get, set, call, funcs, props, classes, watchprop / unwatch, con <console command>, uinfo
  • export: dumpfuncs, dumpvtables, dumpsdk, dumpfieldvt, callees
  • hooks and breakpoints: native <name>, hook <addr|name> [log|block|ret <v>] [hw] [force], unhook, hooks, bpx / bpw / bprw / bpc / bps, watchw <addr> <len> secs=<n> (who writes this field), agg (hits grouped by stack)
  • game state: scene (preflight: world, pc, pawn), comps <actor>, pose <actor>, tarray|tset|tmap <obj> <Prop.Path>, layoutcheck <Class>
  • capture: snap (typed memory fixture -> snaps\<name>.json), sample (in-core sampler), memdiff (which bytes change), stats
  • memory scan: scan <type> <eq|changed|inc|dec> [v], scan list, scan set <v>, scan clear (value hunt on any game)
  • input bot: bot key <k> [tap|down|up], bot text <s>, bot move <dx> <dy>, bot moveto <x> <y>, bot click [btn] [x y], bot wheel <n>, bot home, bot release, bot focus [on|off], bot status (any game; injected in-process via window messages, key-state polls, raw input and DirectInput, so the real mouse stays free; focus on makes a background game accept keys; status shows which input API the game reads)
  • misc: xcall <addr|Name> [rcx rdx r8 r9], mark, log [n], plug list|build|reload|unload <name>

pawn and pc resolve to the local player's pawn and controller. Commands sent before the engine is up answer error: reflection not ready (...); the core retries every second.

MCP tools

status, find, obj, get, set, call, funcs, props, classes, rd, wr, ptr, sym, addr, names, decomp, native, hook, unhook, hooks, bp, bpc, bps, hits, watchw, agg, scene, snap, sample, comps, pose, tarray, tset, tmap, layoutcheck, memdiff, stats, batch, mark, watch, unwatch, plugin, con, log, scan, bot, reload_core, raw

Every tool takes an optional game (port or alias) to target one of several dev games, and all runs it on every port. Results are capped at 12000 characters (CRAWLER_MCP_CAP).

Plugins

C++ plugins add hooks, commands, MCP tools and per-tick code, and hot reload when you save. How to write one: PLUGINS.md. Start from plugins\example; plugin repos are cloned into plugins\<name>. Approved plugins, such as Anomaly Scanner (S.T.A.L.K.E.R. 2), and how to get yours approved: OFFICIAL_PLUGINS.md.

Names database and decompile (optional)

addr, sym, names and plugins that resolve functions by name need a names database: names\names.tsv (rva<TAB>kind<TAB>name<TAB>source, rva in hex from image base 0x140000000). The decomp tool needs a Ghidra decompile dump with an index.tsv (rva, name, file, line, size, callers) in decomp\. Neither is shipped. Both are generated from your own copy of the game; this repo does not include game code or data.

Build the names database with the dev game running (main menu is enough):

node tools\build_names.js                  # dumps UFunctions, vtables and FField vtables live, then writes names\names.tsv
node tools\build_names.js --ue4ss <path>\UE4SS.log   # optional: virtual slot names from a UE4SS log of the same game
node tools\build_names.js --offline        # rebuild from the raw dumps already in names\

It names native UFunction exec thunks and their implementations, vtables and their overridden slots, UClass constructors, and the PE imports and exports of the exe (read from the running game, or --exe). Rerun it after a game update.

Configuration

Variable Default Used for
CRAWLER_HOME this folder (set by launch.ps1, or crawler_home.txt next to the proxy) Root for bin\, plugins\, logs, names\, sdk\
CRAWLER_PORT 27060 TCP port of the dev game (one per game when several run)
CRAWLER_LOGDIR CRAWLER_HOME Log folder (crawler.log, crawler_<port>.log)
CRAWLER_CORE bin\GameCrawlerCore.dll Core DLL to load (staged builds)
CRAWLER_NAMES names\names.tsv Names database
CRAWLER_NATIVES names\natives_impl.tsv Native exec -> impl table
CRAWLER_DECOMP decomp Decompile dump folder (MCP decomp)
CRAWLER_TIMEOUT, CRAWLER_MCP_CAP, CRAWLER_ALL_PORTS CLI/MCP timeout, MCP result cap, port list for game=all

Tests

cmd /c tests\run_tests.bat                 # C++ units (engine discovery on fake memory) + core scenario, MCP server and CLI against fake servers

No game needed.

Contributing

Every pull request runs CI (.github/workflows/ci.yml) on Windows: core build, unit, scenario and MCP tests, and the build and tests of every plugin in plugins/. A pull request is merged only when CI is green and the owner approved it. Plugin repos reuse .github/workflows/plugin.yml to test against Game Crawler (see PLUGINS.md).

Limits

  • 64-bit Windows builds only. Games with anti-cheat (EAC, BattlEye, ...) are not supported; do not try. DRM-wrapped exes (e.g. Denuvo) work when the game runs normally; other packers are untested.
  • UE 4.25+ (FField properties). Older UE4 (UProperty) and heavily modified engine forks are not detected yet.
  • Console variables (cvar) need a per-game IConsoleManager address and are off; con uses ExecuteConsoleCommand.
  • Games that already ship a version.dll next to the exe need a different proxy name.

Disclaimer

  • Unofficial. This project is not affiliated with, endorsed by or supported by Epic Games or any game publisher or developer. Unreal Engine is a trademark of Epic Games. All other trademarks belong to their owners.
  • No game content. This repository contains no game code, assets, decompiled code or data. The names database and the decompile are generated locally from your own legally obtained copy and must not be redistributed.
  • Single-player and offline use only. Do not use it in online or multiplayer sessions, with anti-cheat, or to gain an advantage over other players. Doing so may break the game's terms of service and can get your account banned.
  • Use at your own risk. It injects code into a running process and writes to its memory. It can crash the game, corrupt saves or cause data loss. Back up your saves (the dev game uses a separate Saved_dev folder, but nothing is guaranteed). The software is provided "as is", without warranty of any kind; see LICENSE.
  • Your responsibility. You are responsible for complying with each game's EULA and the laws of your country. Modding and reverse engineering for interoperability are allowed in many places but not all.
  • Antivirus. DLL proxies, injection and inline hooks can trigger antivirus warnings. Build from source and check the code yourself if in doubt.
  • AI-assisted. Parts of this project were written with the help of AI coding tools.

License

MIT, see LICENSE. MinHook (src/minhook, submodule) is BSD-2-Clause, copyright Tsuda Kageyu.