Skip to main content
Glama
YElwiddi

Warcraft 3 MCP Server

by YElwiddi

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: blender-mcp

试一试

直接用简单的英语问 Claude,并把地图的完整路径告诉它。例如:

"使用 wc3 给我一个 C:\Users\Me\Desktop\MyMap.w3x 的概览。"

默认情况下,修改会保存到你地图旁边的一个副本(MyMap.edited.w3x),因此你的原文件是安全的。如果你想让 Claude 直接修改原文件,就告诉它*"覆盖原文件"*


Claude 可以做什么(工具)

查看地图

工具

作用

wc3_overview

整张地图的快速概览(很好的起点)

wc3_map_info

地图名称、作者、玩家、尺寸

wc3_list_files / wc3_read_file

列出或读取地图内的任意文件

wc3_read_objects

读取单位 / 物品 / 技能等及其属性

wc3_read_placements / wc3_list_units / wc3_list_doodads

地图上放置了什么

wc3_read_script

地图的脚本(JASS / Lua)

wc3_read_strings

文本字符串(名称、提示、任务文本)

wc3_read_regions / wc3_read_cameras / wc3_read_sounds

区域、镜头、声音

wc3_read_terrain

地形概览(尺寸、地块、高度)

wc3_read_triggers / wc3_read_imports

完整的 GUI 触发器(事件、条件、动作)和导入的文件

修改地图

工具

作用

wc3_place_unit / wc3_modify_unit / wc3_delete_unit

添加、移动或移除单位

wc3_place_doodad / wc3_modify_doodad / wc3_delete_doodad

添加、移动或移除装饰物/树木等

wc3_add_region / wc3_modify_region / wc3_delete_region

管理区域

wc3_add_camera / wc3_delete_camera

管理镜头

wc3_write_objects

修改单位/物品/技能属性

wc3_set_string

修改文本字符串

wc3_write_script / wc3_replace_file

替换脚本或任意内部文件

wc3_add_gui_trigger / wc3_modify_gui_trigger

创建或编辑真正的 GUI 触发器(在 Trigger Editor 中可见,保存后仍然保留)

创建新东西

工具

作用

wc3_create_object

基于现有单位/物品/技能制作自定义版本

wc3_set_durable_script

添加立即可运行的游戏逻辑,在编辑器重新保存后仍然保留,并可在 Trigger Editor 中进行编辑

查看你的修改

工具

作用

wc3_open_in_editor

在 Warcraft III World Editor 中打开地图

wc3_test_map

在 Warcraft III 中启动地图进行游玩


GUI 触发器(1.1 新增)

Claude 可以读取和编辑真正的 GUI 触发器树——也就是你在 Trigger Editor(F4)中看到的那些触发器。

"把那个触发器的技能从战鼓改成重击。" "创建一个 GUI 触发器,让步兵在首次攻击时杀死兽人步兵。"

向 Claude 请求添加一个触发器…

让 Claude 添加 GUI 触发器

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

在 World Editor 的 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 — 免费且开源。你可以随意使用它。

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables 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
  • A
    license
    A
    quality
    C
    maintenance
    Connects Blender 3D modeling software with Claude AI, enabling natural language control of 3D modeling and scene manipulation tasks.
    17
    4
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables Claude to control Unreal Engine 5 editor, spawn actors, build materials, author Blueprints, and more, with zero plugin installation.
    31
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Read, edit, publish, and preview your pepita websites from Claude.

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • Build, version, review, and export websites, web apps, and games from a conversation.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YElwiddi/warcraft-3-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server