
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.
概覽
一個 MCP 伺服器,讓編碼代理建置與編輯《鋼鐵雄心4》模組:國策樹、事件、決議、地圖、預覽與腳本修復。
- 可以做什麼
- 建立與編輯模組中的國策樹、事件、決議與科技資料夾
- 依參考圖片產生新世界地圖,包含省份、州、地形、城市、國家與補給
- 在寫入前預覽國策樹、視窗、地圖與科技資料夾
- 查閱遊戲文件中的規則,分析並修復損壞的腳本
- 調整 AI 權重與選擇
- 適用情境
- 適合在製作《鋼鐵雄心4》模組時,讓代理建立或修復模組檔案、產生地圖,或對照遊戲文件檢查腳本。最適合將單一模組資料夾開啟為代理的工作區使用。
- 執行需求
- 從 npm 安裝的本機程序;需要 Node.js 22.19 或更新版本,或 24。需安裝《鋼鐵雄心4》以取得原版檔案、美術資源與字型。在模組資料夾內啟動時不需設定檔;可用安裝指令為多個模組或指定遊戲路徑產生設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HOI4 Agent Tools,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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
-
Install Node.js 22 (22.19 or later) or 24, and keep Hearts of Iron IV installed for vanilla files, artwork and fonts.
-
Install the server:
-
Print the client configuration:
Paste the
globalInstallblock into a JSON client such as Claude Code, Claude Desktop or Cursor, or thecodexTomlGlobalblock into Codex'sconfig.toml. -
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
- Setup and configuration
- Examples and tool reference
- Guides: local references, focus trees, scripted GUIs, maps, events, technology, AI weights and timing, decisions and impact, mechanic and package tests
- Background jobs and HTTP
- Development, changelog and security policy
- Documentation index
Development
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版本歷史
27- v4.11.0最新Nov 7, 2026
- v4.8.0Nov 6, 2026
- v4.7.0Nov 3, 2026
- v4.6.4Nov 1, 2026
- v4.6.2Oct 31, 2026
- v4.6.1Oct 26, 2026
- v4.5.0Oct 25, 2026
- v4.4.0Oct 25, 2026
- v4.3.0Oct 19, 2026
- v4.2.0Oct 19, 2026
- v4.1.0Oct 15, 2026
- v4.0.5Oct 15, 2026
- v4.0.4Oct 14, 2026
- v4.0.3Oct 13, 2026
- v4.0.1Oct 12, 2026
- v4.0.0Oct 11, 2026
- v3.9.0Oct 6, 2026
- v3.8.1Oct 5, 2026
- v3.8.0Oct 4, 2026
- v3.7.0Oct 4, 2026
- v3.6.0Sep 27, 2026
- v3.5.1Sep 27, 2026
- v3.4.1Sep 25, 2026
- v3.4.0Sep 25, 2026
- v3.3.0Sep 20, 2026
- v3.2.0Sep 20, 2026
- v3.0.9Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分