Skip to main content
Glama

dd2-mcp

MCP server for Dragon's Dogma 2 modding through REFramework. Started 2026-10-26 from the Bastion proof of concept.

Tool

What it does

dd2_status

Game process, REFramework revision, bridge state, player position, and the crash record if the last run crashed

dd2_eval

Run Lua in the live game; phase="update" for anything that changes game state

dd2_types

Methods or fields of a managed type

dd2_enum

Every named value of an enum type (e.g. app.Character.JobEnum)

dd2_rsz

Offline search of the type dump (alphaZomega's RE_RSZ rszdd2.json): every serializable type and its fields, no game needed; action="download" fetches it

dd2_weapons

Weapon item table: WeaponID, vocation mask (_Job = 1 << JobEnum), stats; filter by job, WeaponID prefix or name

dd2_job

Vocation state of the player or a pawn (job, exp per job, job bits); set_job changes it (jobs above 10 need force: they crash the game unless a mod grows the per-job tables first)

dd2_pak

Read game paks without outside tools (DD2's 0x68 format): search the file list, find, extract (.tex also as PNG)

dd2_keys

Send a whole key sequence in one call ('esc wait:1.5 s f e'), optional screenshot at the end

dd2_package

Build a mod's release zip (Fluffy format, what Vortex installs too) from dd2mod.json package; refuses dev/test files

dd2_fluffy

Fluffy Mod Manager: launch/close, enable/disable a mod by clicking its row, report its files in the game

dd2_release

Draft GitHub release with the release zip, only from a clean pushed main with a new tag (dry run by default)

dd2_crash

Analyze the last native crash (reframework_crash.dmp): exception, registers, disassembly at the fault, stack return addresses mapped to managed methods; no game needed

dd2_loadloop

Load-crash rate of a setup: repeated boot + load_slot cycles in a background process, each crash's REFramework log + dump kept, a mod's own log lines (log_filter) per run; start / status / stop

dd2_refcount

Does a game call take, keep or consume a reference? An object's count before, right after a Lua call and after a wait, plus validity

dd2_effect_trace

Which effects get requested on whose effect manager while you act (owner, method, EffectID / range track)

dd2_sound_trace

Which object fires which Wwise sound trigger while you act (owner GameObject + trigger id, filterable)

dd2_weapon_kind

The game's weapon-type tree (WeaponIDUtil kind table, live): a weapon's ancestor chain (flags ids not really in the table), a family's rows, the root families

dd2_table_scan

Live arrays / lists of given lengths, walked from every managed singleton and the player: tables still sized to an original id count a mod grows

dd2_methodmap

Managed method -> native code RVA map per game build (research/methodmap-<build>.tsv): export from the running game, find by regex

dd2_disasm

Disassemble DD2.exe from disk at an RVA or a method name; rip-relative globals annotated (poke live with D.poke32)

dd2_items / dd2_give_item

Find item ids by name; give items (update phase)

dd2_recent_items

Item log: newest inventory changes across player, pawns and stash (owner, subcategory, key-item, NEW)

dd2_gold

Read gold and Rift Crystals; add or deduct gold

dd2_deploy

Copy a mod project's src/reframework/** into the game

dd2_install_bridge

Install the eval bridge (dd2mcp/lua/dd2mcp_bridge.lua) into reframework/autorun and hot-reload it in the running game

dd2_log

REFramework log for the current run, filtered

dd2_quit

Close the game when testing ends; optionally list saves written since a time

dd2_launch / dd2_screenshot

Start the game through Steam; capture the screen

dd2_capture

Screen burst at ~30 fps while scripted input runs: contact sheet + per-frame motion profile (camera snaps, flicker)

dd2_anim

Animation files: motion banks (types/masks), motlists (motions, bones, clips), joint masks; FBX export, Blender import (graft onto a game motion), compose own motlists

dd2_guide

Measured modding lessons in docs/lessons/ (memory safety, shared data, camera, testing, text, id tables, effects)

dd2_take_control / dd2_hand_back

Bring the game to the front and unpause it for testing; return the screen to the player's terminal (the game auto-pauses)

dd2_pause_state / dd2_key

PauseManager state (5 = InGame pause menu); send a key press to the game

dd2_saves

Snapshot, list and restore the whole save folder (restore needs the game closed); touched lists saves written since a time and flags any outside the test units

dd2_scenario

Test scenarios: shelve/unshelve single slots of the test character, or load one end to end (restart, unshelve, launch, guard, title menu, play-time + position check; ~50 s)

dd2_saveguard

Arm/disarm the bridge save guard: refuses saves outside the test character and all autosaves while armed

dd2_vortex

Vortex profiles: status, profiles, dev / release (switch to a mod project's profile from its dd2mod.json, create it, enable REFramework, deploy), switch, play (return to the previous profile)

Lessons for modders: docs/lessons/ (also through dd2_guide). Verified engine facts also live in the Bastion plan doc. Key one: calls that change game state (instantiate, getItem, addVersion) only work from re.on_pre_application_entry("UpdateBehavior"). Call overloads by signature with D.call(obj, "name(A, B)", ...): REFramework only resolves signatures with ", " between types, and obj:call() with an unresolved one silently does nothing.

Environment: DD2_GAME (install path), DD2_SAVE_BACKUPS, DD2_SCRATCH.

Save harness

DD2 keeps 15 save slots: 3 characters x 5 types (slot = unit*5 + type; 0 Auto, 1 Last Inn Rest, 2 unmoored-world restart, 3 Clear, 4 AddAuto). Scenarios are single slot files under SaveBackups/scenarios/<name>/ and only load from the slot they were saved in. Steam Cloud serves the game, so swaps happen with the game closed (Steam rescans at launch); deleting a file outside the game does not stick. dd2_scenario load points the character's "latest save" at the slot and confirms "Load from Last Saved Data"; calling app.MainFlowManager.requestStartType directly throws (and once crashed the game). The test character unit defaults to 0 (DD2_TEST_UNITS).

Related MCP server: ue-bridge

Vortex profiles

Vortex runs both BG3 and DD2, so dd2_vortex always names the DD2 game when it switches. It talks to the Vortex bridge extension from bg3-data-mcp (bg3-data-mcp-bridge, token in its bridge.json) and starts Vortex if the bridge doesn't answer. Switches are refused while DD2 runs, because Vortex purges and redeploys dinput8.dll. A mod project names its profiles in dd2mod.json:

{"vortex": {"dev_profile": "Bastion-Dev", "release_profile": "Bastion-Release", "requires": ["REFramework"]}}

Defaults are <ProjectDir>-Dev, <ProjectDir>-Release and ["REFramework"]. Files copied by dd2_deploy are not Vortex-managed and survive profile switches.

REE-Lib helper (meshes, materials, effects)

dd2_mesh, dd2_material and dd2_efx run dotnet/reetool, a small .NET 10 program built on demand (dd2mcp/ree.py) with the private SDK in <dd2-modding>/Tools/dotnet against the Content Editor DLLs in Tools/ContentEditor (override with DD2_TOOLS). dd2_mesh import turns a glTF into a game .mesh (the Content Editor importer plus the two fixes the game needs, see the tool docstring); dd2_material extracts and scans the game's .mdf2 files by master shader; dd2_efx inspects .efx files (REE-Lib 0.8.1 cannot yet parse this build's efx).

Introspection tools (added 2026-11-02)

Offline (no game needed):

  • dd2_table - spreadsheet view of any .user/.scn/.pfb data file: flattened columns, where/sort/cols, enum names (3:Equip), GUID -> English text, item names. dd2_table(path, listcols=True) first to see the columns.

  • dd2_msg - search/get the game's text (.msg, 64k entries, cached English index in ~/.cache/dd2-mcp/msg_index.json).

  • dd2_where - which data file holds which serialized class (index of ~12k gameplay .user files; build once, ~4 min).

  • dd2_rszgen(auto=True) / hashes=[...] - heal unknown type hashes: hash -> name (murmur of every known type name and layout field type) -> live layout export. Together with exporting live layouts for every indexed type this took the key-table decode rate from 52% to 98% (487/495 files in 16 gameplay folders). Needs the game running once.

Live (game running, bridge >= 0.10.0):

  • dd2_inspect(expr) - field-by-field dump of a manager singleton or any Lua expression (enum values named).

  • dd2_find(type) - components of a type in the current scene, nearest first, optional dump of the nearest.

  • dd2_singletons - which *Manager singletons are live (REFramework cannot enumerate them; probed by name).

  • dd2_trace(type, method, seconds) - call counts + sampled args of a method while you play.

  • dd2_skeleton - DD2 .skeleton files ('skln' v8, skeleton resource for DummySkeleton/CustomSkeleton): info / roundtrip / author. Format decoded from the 27 game files, byte-exact round trip. See research/catalog/CREATURES.md for how a creature is assembled (mesh, mdf2, jmap, motbank, skeleton, prefab).

Available Tools

25 tools
dd2_deployC

Copy a mod project's src/reframework/** into the game's reframework folder.

Inputs: project (required). Returns: result

dd2_enumB

Every named value of an enum type, sorted by value (e.g. 'app.Character.JobEnum', 'app.WeaponID').

Inputs: type_name (required). Returns: result

dd2_evalA

Run a Lua chunk in the running game; print() output and returned values come back. phase='update' runs it inside the game's UpdateBehavior (required for state changes).

Inputs: code (required), phase, timeout. Returns: result

dd2_give_itemB

Give the player an item (update phase) and report the before/after count in the player's storage. Works for every category incl. quest letters (verified with Torn Letter 376, 2026-10-26).

Inputs: item_id (required), count. Returns: result

dd2_goldB

Read the player's gold and Rift Crystals; a non-zero delta adds (or deducts) gold first.

Inputs: delta. Returns: result

dd2_hand_backA

Return the screen to the window saved by dd2_take_control (the player's terminal); the game pauses itself.

Inputs: no named parameters. Returns: result

dd2_install_bridgeA

Install or update the dd2mcp eval bridge script in reframework/autorun; reload=True also re-runs it in the running game (bridge 0.5.0+ in memory), so bridge changes need no restart.

Inputs: reload. Returns: result

dd2_itemsA

Find item ids by display-name substring (e.g. 'ferrystone').

Inputs: name (required). Returns: result

dd2_jobA

Vocation state of 'player' or 'pawn1'..'pawn3': current job, JobIndex, exp per job, job bits. set_job changes the vocation (update phase). Jobs above 10 crashed the game (2026-10-29: c0000005 ~1 min after set_Job(11)), so they need force=True and belong only on a test character with the save guard armed.

Inputs: who, force, set_job. Returns: result

dd2_keyA

Send one key press (hardware scan code: Esc 0x01, Enter 0x1C, Space 0x39, Tab 0x0F) to the game, focusing it first unless focus=False.

Inputs: scan, focus. Returns: result

dd2_launchA

Start DD2 through Steam (no-op if it is running). Loading a save still needs the player.

Inputs: no named parameters. Returns: result

dd2_logC

REFramework log for the current game run, optionally filtered by a substring (e.g. '[Bastion]', 'error').

Inputs: lines, pattern. Returns: result

dd2_pause_stateB

Whether the game is paused and by which app.PauseManager.PauseType values (5 = InGame pause menu).

Inputs: no named parameters. Returns: result

dd2_quitA

Close DD2 (hard kill: DD2 has no scripted clean exit yet; with the save guard armed nothing is lost) as soon as in-game testing ends. since = 'YYYY-MM-DD HH:MM[:SS]' also reports saves written since then (test units only?).

Inputs: since. Returns: result

dd2_recent_itemsB

Item log: the most recently changed inventory entries across player, pawn and stash storages, newest first (StorageData._UpdateIndex order; DD2 keeps no pickup history). Shows owner, count, subcategory, key-item flag (key items sit in their own inventory tab) and the NEW mark.

Inputs: name, limit. Returns: result

dd2_rszA

Offline type dump search (alphaZomega RE_RSZ rszdd2.json, all serializable types + fields; no game needed). pattern is a case-insensitive regex on type names (and field names/types when fields=True). action='download' fetches/refreshes the dump. The dump can lag game patches: confirm live with dd2_types.

Inputs: limit, action, fields, pattern. Returns: result

dd2_saveguardA

Bridge save guard. 'arm' refuses every save outside the test units (default [0]) and, unless autosave=True, every save to an Auto/AddAuto slot (the game also saves slot 0 on load). 'disarm', 'status'. Arm before loading a scenario so the load-time autosave cannot overwrite it. Resets on game restart.

Inputs: units, action, autosave. Returns: result

dd2_savesA

Save snapshots. action: 'list', 'backup' (name = label), 'restore' (name = snapshot folder; game must be closed), 'touched' (name = 'YYYY-MM-DD HH:MM[:SS]'): save files written since then, flagging any outside the test units.

Inputs: name, action. Returns: result

dd2_scenarioA

Test-harness save scenarios (single slots of the test character unit, default unit 0 = slots 0-4). action: 'list'; 'shelve' (name, slot, optional area/notes) archives a live slot; 'unshelve' (name) puts it back into its own slot (game must be closed); 'load' (name, restart) does it all: quits DD2 if restart=true, unshelves, launches, arms the save guard, passes the boot screens, starts the slot and verifies the play time. Slot types: 0 Auto, 1 Last Inn Rest (both auto-loadable), 2 unmoored-world restart, 3 Clear, 4 AddAuto. The game takes focus during boot; hand back with dd2_hand_back.

Inputs: area, name, slot, notes, +2 more. Returns: result

dd2_screenshotA

Capture the primary screen to a PNG and return its path; open it with an image-capable Read.

Inputs: no named parameters. Returns: result

dd2_statusB

Game process, REFramework revision, bridge state, and the player's position if a save is loaded.

Inputs: no named parameters. Returns: result

dd2_take_controlA

Bring DD2 to the front for testing: remembers the window the player is in (their terminal), focuses the game and closes the focus-loss pause menu (checked through PauseManager, Esc only while it is open). Pair with dd2_hand_back whenever the player needs to read output or answer.

Inputs: unpause. Returns: result

dd2_typesB

Introspect a managed type: kind 'methods' (signatures) or 'fields', optionally filtered by a substring.

Inputs: type_name (required), kind, filter. Returns: result

dd2_vortexA

Vortex profiles for DD2 (starts Vortex if needed; refuses switches while DD2 runs). action: 'status' (active game/profile, enabled mods); 'profiles' (DD2 profiles); 'dev' / 'release' (project = mod project dir: switch to its dev or release-test profile from /dd2mod.json, creating it if missing, enable its required mods (REFramework) and deploy); 'switch' (profile = name); 'play' (return to the profile that was active before the last switch, BG3 included).

Inputs: action, profile, project. Returns: result

dd2_weaponsA

Weapon item table: id, name, WeaponID name, vocation mask (_Job = 1 << JobEnum) and stats. Filter by job (JobEnum 1-10), WeaponID prefix (e.g. 'wp07') or name substring. No filter = counts per type.

Inputs: job, name, weapon_prefix. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools target a clearly distinct resource or action (types vs enum vs rsz, give_item vs items vs recent_items, take_control vs hand_back vs key). The main overlaps are between dd2_saves and dd2_scenario (both deal with snapshot/restore lifecycle) and to a lesser extent dd2_status vs dd2_pause_state, but descriptions clarify the boundaries.

    Naming Consistency4/5

    Every tool uses the dd2_ prefix with lowercase snake_case, which is highly predictable. However, the second part mixes bare nouns (status, types, weapons, job, gold, saves, vortex) with verb phrases (give_item, install_bridge, take_control, hand_back), so it is not a strict verb_noun pattern but remains readable.

    Tool Count3/5

    25 tools is at the heavy end and spans many sub-domains (introspection, item manipulation, save/scenario management, focus/input testing, mod deployment, Vortex). Each arguably serves the mod-testing workflow, but the surface feels broad and could be trimmed or grouped.

    Completeness4/5

    For a DD2 mod-testing harness the surface is broad: game lifecycle, live and offline introspection, item/gold/job manipulation, save backups, scenario shelving/loading, save guard, and focus/input control are all covered. Gaps are minor (e.g. no direct player-stat or teleport/entity manipulation tools), which agents can partly work around via dd2_eval.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to develop Desynced mods by providing direct access to the game's Lua API reference, base-game source, live logs, and installed mods, plus live control via a debugger link for evaluating and reloading Lua in the running game.
      9
      2
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents and scripts to inspect objects, call functions, and run Lua in a running UE4SS game via MCP, with no sockets or admin rights required.
      26
      5
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to interact with running games in real time — introspecting game state, simulating keyboard and mouse input to actually play, capturing screenshots, executing Lua code, hot-reloading files, and receiving push notifications when state changes.
      8
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables Baldur's Gate 3 modders to look up game data across base-game and mod layers, run static lint checks on stats and progressions, test changes in a running game through the Script Extender, and export mods for Larian Toolkit/mod.io publishing. It also packs, deploys and restarts the game so mods can be iterated on without leaving the assistant.
      44
      1
      MIT