Warcraft 3 MCP Server
Warcraft 3 MCP Server
只靠和 Claude 说话就能编辑你的 Warcraft III 地图。
这是一个 MCP 服务器,将 Claude 连接到你的 Warcraft III .w3x / .w3m 地图文件。设置完成后,你可以这样说:
"为玩家 1 在地图中央添加一个步兵。" "让每个兽人步兵的生命值翻倍。" "添加一个触发器,每 30 秒生成 5 只狼,然后在地图编辑器中打开地图。" "创建一个 GUI 触发器,让步兵在首次攻击时杀死兽人步兵。"
…而 Claude 会直接在你的地图文件中做出修改。
一句话原理: Warcraft 的 World Editor 没有插件/自动化系统,所以 这个服务器直接编辑地图文件。你的修改真的就在地图里——在 World Editor 中打开或游玩它,修改就在那里。
安装(5 分钟)
步骤 1 — 安装 Node.js
从 nodejs.org 下载并安装 Node.js 18 或更高版本。
(如果你想检查是否已安装,请打开终端并运行 node --version。)
步骤 2 — 下载此项目并构建
打开终端(命令提示符、PowerShell 或 Terminal)并运行:
git clone https://github.com/YElwiddi/warcraft-3-mcp-server.git
cd warcraft-3-mcp-server
npm install
npm run build就这样——服务器现在已构建到 dist 文件夹中。
步骤 3 — 将其连接到 Claude
选择你使用的任意一种:
Claude Code(CLI) — 运行这一条命令(使用你刚刚构建的文件夹的完整路径):
claude mcp add wc3 --scope user -- node "/full/path/to/warcraft-3-mcp-server/dist/index.js"Claude Desktop(应用) — 打开 设置 → 开发者 → 编辑配置,然后在 mcpServers 下添加一个 wc3 条目(保留你已经有的任何服务器):
{
"mcpServers": {
"wc3": {
"command": "node",
"args": ["C:/full/path/to/warcraft-3-mcp-server/dist/index.js"]
}
}
}步骤 4 — 重启 Claude
关闭并重新打开 Claude Code / Claude Desktop,以便它加载新的工具。大功告成!
💡 提示: 即使在 Windows 上,也要在路径中使用正斜杠
/,例如C:/Users/You/warcraft-3-mcp-server/dist/index.js。
Related MCP server: UEMCP
试一试
直接用简单的英语问 Claude,并把地图的完整路径告诉它。例如:
"使用 wc3 给我一个
C:\Users\Me\Desktop\MyMap.w3x的概览。"
默认情况下,修改会保存到你地图旁边的一个副本(MyMap.edited.w3x),因此你的原文件是安全的。如果你想让 Claude 直接修改原文件,就告诉它*"覆盖原文件"*。
Claude 可以做什么(工具)
查看地图
工具 | 作用 |
| 整张地图的快速概览(很好的起点) |
| 地图名称、作者、玩家、尺寸 |
| 列出或读取地图内的任意文件 |
| 读取单位 / 物品 / 技能等及其属性 |
| 地图上放置了什么 |
| 地图的脚本(JASS / Lua) |
| 文本字符串(名称、提示、任务文本) |
| 区域、镜头、声音 |
| 地形概览(尺寸、地块、高度) |
| 完整的 GUI 触发器(事件、条件、动作)和导入的文件 |
修改地图
工具 | 作用 |
| 添加、移动或移除单位 |
| 添加、移动或移除装饰物/树木等 |
| 管理区域 |
| 管理镜头 |
| 修改单位/物品/技能属性 |
| 修改文本字符串 |
| 替换脚本或任意内部文件 |
| 创建或编辑真正的 GUI 触发器(在 Trigger Editor 中可见,保存后仍然保留) |
创建新东西
工具 | 作用 |
| 基于现有单位/物品/技能制作自定义版本 |
| 添加立即可运行的游戏逻辑,在编辑器重新保存后仍然保留,并可在 Trigger Editor 中进行编辑 |
查看你的修改
工具 | 作用 |
| 在 Warcraft III World Editor 中打开地图 |
| 在 Warcraft III 中启动地图进行游玩 |
GUI 触发器(1.1 新增)
Claude 可以读取和编辑真正的 GUI 触发器树——也就是你在 Trigger Editor(F4)中看到的那些触发器。
"把那个触发器的技能从战鼓改成重击。" "创建一个 GUI 触发器,让步兵在首次攻击时杀死兽人步兵。"
向 Claude 请求添加一个触发器…

…然后它就是一个真正的触发器,就出现在 Trigger Editor 中:

须知:
修改会写入编辑器自身的触发器数据(
war3map.wtg),因此它们会出现在 Trigger Editor 中,并在你保存后仍然保留。设计上安全: 在进行任何写入之前,服务器会证明自己能够逐字节重建你地图的触发器。如果不能,它就会拒绝修改它们。
在 GUI 修改之后,打开地图并保存一次——编辑器就在此时将触发器编译为可玩的脚本。然后进行试玩测试。
与所有修改一样:先在编辑器中关闭地图,之后重新打开。
补充信息
你的原文件是安全的 — 修改会保存到
.edited副本中,除非你要求覆盖。触发器 / 新逻辑:
wc3_set_durable_script会将你的 JASS/Lua 存储在war3map.wct(编辑器自身的触发器存储)中,并将其镜像到地图脚本里——因此它会立即运行,并且在编辑器重新保存后仍然保留,会出现在 Trigger Editor 中,你之后可以在那里编辑它。对于自动运行的触发器,请先在编辑器中创建一个自定义文本触发器(例如命名为MCPDurable)并保存一次;头部槽位(slot:"header")无需任何设置。非常大的地图或受保护的地图可能有一些部分无法读取;Claude 会告诉你哪一部分,并继续处理其余部分。
本工具与 Blizzard Entertainment 没有任何关联。Warcraft III 是 Blizzard 的商标。这个工具只读取/写入你自己的地图文件。
许可证
MIT — 免费且开源。你可以随意使用它。
Available Tools
35 toolswc3_add_cameraAdd a cameraA
Add a predefined camera at target (x,y). Unspecified fields use World Editor defaults (distance 1650, aoa 304, fov 70, rotation 90). Usable from JASS as gg_cam_. Saves the map.
Inputs: mapPath (required), x (required), y (required), name, +7 more.
wc3_add_regionAdd a regionB
Add a rectangular region defined by world-coordinate bounds (left/right/bottom/top). Returns the region with its assigned id (usable from JASS as gg_rct_). Saves the map.
Inputs: mapPath (required), left (required), right (required), bottom (required), +6 more.
wc3_add_triggerAdd a script triggerA
Splice custom JASS/Lua into the map script and optionally wire it to run at map init. code is one or more complete function definitions; set entryFunction to the name of a zero-arg function in code to have it called during initialization. This is the reliable way to make the map DO something new in-game. Note: if the map has a GUI trigger tree and is re-saved in the World Editor, regenerated script may overwrite this; for pure custom-script maps it is fully durable. Saves the map.
Inputs: mapPath (required), code (required), entryFunction, outPath.
wc3_create_objectCreate a custom objectA
Create a custom object (unit/item/ability/buff/destructable/doodad/upgrade) derived from a base type, setting any fields. newId is a fresh 4-char code (e.g. "x000"); baseId is the 4-char code to copy (e.g. "hfoo"). fields are { id (4-char field code), type, value, level?, column? }. Saves the map.
Inputs: mapPath (required), kind (required), baseId (required), newId (required), +2 more.
wc3_delete_cameraDelete camera(s)B
Remove the camera(s) matched by name or index. Saves the map.
Inputs: mapPath (required), select (required), outPath.
wc3_delete_doodadDelete doodad(s)B
Remove the doodad(s) matched by editorId, index, or type. Saves the map.
Inputs: mapPath (required), select (required), outPath.
wc3_delete_regionDelete region(s)A
Remove the region(s) matched by id, name, or index. Saves the map.
Inputs: mapPath (required), select (required), outPath.
wc3_delete_unitDelete placed unit(s)A
Remove the unit(s) matched by select from war3mapUnits.doo. Saves to outPath, or ".edited." beside the source (pass the source path to overwrite in place).
Inputs: mapPath (required), select (required), outPath.
wc3_list_doodadsList placed doodadsA
List preplaced doodads/destructables in war3map.doo with index, editorId, type code, position, angle, scale, variation, life. Optionally filter by type. Use index/editorId with wc3_modify_doodad / wc3_delete_doodad.
Inputs: mapPath (required), type.
wc3_list_filesList files in a WC3 mapA
List the internal files inside a Warcraft III .w3x/.w3m map archive.
Inputs: mapPath (required).
wc3_list_unitsList placed units/itemsA
List the preplaced units and items in war3mapUnits.doo with their index, creationNumber, type code, owner, position and facing. Use the index/creationNumber with wc3_modify_unit or wc3_delete_unit.
Inputs: mapPath (required).
wc3_map_infoRead WC3 map infoA
Parse war3map.w3i: map name, author, description, players, playable area, script language, flags, etc.
Inputs: mapPath (required).
wc3_modify_doodadModify doodad(s)A
Change fields on the doodad(s) matched by editorId, index, or type. Saves the map.
Inputs: mapPath (required), select (required), set (required), outPath.
wc3_modify_regionModify region(s)A
Change bounds/name/weather/sound/color on the region(s) matched by id, name, or index. Saves the map.
Inputs: mapPath (required), select (required), set (required), outPath.
wc3_modify_unitModify placed unit(s)A
Change fields on the unit(s) matched by select — move them, re-own them, rescale, re-face, swap type, or set HP/mana. Saves to outPath, or ".edited." beside the source (pass the source path to overwrite in place).
Inputs: mapPath (required), select (required), set (required), outPath.
wc3_open_in_editorOpen the map in the World EditorA
Launch the Warcraft III World Editor on the given map so the user can see/verify the edits. (The World Editor has no automation API; this just opens the edited file.) Pass exePath to override auto-detection.
Inputs: mapPath (required), exePath.
wc3_overviewWhole-map overviewA
One-call snapshot of the map: info (name/author/players), file count, script language, terrain summary, placed unit/doodad counts, custom-object counts, and the names of regions/cameras/sounds plus a trigger summary. Use this first to orient on an unfamiliar map.
Inputs: mapPath (required).
wc3_place_doodadPlace a doodadB
Add a doodad/destructable at (x,y). Type is a 4-char code, e.g. "LTlt" (a tree) or "ATtr" (a rock). Saves the map.
Inputs: mapPath (required), type (required), x (required), y (required), +6 more.
wc3_place_unitPlace a unit/itemA
Add a preplaced unit or item to the map at world coordinates (x, y). The type is a 4-char raw code, e.g. "ugho" (Ghoul), "hfoo" (Footman), or an item code. Saves to outPath, or ".edited." beside the source (pass the source path to overwrite in place).
Inputs: mapPath (required), type (required), x (required), y (required), +9 more.
wc3_read_camerasRead camerasA
List predefined cameras (war3map.w3c) — name, target, rotation, angle of attack, distance, fov, etc.
Inputs: mapPath (required).
wc3_read_fileRead a raw file from a WC3 mapC
Extract one internal file as text (utf8) or base64.
Inputs: mapPath (required), internalName (required), encoding.
wc3_read_importsRead the import tableA
List custom imported files declared in war3map.imp (models, textures, sounds, …). Their bytes are reachable via wc3_read_file / wc3_replace_file.
Inputs: mapPath (required).
wc3_read_objectsRead WC3 object dataA
Read an object-data table as JSON. "kind" is one of units/items/abilities/buffs/destructables/doodads/upgrades. Returns a { original, custom } modification table.
Inputs: mapPath (required), kind (required).
wc3_read_placementsRead placed units & doodadsA
Read what is placed on the map in the World Editor: preplaced units/items (war3mapUnits.doo) and doodads/destructables (war3map.doo). Returns { units: [...], doodads: [...] } with type code, position, angle, owner, etc.
Inputs: mapPath (required).
wc3_read_regionsRead regionsB
List the rectangular regions (war3map.w3r) — name, id, rect bounds, weather, ambient sound, color.
Inputs: mapPath (required).
wc3_read_scriptRead WC3 map scriptB
Read the map script (war3map.j JASS or war3map.lua).
Inputs: mapPath (required).
wc3_read_soundsRead sound definitionsA
List sound definitions (war3map.w3s) — variable name, file path, and playback settings.
Inputs: mapPath (required).
wc3_read_stringsRead the string tableA
Read war3map.wts as a { id: text } map. Many map fields are stored as TRIGSTR_### references into this table (map/unit names, quest text, tooltips, …).
Inputs: mapPath (required).
wc3_read_terrainRead terrain summaryA
Summarize war3map.w3e: tileset, ground/cliff tileset list, tilepoint dimensions, world size, and height/water ranges.
Inputs: mapPath (required).
wc3_read_triggersRead the trigger treeA
Inspect the GUI trigger tree (war3map.wtg): categories, variables, and per-trigger metadata (name, enabled, comment, action count). GUI triggers compile to the map script — to change behavior reliably, edit the script (wc3_add_trigger).
Inputs: mapPath (required).
wc3_replace_fileReplace a file in a WC3 mapB
Replace (or add) an internal file from a file on disk, then save. Useful for swapping models/textures/imports.
Inputs: mapPath (required), internalName (required), srcPath (required), outPath.
wc3_set_stringSet a string-table entryA
Set the text of a TRIGSTR entry by numeric id (the ### in TRIGSTR_###), or omit id to append a new entry and get back its TRIGSTR_### token. Saves the map.
Inputs: mapPath (required), value (required), id, outPath.
wc3_test_mapRun the map in Warcraft IIIA
Launch Warcraft III running the given map (windowed by default) so the change can be played immediately. Pass exePath to override auto-detection, or windowed=false for fullscreen.
Inputs: mapPath (required), exePath, windowed.
wc3_write_objectsWrite WC3 object dataA
Write an object-data table back into the map and save. Pass the same { original, custom } shape returned by wc3_read_objects. Saves to outPath, or ".edited.w3x" beside the source if omitted (pass the source path to overwrite in place).
Inputs: mapPath (required), kind (required), data (required), outPath.
wc3_write_scriptWrite WC3 map scriptA
Replace the map script (war3map.j / war3map.lua) and save. Saves to outPath, or ".edited.w3x" beside the source if omitted.
Inputs: mapPath (required), content (required), outPath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Each tool targets a unique resource and action (e.g., add_camera, delete_unit, read_terrain). Overlaps like list_doodads vs read_placements are clarified by descriptions focusing on different use cases (listing for modification vs comprehensive snapshot). No two tools serve the same purpose.
All tools follow a consistent verb_noun pattern with the 'wc3_' prefix (e.g., add_camera, delete_doodad, read_script). No mixing of conventions (camelCase, etc.), making the pattern predictable and easy to understand.
With 35 tools, this exceeds the 25+ threshold for 'too many' per the rubric. While the complex domain of Warcraft III map editing justifies many tools, the count is still high and could be streamlined. Some tools could be merged (e.g., list_* and read_* could be combined).
The tool set covers most major aspects: CRUD for units, doodads, regions, cameras, objects; script and trigger management; file handling; and testing/editor integration. Minor gaps exist (no terrain modification, no import management, no map info update), but these do not break core workflows.
Maintenance
Related MCP Connectors
- AutoMEPDeprecatedapp.automep
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Build, edit and publish live 3D, AR and game scenes in ARClip from your AI assistant.
Build, run and publish 3D games in the Zero engine from Claude Code, Cursor or Codex, over MCP.
Make and edit images in Claude, ChatGPT, Cursor and more. Paint to edit, erase. Free to start.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to design and build interactive 3D games within the Portals virtual platform through direct API integration. It facilitates automated asset placement, interaction logic configuration, and quest management using natural language commands.4-
- AlicenseBqualityCmaintenanceEnables Claude to control Unreal Engine 5 editor, spawn actors, build materials, author Blueprints, and more, with zero plugin installation.31225 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to drive a live GIANTS Editor 10.x (FS25) session with 59 tools for terrain editing, field creation, asset placement, map audits, and more through natural language.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables creating and editing Warcraft III maps with Claude, including terrain, triggers, objects, and scripts, and can drive the World Editor and game for testing.13MIT