HOI4 Agent Tools

Registre officiel Productivité

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

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package hoi4-agent-tools
Claude Code
claude mcp add hoi4-agent-tools -- npx -y hoi4-agent-tools@4.6.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "hoi4-agent-tools": {
            "command": "npx",
            "args": [
                "-y",
                "hoi4-agent-tools@4.6.1"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. HOI4 Agent Tools
  2. What it does
  3. Quick start
  4. Examples
  5. Tools
  6. FAQ
  7. Configuration
  8. Documentation
  9. Development
  10. License

HOI4 Agent Tools

An MCP server that helps coding agents build and edit Hearts of Iron IV mods. 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:
     npm install --global hoi4-agent-tools
  3. Print the client configuration:

     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

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

In gameServer preview

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

npm ci
npm 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.

Questions fréquentes

Qu'est-ce que HOI4 Agent Tools ?

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

Comment installer HOI4 Agent Tools ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add hoi4-agent-tools -- npx -y hoi4-agent-tools@4.6.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour HOI4 Agent Tools ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

HOI4 Agent Tools est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient HOI4 Agent Tools ?

Il est publié par klimPaskov. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.