Warcraft III Map Tools

Read, audit and edit Warcraft III maps byte-faithfully

OtherC#v0.2.0

wc3-mcp

Made by GodMephisto

CI

An MCP server that lets AI assistants such as Claude read, audit and edit Warcraft III .w3x and .w3m maps byte-faithfully (files you do not touch keep their bytes).

It is the MCP server of wc3ctl, which also has a command line tool and a desktop editor. Install wc3ctl if you want those as well. It carries the same server as wc3ctl mcp serve.

What you need

  • 64-bit Windows. The game data reader (CascLib) is a Windows library.
  • Warcraft III Reforged, only for the tools that read base game data. Map tools work without it.
  • Any AI app that speaks MCP. Nothing else, the release carries its own .NET.

Install

Open PowerShell and run

irm https://raw.githubusercontent.com/GodMephisto/wc3-mcp/main/install.ps1 | iex

That downloads the latest release, checks its SHA-256, unpacks it into %LOCALAPPDATA%\Programs\wc3-mcp, adds that folder to your PATH and sets up every supported AI app it finds. No admin rights. Run the same line again to update. Restart your AI app afterwards.

Prefer to do it by hand? Download the zip from the Releases page, unzip it into any folder you like, then from that folder run

.\wc3-mcp.exe install --all

The setup records wherever the exe actually is, so any folder works. It also adds that folder to your user PATH once, so from then on plain wc3-mcp works in any new terminal. Pass --no-path to skip that, and use .\wc3-mcp.exe from its folder instead.

Using Claude Desktop only? Download wc3-mcp-<version>-win-x64.mcpb from the Releases page and double-click it. Claude Desktop installs it as an extension. Its one setting, the Warcraft III folder, can stay empty to have the install detected. The server is also listed in the MCP Registry as io.github.GodMephisto/wc3-mcp, for apps that install from there.

Set up your AI app

These need wc3-mcp on your PATH, which the one-line install and the first wc3-mcp.exe install both arrange. Until then, run them as .\wc3-mcp.exe ... from the folder the exe is in.

wc3-mcp install --all            set up every supported app found on this PC
wc3-mcp install cursor vscode    set up only the apps named
wc3-mcp uninstall --all          remove it again
wc3-mcp config <app>             print the settings to paste by hand
wc3-mcp clients                  list supported apps and whether each is set up
wc3-mcp doctor                   check the install, the game folder and the apps
AppName to useWhere it is written
Claude Codeclaude-codethrough claude mcp add --scope user
Claude Desktopclaude-desktop%APPDATA%\Claude\claude_desktop_config.json (Store build too)
Cursorcursor%USERPROFILE%\.cursor\mcp.json
VS Code (GitHub Copilot)vscode%APPDATA%\Code\User\mcp.json
Windsurfwindsurf%USERPROFILE%\.codeium\windsurf\mcp_config.json or %APPDATA%\devin\mcp_config.json
Gemini CLIgemini%USERPROFILE%\.gemini\settings.json
Codex CLIcodex%CODEX_HOME% or %USERPROFILE%\.codex\config.toml
Clineclinecline_mcp_settings.json in VS Code's storage for Cline
LM Studiolmstudio%USERPROFILE%\.lmstudio\mcp.json
Zedzed%APPDATA%\Zed\settings.json

Setup only changes the one wc3 entry. Every other server and setting in the file stays as it was, and the file is copied to NAME.wc3-mcp.bak first. A file with comments in it (common in Zed and VS Code) is never rewritten, because that would delete the comments. The settings to paste are printed instead.

Any other MCP app

It is a standard stdio MCP server. Point your app at wc3-mcp.exe with no arguments. wc3-mcp config cursor prints a ready-made JSON entry with the real path filled in, which most apps accept as is.

Configuration

The Warcraft III folder is found automatically from the Windows registry, then C:\Warcraft III, C:\Program Files (x86)\Warcraft III and C:\Program Files\Warcraft III. When yours is somewhere else, either

  • install with wc3-mcp install --all --game-dir "D:\Games\Warcraft III", which sets WC3_GAME_DIR in each app's entry, or
  • pass game_dir to a single tool call.

A game_dir argument wins over WC3_GAME_DIR, which wins over the automatic search. wc3-mcp doctor shows which folder it is using.

Build from source

In PowerShell, with the .NET 8 SDK installed,

git clone https://github.com/GodMephisto/wc3-mcp
cd wc3-mcp
dotnet test --filter "Category!=Corpus&Category!=GameData"
dotnet publish src/Wc3.Mcp/Wc3.Mcp.csproj -c Release --self-contained -r win-x64 -o dist-mcp
.\dist-mcp\wc3-mcp.exe install --all

The apps then start the exe inside your clone's dist-mcp folder, and that folder is what goes on your PATH, so keep the clone where it is or rerun the last line after moving it.

Exact SDK and package versions are in REQUIREMENTS.md. CascLib.dll must stay beside wc3-mcp.exe.

Tools

97 tools.

NameRead/WriteDescription
asset_listread-onlyList the asset paths an icon or model object field can actually be set to, from the map's own imported files and from the base game.
audit_abilityread-onlyTells you, per ability, PASS or the exact broken link across a placed hero's whole runtime chain, far deeper than audit_hero, which only proves a cast...
audit_fidelityread-onlyTells you whether a ported object's data came across faithfully, by comparing it and its whole custom-object dependency closure between the SOURCE map it...
audit_heroread-onlyTells you whether a placed hero's abilities are actually wired up in the map's script, not merely present as object data.
audit_mapread-onlyBehavioural audit of a map's object data, read-only.
audit_readinessread-onlyTells you whether a placed hero's script would actually RUN correctly, not just fire, the gap audit_hero cannot see since it only proves a cast reaches a...
bundle_unitread-onlyResolve everything a unit depends on, the porting preview.
camera_addwritesAdd a camera at a target position and save the edited map to out_path.
camera_listread-onlyList the map's cameras (war3map.w3c).
camera_removewritesRemove a camera and save the edited map to out_path.
camera_setwritesSet a field on a camera and save the edited map to out_path.
deprotect_mapread-onlyRecover the file names a protected map stripped.
diffread-onlyCompare two maps and report which internal files were added, removed or changed.
editor_catalog_getread-onlyShow one World Editor catalog's entries, each with its stored key (the token a map file actually carries), its resolved display name and every payload field.
editor_catalog_listread-onlyList the World Editor's catalog names from UI\WorldEditData.txt with entry counts (TileSets, SkyModels, LoadingScreens, SoundChannels, MapSizes, the brush...
file_get_textread-onlyRead one internal file decoded as UTF-8, with any leading BOM stripped.
file_listread-onlyList the archive's internal entries with their CURRENT size, which reflects a pending replacement rather than the stale original.
file_setwritesReplace an internal file's bytes verbatim from a disk file and save the edited map to out_path.
force_listread-onlyList the map's forces/teams (war3map.w3i).
force_set_flagswritesSet a force's alliance/sharing flags and save the edited map to out_path.
hero_installwritesInstall a hero definition into a map and save the result to out_path.
hero_lintread-onlyValidate a hero definition folder before installing it.
hero_rosterread-onlyList the playable heroes a map registers, with each hero's rawcode, display name, the string tags from its registration call (typically a role and a...
imports_listread-onlyList the map's import table (war3map.imp) against what the archive actually holds, so a table entry with no file behind it and a file absent from the table...
lintread-onlyPre-flight the map.
list_filesread-onlyList the map archive's internal files, each with its name (null = unnamed/protected entry), size in bytes, whether wc3ctl knows/parses the format, and for...
map_inforead-onlyShow a Warcraft III map's metadata.
map_info_getread-onlyRead the map's editable scenario fields (war3map.w3i).
map_info_setwritesSet a scenario field and save the edited map to out_path.
new_mapwritesCreate a blank, World-Editor-openable map (.w3x) at out_path.
object_field_optionsread-onlyThe legal values for one object-data field, taken from what the base game data actually uses for it.
object_formread-onlyGet an object as an editable FORM rather than a flat field dump.
object_getread-onlyGet an object's merged fields (base game data overlaid by the map's deltas), each labeled 'base' or 'map', with field names resolved.
object_listread-onlyList the map's custom/modified objects of one Object Editor kind.
object_newwritesCreate a new custom object derived from a base rawcode (a fresh unused rawcode is allocated) and save the edited map to out_path.
object_setwritesSet a field on an object of one Object Editor kind and save the edited map to out_path (only that kind's war3map.* file is re-serialized).
palette_doodadread-onlyList the doodad types placeable on a map, the palette to consult before place_doodad.
pathing_paintwritesPaint pathing bits over a circular or square brush and save the edited map to out_path.
place_doodadwritesPlace a doodad instance at (x, y) on the map's doodad layer (war3map.doo) and save the edited map to out_path.
place_itemwritesPlace a preplaced item of the given type at world (x, y) and save the edited map to out_path.
place_regionwritesDefine a rectangular region on the map's region layer (war3map.w3r) and save the edited map to out_path.
place_start_locationwritesPlace or move a player's start location at world (x, y) and save the edited map to out_path.
place_unitwritesPlace a unit of the given type, owned by a player, at world (x, y) and save the edited map to out_path.
placed_doodad_getread-onlyShow one placed doodad's full state by creation number.
placed_doodad_removewritesRemove a doodad already placed on the map and save the edited copy to out_path.
placed_doodad_setwritesSet one field on a doodad already placed on the map and save the edited copy to out_path.
placed_doodads_listread-onlyList every doodad and destructable already PLACED on the map (war3map.doo), each with the creation number needed to edit or remove it, plus its type...
placed_unit_getread-onlyShow one placed unit's full state by creation number.
placed_unit_removewritesRemove a unit already placed on the map and save the edited copy to out_path.
placed_unit_setwritesSet one field on a unit already placed on the map and save the edited copy to out_path.
placed_units_listread-onlyList every unit already PLACED on the map (war3mapUnits.doo), each with the creation number needed to edit or remove it, plus its type rawcode, owner,...
player_listread-onlyList the map's player slots (war3map.w3i).
player_set_forcewritesMove a player into a force (team) and save the edited map to out_path.
port_unitwritesPort a unit (its custom-object closure + imported assets + strings, and best-effort its JASS trigger closure) from a source map into a target map,...
region_listread-onlyList the map's rectangular regions (war3map.w3r), each with its creation number, name, and bounds.
region_removewritesRemove a region by name and save the edited map to out_path.
render_modelwritesRender an object's model (map-imported .mdx/.mdl) to a PNG written at out_path.
repair_generatedwritesRepair a map that wc3ctl itself generated, whose preplaced-hero helper block is too narrow for the heroes installed into it, and save the repaired map to...
replay_summaryread-onlyRead recorded games (.w3g) and report each one's map, length, players, and how and when every player left.
roundtripread-onlyVerify the map survives a load and save byte for byte.
script_functionsread-onlyList every function declared in the map's compiled script, with where it starts and ends.
script_leaksread-onlyFind handle leaks in a map's war3map.j (locations, groups, forces, effects, timers, text tags, lightning and triggers created and never destroyed), each...
script_referencesread-onlyFind every use of a name in the map's compiled script.
searchread-onlySearch the map's contents for a string, ignoring case.
sound_addwritesAdd a new sound definition (keyed by name) to the map's sound catalog and save the edited map to out_path.
sound_listread-onlyList the map's sound catalog (war3map.w3s).
sound_removewritesRemove a sound definition from the map's sound catalog and save the edited map to out_path.
sound_setwritesSet a field on a sound definition and save the edited map to out_path.
strings_listread-onlyList the map's string table (war3map.wts).
terrain_blightwritesSet or clear the blight (corrupted ground) flag over a brush, saving the edited map to out_path.
terrain_cliffwritesRaise/lower/set the cliff (stepped-terrain) level over a brush, saving the edited map to out_path.
terrain_corner_getread-onlyShow one terrain corner's full state.
terrain_corner_setwritesSet one field on ONE terrain corner and save the edited copy to out_path.
terrain_deformwritesRaise/lower/set/flatten/smooth ground height over a circular or square brush, saving the edited map to out_path.
terrain_fillwritesApply a terrain tool over an inclusive RECTANGLE of corners and save the edited map to out_path, instead of one brush dab at a time.
terrain_inforead-onlyThe terrain grid's extents in corners, plus the map's ground and cliff tile lists.
terrain_paintwritesPaint a ground texture over a brush, saving the edited map to out_path.
terrain_rampwritesToggle the ramp (sloped cliff transition) flag over a brush, saving the edited map to out_path.
terrain_statsread-onlySummarize a map's terrain (war3map.w3e).
terrain_waterwritesSet/raise/lower/remove water over a brush, saving the edited map to out_path.
trigger_addwritesAdd a trigger to a category in the map's GUI trigger tree and save the edited map to out_path.
trigger_add_categorywritesAdd a category to the map's GUI trigger tree and save the edited map to out_path.
trigger_add_ecawritesAdd an event, condition or action to a GUI trigger and save the edited map to out_path.
trigger_catalog_describeread-onlyShow full detail for one GUI-trigger function by name (e.g.
trigger_catalog_listread-onlyList GUI-trigger functions from the World-Editor catalog (UI\TriggerData.txt), optionally filtered by kind and/or a name/display-name search.
trigger_recover_from_scriptwritesRebuild a browsable GUI trigger tree (war3map.wtg) for a map that has NONE, by decompiling the compiled script the game runs, and save the result to out_path.
trigger_removewritesRemove a trigger item (a category, a trigger or a comment) from the GUI trigger tree and save the edited map to out_path.
trigger_remove_ecawritesRemove one event, condition or action from a GUI trigger by its zero-based position, and save the edited map to out_path.
trigger_renamewritesRename a trigger item (a category, a trigger or a deleted stub) in the GUI trigger tree and save the edited map to out_path.
trigger_set_eca_enabledwritesEnable or disable ONE event, condition or action within a trigger, the World Editor's per-line toggle rather than the whole-trigger one, and save the edited...
trigger_set_enabledwritesEnable or disable a GUI trigger and save the edited map to out_path.
trigger_set_initially_onwritesSet whether a GUI trigger starts switched on, and save the edited map to out_path.
trigger_set_run_on_map_initwritesSet whether a GUI trigger runs on map initialization, and save the edited map to out_path.
triggers_readread-onlyRead the map's GUI trigger tree (war3map.wtg) plus the custom-text bodies (war3map.wct) and the script language.
uabi_profileread-onlyMeasure unit ability lists (uabi) across many maps at once, one row per map.
unit_abilitiesread-onlyEvery ability a unit has, each tagged with where it comes from.
validateread-onlyCheck the map for structural problems.

Safety

Writing tools require out_path to differ from the input map. The original is never overwritten.

Limits

Windows x64 only (native CascLib). Tools that query base-game data need a Warcraft III Reforged install.

Troubleshooting

  • Start with wc3-mcp doctor. It shows where the exe is, whether CascLib.dll is beside it, which Warcraft III folder it uses and which apps are set up.
  • Game not found. Run wc3-mcp install --all --game-dir "<your Warcraft III folder>", or pass game_dir to the tool.
  • An app does not list the tools. Restart it fully. Claude Desktop needs a quit from the tray, not just closing the window.
  • A settings file was not changed. It has comments or is not valid JSON, so the settings to paste were printed instead. wc3-mcp config <app> prints them again.
  • Protected maps. Pass listfiles to deprotect_map to supply community name lists.

Credits

Built on

LibraryAuthor
War3Net (War3Net.Build, War3Net.IO.Mpq, War3Net.Drawing.Blp, War3Net.CodeAnalysis.Decompilers)Drake53 and contributors
CascLibLadislav Zezula
CascLib.NETKizari
ImageSharpSix Labors and contributors
MCP C# SDK (ModelContextProtocol)Model Context Protocol project
Microsoft.Extensions.HostingMicrosoft, .NET Foundation

Used directly: Luashine/jass-history (inventory change study), pjass (JASS syntax checking), devoltz and Arakunido (SLK repair guide), and the Hive Workshop community (command line arguments).

Learned from, among many others, HiveWE (stijnherfst), Warsmash and Retera's Model Studio (Retera), WC3MapTranslator (ChiefOfGxBxL), Wurst, TheHelper and the Hive Workshop. The full list of every project and community studied, 197 in all, is in CREDITS.md.

Warcraft III is made by Blizzard Entertainment. This project is unofficial, is not affiliated with or endorsed by Blizzard, reads your own install and ships no game files.

Setup from the maintainer

This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.

Package

https://github.com/GodMephisto/wc3-mcp/releases/download/v0.2.0/wc3-mcp-v0.2.0-win-x64.mcpbother

Compatible MCP Clients

Warcraft III Map Tools works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More