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 分