Warcraft III Map Tools

io.github.GodMephistov0.1.3更新於 Oct 3, 2026

Read, audit and edit Warcraft III maps byte-faithfully

概覽

AI 產生的概覽

讀取、稽核並以位元組保真方式編輯《魔獸爭霸 III》的 .w3x 與 .w3m 地圖,涵蓋地形、物件、單位與內部檔案。

功能
這是一個本機 stdio MCP 伺服器,提供 49 個處理《魔獸爭霸 III》地圖的工具。唯讀工具涵蓋地圖中介資料、壓縮檔內檔案清單、指令碼控制代碼洩漏、單位技能設定、物件資料、地形統計、音效、鏡頭、玩家、勢力,以及 .w3g 重播摘要。寫入工具可編輯物件、地形、尋路、裝飾物、單位、物品、區域、起始點、音效、鏡頭與情境欄位,並儲存到另外的 out_path。它也能將物件模型算繪成 PNG、在地圖之間移植單位,以及從受保護地圖中還原檔案名稱。
適用情境
當助理需要檢視或修改《魔獸爭霸 III》地圖時使用:稽核物件資料與提示文字、找出指令碼洩漏、分析單位技能、編輯地形或放置物,或在地圖之間移植單位。適合在 Windows 上工作、希望以可重複的指令碼方式編輯、而非手動操作世界編輯器的地圖作者與模組製作者。
執行需求
僅支援 64 位元 Windows;隨附的 CascLib 遊戲資料讀取程式庫是 Windows 程式庫。發行版自帶 .NET 執行階段,不需另外安裝。讀取基礎遊戲資料的工具需要安裝《魔獸爭霸 III:淬鍊重生》;地圖工具則不需要。遊戲資料夾會自動偵測,也可透過 WC3_GAME_DIR 環境變數或工具的 game_dir 參數指定。不需要帳號或 API 金鑰。
安裝前請注意
許多工具會寫入地圖,但寫入工具要求 out_path 與輸入地圖不同,因此原始地圖不會被覆寫。安裝過程會執行 PowerShell 指令碼,下載發行版、驗證其 SHA-256、解壓縮並修改 AI 應用程式的設定檔,修改前會先備份;含註解的檔案不會被改寫。此伺服器會讀取本機地圖與遊戲檔案,並將其內容傳送給所連接的 AI 應用程式。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Warcraft III Map Tools,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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).

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

powershell
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

powershell
.\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 PCwc3-mcp install cursor vscode    set up only the apps namedwc3-mcp uninstall --all          remove it againwc3-mcp config <app>             print the settings to paste by handwc3-mcp clients                  list supported apps and whether each is set upwc3-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,

powershell
git clone https://github.com/GodMephisto/wc3-mcpcd wc3-mcpdotnet 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

49 tools across these categories:

NameRead/WriteDescription
map_inforead-onlyMap metadata including name, author, player count, playable dimensions and load diagnostics.
list_filesread-onlyList the map archive internal files with name, size in bytes and parsed format flags.
script_leaksread-onlyHandle leaks in war3map.j including locations, groups, forces, timers and triggers ranked by frequency.
uabi_profileread-onlyUnit ability profiles across maps including unit types, references, ids and per-race breakdown.
replay_summaryread-onlyRead .w3g replay files with map, length, players and disconnect events.
object_listread-onlyList custom or modified objects with rawcode, base rawcode and resolved name.
object_getread-onlyMerged object fields (base overlaid by map deltas) with names resolved.
unit_abilitiesread-onlyEvery ability a unit has and where it comes from. Unit data, spellbook contents, a placed unit's own abilities and levels, morph forms, and abilities the script hands out (inferred, with the war3map.j line).
object_setwritesSet a field on an object and save to out_path.
object_newwritesCreate a new custom object derived from a base rawcode, save to out_path.
bundle_unitread-onlyUnit dependency closure including objects, asset files, strings, edges and JASS.
render_modelwritesRender an object model (.mdx or .mdl) to PNG at out_path.
port_unitwritesPort a unit from a source map into a target map, auto-remapping collisions.
palette_doodadread-onlyList placeable doodad types, the palette for place_doodad.
place_doodadwritesPlace a doodad instance at (x, y) on the doodad layer.
place_regionwritesDefine a rectangular region on the region layer.
place_unitwritesPlace a unit at world (x, y) owned by a player.
place_start_locationwritesPlace or move a player start location at (x, y).
place_itemwritesPlace a preplaced item at world (x, y).
terrain_statsread-onlyTerrain summary with tile count, min or max height, and cliff level.
terrain_deformwritesRaise, lower, set, flatten or smooth ground height.
terrain_cliffwritesRaise, lower or set cliff (stepped-terrain) level.
terrain_rampwritesToggle the ramp (sloped cliff) flag.
terrain_paintwritesPaint ground texture over a brush.
terrain_waterwritesSet, raise, lower or remove water.
terrain_blightwritesSet or clear the blight flag.
deprotect_mapread-onlyRecover file names from protected maps.
file_listread-onlyList archive entries with their current size.
file_get_textread-onlyRead an internal file decoded as UTF-8.
file_setwritesReplace an internal file from a disk file.
audit_mapread-onlyBehavioural audit of object data including tooltips, requirements and dangling references.
sound_listread-onlyList the map sound catalog with name, file, channel, volume, pitch and distance.
sound_addwritesAdd a new sound definition.
sound_setwritesSet a field on a sound definition.
sound_removewritesRemove a sound definition.
camera_listread-onlyList cameras with name, target, rotation, angle of attack and field of view.
camera_addwritesAdd a camera at a target position.
camera_setwritesSet a field on a camera.
camera_removewritesRemove a camera.
pathing_paintwritesPaint pathing bits (Walk, Fly, Build, Blight, Water) over a brush.
map_info_getread-onlyRead editable scenario fields (name, author, fog, etc.).
map_info_setwritesSet a scenario field.
player_listread-onlyList player slots with name, color, race, controller and start position.
player_set_forcewritesMove a player into a force (team).
force_listread-onlyList forces and teams with name, members, alliance and sharing flags.
force_set_flagswritesSet force alliance or sharing flags.
new_mapwritesCreate a blank World Editor openable map.
trigger_catalog_listread-onlyList GUI-trigger functions from the World Editor catalog.
trigger_catalog_describeread-onlyShow detail for one GUI-trigger function by name.

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)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.

來源:README.md,提交 9f9b64e

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.1.3最新Oct 3, 2026