dos2-gm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DOS2GM_GAME | No | Path to the game folder. If not set, it is found automatically. | |
| DOS2GM_MODS | No | Path to the Mods folder in the game's documents. If not set, it is found automatically. | |
| DOS2GM_DIVINE | No | Path to Divine.exe. If not set, it is found automatically. | |
| DOS2GM_BACKUPS | No | Where backups go. Default is ./backups. | ./backups |
| DOS2GM_CAMPAIGNS | No | Path to the GMCampaigns folder. If not set, it is found automatically. | |
| DOS2GM_OSIRIS_DATA | No | Path to the Osiris Data folder in the game's documents. If not set, it is found automatically. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Game Master mode campaigns of Divinity: Original Sin 2 (GMCampaigns). The campaign parameter accepts a campaign name, a folder name, a UUID, or a part of any of them.
Reading is safe at any time. Writing (dos2_put_*, dos2_delete_*, dos2_restore) is only for a closed campaign: the game is closed or sitting in the main menu. While the game process is running, writes require allow_running=true; set it only after the user has confirmed the game is in the main menu. Every write first backs up the previous files; dos2_backups lists the backups, dos2_restore brings one back.
NPCs: the easy way is to base a template on one from any campaign (dos2_find_templates → base="Campaign:Name"), then change its name, level, alignment, GM stat edits (bonus is added to the base stats), skills and items. NPCs placed in scenes live in LevelCache: they can be read (dos2_scene); scenes themselves are edited in the game.
The live layer (dos2_live_*) works in the running game through a bridge mod: it needs Script Extender, the bridge built and attached to the campaign (dos2_bridge_install), and the campaign loaded. Start with dos2_live_status: it shows what is missing.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dos2_statusA | Reports the server's setup and lists the GM campaigns. Returns the campaigns folder, the path to Divine.exe and whether it exists, the backups folder, whether the game process is running, and for every campaign its name, folder, UUID, add-ons, scene count and last-modified time. |
| dos2_fetch_lslibA | One-time setup: downloads the official LSLib release by Norbyte (Divine.exe, MIT license) from GitHub, verifies its pinned SHA-256 and unpacks it into the server's data folder. Every tool that reads or writes campaign files needs Divine.exe, so run this when dos2_status reports divine_found=false. |
| dos2_campaignA | Reads one campaign and returns a compact overview: metadata and attached add-on mods, scenes, Overview maps with their pins, vignettes (uuid, title, answers), NPC and item templates (kind, name, level), sticky notes (title, kind, folder) and the whole journal. |
| dos2_campaign_metaA | Changes the campaign's name, description and author in meta.lsf, the same fields the game edits in its campaign settings. Only the fields you pass are changed. With none of them given nothing is written and the current metadata is returned. |
| dos2_sceneA | Reads what the Game Master has placed in one scene, from the campaign files (LevelCache): characters with name, root template, position, vitality, experience, alignment and encounter; encounters with their members; the item count; the scene's sticky notes. |
| dos2_templatesA | Lists the campaign's saved Game Master templates (the "Creatures and Items" panel, stored in Eggs.lsf) as short summaries. NPC entries have name, stat_name, template_id, level, alignment, skills and item stats ids; item entries have name, stats_id, template_id and level. |
| dos2_templateA | Returns one saved Game Master template of the campaign in full: for an NPC its base stats, the GM's stat edits, abilities, talents, skills, skill bar and items with slots; for an item all of its attributes. |
| dos2_find_templatesA | Searches saved Game Master templates in every campaign on disk (or in one) and returns matching summaries with the campaign each one lives in. Larian's sample campaigns are included, so this works as a library of ready NPCs. |
| dos2_vignettesA | Returns every vignette of the campaign with its full content: uuid, title, text, question, answer options, image and folder. Vignettes are the illustrated story cards the Game Master shows to players, optionally with a vote. |
| dos2_notesA | Returns all Game Master sticky notes of the campaign with their full text. Each note has uuid, title, text, folder and kind: a "map" note sits on an Overview map (map UUID, x and y in map pixels), a "scene" note is bound to an object inside a scene (scene ID and the bound object). Players never see these notes. |
| dos2_rawA | Converts any binary campaign file (.lsf) to LSX text and returns it, whole or filtered by XPath. This is the escape hatch for exploring data the other tools do not expose. |
| dos2_put_npc_templateA | Creates a saved NPC template in the campaign (the Game Master's "Creatures and Items" panel), or changes the one that already has this name. The usual way is to copy a ready NPC with base and adjust it: name, level, alignment, GM stat edits, skills, items. Parameters you omit keep the base's values. |
| dos2_put_item_templateA | Creates a saved item template in the campaign (the Game Master's "Creatures and Items" panel), or replaces the one with the same name. Use it for quest items, readable notes and books, and custom weapons or armor the GM hands out. |
| dos2_put_journalA | Replaces the campaign's whole Game Master journal (categories, chapters, paragraphs) with the structure you pass. Entries that are not in categories are removed, so read the current journal with dos2_campaign first and send it back with your changes. |
| dos2_scene_settingsA | Changes the settings of one scene in GMScenes.lsf: its name, folder, atmosphere (lighting and weather), ambient sound and music. Only the fields you pass change; an empty string resets that field to the level's default. |
| dos2_delete_templateA | Deletes a saved NPC or item template from the campaign by name. If an NPC template and an item template share the name, both are removed. Characters already placed in scenes from that template stay as they are. |
| dos2_put_vignetteA | Creates a vignette (an illustrated story card the Game Master shows to players, optionally with a vote), or replaces an existing one. The vignette to replace is found by key if given, otherwise by an equal title; otherwise a new one is created. |
| dos2_delete_vignetteA | Deletes one vignette from the campaign, found by UUID or exact title. Its picture files stay in the campaign's Vignettes/Illustrations folder, so other vignettes that use the same image keep working. |
| dos2_put_noteA | Creates a Game Master sticky note on an Overview map, or changes an existing note. Players never see these notes. An existing note is found by key if given, otherwise by an equal title; if none matches, a new one is created on the map. |
| dos2_delete_noteA | Deletes one Game Master sticky note from the campaign, found by UUID or exact title. Works for notes on an Overview map and for notes bound to an object in a scene. |
| dos2_backupA | Copies the entire campaign folder into the backups folder as a new backup labelled "full". Nothing in the campaign changes, and it is safe while the game is running. |
| dos2_backupsA | Lists the campaign's backups, newest first. Each entry has the id (timestamp plus operation label, e.g. "...-npc-template" or "...-full"), the label, the files that were saved, and the files that the operation created. |
| dos2_restoreA | Undoes an earlier write: puts back the files saved in the given backup and deletes the files that the backed-up operation had created. Restoring a "full" backup brings back every file of the campaign. |
| dos2_live_statusA | Checks everything the live tools (dos2_live_*) need and reports what is missing: whether the game is running, whether Script Extender is installed next to the game and its settings, whether the bridge mod .pak is built, which campaigns have it attached, and whether the bridge's heartbeat is coming in (it writes one about every 2 seconds while a campaign is loaded in Game Master mode). |
| dos2_bridge_installA | Builds this server's bridge mod into the game's Mods folder (DOS2GMBridge_....pak, overwriting the previous build) and, when campaign is given, adds it to that campaign's add-ons in meta.lsf. The bridge is what the dos2_live_* tools talk to; it needs Script Extender in the game. |
| dos2_mod_installA | Packs your own mod from a source folder into the game's Mods folder as .pak (overwriting a previous build) and, when campaign is given, adds it to that campaign's add-ons. UUID, name, version and folder come from the mod's meta.lsx. |
| dos2_addonA | Attaches a ready-made mod from a .pak file to the campaign as an add-on, or detaches it with attach=false. On attach the file is copied into the game's Mods folder; UUID, name, version and folder are read from the meta.lsx inside the pak. Detaching leaves the .pak in Mods. |
| dos2_bridge_detachA | Removes this server's bridge mod from the campaign's add-ons in meta.lsf. After that the dos2_live_* tools no longer work for this campaign, and players no longer need the bridge .pak. The .pak itself stays in the game's Mods folder, and nothing happens if the bridge was not attached. |
| dos2_live_charactersA | Lists the characters on the level currently loaded in the running game, player characters included: GUID, name, root template, stats entry, level, vitality, alignment and position. With near it returns only those within radius of that character. |
| dos2_live_spawnA | Creates a new character on the level loaded in the running game, at a point or next to another character. Each call adds one more character, so repeating it makes duplicates; take one away with dos2_live_stage. |
| dos2_live_moveA | Teleports one character on the live level to the point x, y, z, or next to another character with the offset dx, dz. Works on NPCs and on player characters. |
| dos2_live_setA | Changes a character that already stands on the live level: its displayed name, its level and its alignment towards the party. Only the fields you pass change. |
| dos2_live_stageA | Takes a character on the live level off stage or brings it back. An off-stage character is invisible and takes no part in the scene but stays in the level with its state, so this is the reversible way to remove an NPC or to prepare one for a later entrance; nothing is deleted. |
| dos2_live_luaA | Runs arbitrary Lua on the game server through Script Extender, in the bridge mod's context, and returns the value of its return statement. The Ext and Osi APIs are available. This is the escape hatch for anything the other live tools do not cover: items, statuses, combat, level changes. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 34 tools
Despite 34 tools, near-collisions are explicitly disambiguated in the descriptions: dos2_status vs dos2_live_status (file setup vs running game), dos2_templates/dos2_template/dos2_find_templates (list/one/search), and dos2_bridge_install/dos2_mod_install/dos2_addon (own bridge vs own source mod vs third-party pak). The read-vs-write and file-vs-live split (dos2_scene vs dos2_live_characters, dos2_put_npc_template vs dos2_live_spawn) is also spelled out. A few pairs (dos2_campaign vs the specific readers, create-or-replace put_* tools) still require reading carefully, so not a perfect 5.
Everything is snake_case under a uniform dos2_ prefix, with recognizable sub-namespaces (dos2_live_*, dos2_put_*, dos2_delete_*). The pattern is verb_noun for mutations and bare noun for reads (dos2_campaign, dos2_notes, dos2_raw), which is systematic but means read tools have no verb, and dos2_addon/dos2_backup are verbless outliers. Minor deviations only; names remain predictable.
34 tools is heavy, but the server genuinely spans three subsystems: campaign file read/write, backup/restore, and live-game control plus mod packaging. Each tool does correspond to a real operation, yet the surface is large enough that an agent must triage setup, backup, file and live groups before acting. Borderline-heavy rather than bloated.
Coverage is strong: full CRUD for templates, vignettes and notes, campaign metadata, scene settings, journal, backup/list/restore with undo-of-undo, add-on management, and live spawn/move/set/stage/characters with a Lua escape hatch. Remaining gaps are deliberate and documented (journal is whole-file replace only, scene notes cannot be created from files, scenes/placed characters must be created in-game), which agents can work around but not eliminate.