HOI4 Agent Tools

io.github.klimPaskov由 GitHub 账号 klimPaskov 发布v4.11.0更新于 Nov 7, 2026

Build HOI4 mods: focus trees, events, decisions, worlds, GUI previews, docs and AI balance.

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

一个 MCP 服务器,让编码智能体构建和编辑《钢铁雄心4》模组:国策树、事件、决议、地图、预览与脚本修复。

可以做什么
  • 创建和编辑模组中的国策树、事件、决议与技术文件夹
  • 根据参考图片生成新世界地图,包含省份、州、地形、城市、国家和补给
  • 在写入前预览国策树、窗口、地图与技术文件夹
  • 查阅游戏文档中的规则,分析并修复损坏的脚本
  • 调整 AI 权重与选择
适用场景
适合在制作《钢铁雄心4》模组时,让智能体搭建或修复模组文件、生成地图,或对照游戏文档检查脚本。最适合把单个模组文件夹作为智能体工作区打开使用。
运行要求
从 npm 安装的本地进程;需要 Node.js 22.19 或更高版本,或 24。需安装《钢铁雄心4》以获取原版文件、美术资源和字体。在模组文件夹内启动时无需配置文件;可用安装命令为多个模组或指定游戏路径生成配置。
安装前请注意
修改会直接写入你的模组文件夹,建议用版本控制审阅或撤销。它不会运行游戏;预览来自模组源码,实际玩法需在游戏中测试。可选的 HTTP 模式用于远程或共享使用,会引入令牌或 OAuth。

安装

在 SourceWeft 中

  1. 打开 控制台中的 HOI4 Agent Tools,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[HOI4 Agent Tools]

HOI4 Agent Tools

An MCP server that helps coding agents build and edit Hearts of Iron IV mods.

[npm] [Node.js] [License] [Release] [Discord] [YouTube] [Ko-fi] [Issues]

Quick start · npm · Changelog · Contributing · Security

[Watch the HOI4 Agent Tools demo]

Make focus trees, events and decisions. Edit maps and generate a new world. Preview windows, trees and maps, find the right rule in the docs, fix broken script and balance AI choices.

What it does

Your agent can build and edit focus trees, events, decisions and maps, and generate a new world.

For a new map, give it a cleaned local reference image and preview the interpreted geography before writing. The map workflow creates provinces, states, terrain, cities, countries, supply and a provisional starting scenario. Reviewed names and masks refine ambiguous artwork; offline validation is separate from native campaign acceptance. It previews focus trees, technology folders, windows and maps, finds the right rule in the game's documentation, fixes broken script and tunes AI choices. You describe what you want; the agent picks the right tools.

Quick start

  1. Install Node.js 22 (22.19 or later) or 24, and keep Hearts of Iron IV installed for vanilla files, artwork and fonts.

  2. Install the server:

    bash
    npm install --global hoi4-agent-tools
  3. Print the client configuration:

    bash
    hoi4-agent-tools-setup --print-client-config

    Paste the globalInstall block into a JSON client such as Claude Code, Claude Desktop or Cursor, or the codexTomlGlobal block into Codex's config.toml.

  4. Open your mod folder as the agent's workspace and tell it what you want to build or fix.

The setup guide covers several mods, explicit game paths, local wiki snapshots and troubleshooting with --discover and --diagnose.

Watch the Agent Tools demo or use HOI4 Mod Setup to install and connect the server for your mod. Part of the HOI4 modding toolkit with Agentic HOI4 Modding (skills and instructions for your agent) and HOI4 Live Tools (testing in the running game).

Examples

[A large focus tree rendered from mod source]

Each pair shows a capture from the game next to the server's preview of the same source.

See more in the examples gallery.

Tools

The server gives your agent previews, documentation, script analysis and editing tools. The agent combines them with its file editor to build events and decisions, repair scripts and adjust AI weights. The tool reference lists exact names, arguments and results for integrations.

FAQ

Where do edits go? Changes are written to your mod folder; use Git to review or undo them.

Does it run the game? No. Previews come from mod source; test gameplay in HOI4 to see live clicks, AI choices and timing.

Configuration

Started inside a mod folder, the server needs no configuration file. hoi4-agent-tools-setup --init writes one when you work on several mods or the game is not found automatically. For remote or shared use, hoi4-agent-tools-http serves the same tools over HTTP with tokens or OAuth. See the configuration reference and the HTTP guide.

Documentation

Development

bash
npm cinpm run check

See the contributing guide and the development guide.

License

Apache-2.0; see LICENSE and the third-party notices. Hearts of Iron IV artwork belongs to Paradox Interactive; this project is unaffiliated with Paradox Interactive. The in-game captures were supplied for these comparisons.

来源:README.md,提交 3f035b2

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

27
  1. v4.11.0最新Nov 7, 2026
  2. v4.8.0Nov 6, 2026
  3. v4.7.0Nov 3, 2026
  4. v4.6.4Nov 1, 2026
  5. v4.6.2Oct 31, 2026
  6. v4.6.1Oct 26, 2026
  7. v4.5.0Oct 25, 2026
  8. v4.4.0Oct 25, 2026
  9. v4.3.0Oct 19, 2026
  10. v4.2.0Oct 19, 2026
  11. v4.1.0Oct 15, 2026
  12. v4.0.5Oct 15, 2026
  13. v4.0.4Oct 14, 2026
  14. v4.0.3Oct 13, 2026
  15. v4.0.1Oct 12, 2026
  16. v4.0.0Oct 11, 2026
  17. v3.9.0Oct 6, 2026
  18. v3.8.1Oct 5, 2026
  19. v3.8.0Oct 4, 2026
  20. v3.7.0Oct 4, 2026
  21. v3.6.0Sep 27, 2026
  22. v3.5.1Sep 27, 2026
  23. v3.4.1Sep 25, 2026
  24. v3.4.0Sep 25, 2026
  25. v3.3.0Sep 20, 2026
  26. v3.2.0Sep 20, 2026
  27. v3.0.9Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分