
Warcraft III Map Tools
io.github.GodMephistov0.1.3更新于 Oct 3, 2026
Read, audit and edit Warcraft III maps byte-faithfully
概览
读取、审计并逐字节保真地编辑《魔兽争霸 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 密钥。
安装
在 SourceWeft 中
- 打开 控制台中的 Warcraft III Map Tools,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
wc3-mcp
Made by GodMephisto
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
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
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.
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 setsWC3_GAME_DIRin each app's entry, or - pass
game_dirto 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,
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:
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 passgame_dirto 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
listfilestodeprotect_mapto supply community name lists.
Credits
Built on
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- v0.1.3最新Oct 3, 2026


