HOI4 Agent Tools

io.github.klimPaskovPublished by GitHub account klimPaskovv4.11.0Updated Nov 7, 2026

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

VerifiedSTDIODesktop onlyDeveloper ToolsMedia & Design

Overview

AI-generated overview

An MCP server that lets a coding agent build and edit Hearts of Iron IV mods: focus trees, events, decisions, maps, previews and script fixes.

What you can do
  • Create and edit focus trees, events, decisions and technology folders in mod source
  • Generate a new world map from a reference image, with provinces, states, terrain, cities, countries and supply
  • Preview focus trees, windows, maps and technology folders before writing
  • Look up rules in the game's documentation and analyze or repair broken script
  • Tune AI weights and choices
When to use it
Useful when you are modding Hearts of Iron IV and want an agent to scaffold or repair mod files, generate a map, or check script against the game's documentation. Best suited to working inside a single mod folder opened as the agent's workspace.
Requirements
Local process installed from npm; Node.js 22.19 or later, or 24. Hearts of Iron IV must be installed for vanilla files, artwork and fonts. No configuration file is needed when started inside a mod folder; a setup command can write one for multiple mods or explicit game paths.
Before you install
Edits are written directly to your mod folder, so use version control to review or undo them. It does not run the game; previews come from mod source and gameplay must be tested in HOI4. An optional HTTP mode for remote or shared use adds tokens or OAuth.

Installation

In SourceWeft

  1. Open HOI4 Agent Tools in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit 3f035b2

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

27
  1. v4.11.0LatestNov 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

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts