HOI4 Agent Tools
Provides tools for modding Hearts of Iron IV, including focus tree editing, GUI design, and map transactions, integrating with Paradox Interactive's game development environment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HOI4 Agent Toolsscan the focus tree in my mod for errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HOI4 Agent Tools
HOI4 Agent Tools is an MCP server for coding agents to understand Hearts of Iron IV event chains, technology systems, AI weights, and MTTH timing and to inspect, create, or clean up focus trees, scripted GUIs, and maps. It produces source-linked structural and visual evidence that agents can use inside a larger modding workflow.
What it does
Focus trees: inspect structure and references, render layouts, create trees, and reorganize existing branches.
Scripted GUIs: trace GUI, GFX, scripted-GUI, and localisation links; render value-driven variants, dynamic country flags, inline text icons, states, resolutions, hierarchy, and click regions; diagnose alignment, visibility, clipping, panel containment, and button-label centering; create or repair interface source.
Maps: navigate the complete rendered map by ID or localised name; inspect provinces, states, regions, adjacency, supply, railways, and positions; create states and provinces; change IDs; and repair connected map data.
Event chains: scan definitions and call sites, trace routes and state flow, lint references, render graphs, and compare revisions without editing event source.
Technology trees: reconstruct technology and doctrine paths, folder layouts, unlocks, bonuses, grants, metadata, assets, and structural changes.
AI and MTTH: evaluate weighted choices and timing across explicit scenarios, bind special scope chains, enumerate dynamic target pools, sweep uncertain inputs, simulate distributions, compare patches, and analyze declared stateful pools.
Related MCP server: Session Collab MCP
Real results
The GUI renderer resolves the mod and installed-game sources, fonts, localisation colours, sprites, scripted visibility, dynamic values, lists, controls, and panel composition. These pairs show the in-game surface beside the MCP result.
Communist Insurgency in game | Communist Insurgency from MCP |
|
|
Chaos Meter in game | Chaos Meter from MCP |
|
|
The same scenario-aware renderer can select mutually exclusive settings panes and populate plausible runtime values.
Trigger Events settings | Advanced settings |
|
|
The other workbenches return complete source-linked layouts and catalogs rather than prose-only summaries.
Focus tree | Technology tree |
|
|
Map | Event chain | Probability ranking |
|
|
|
Use from a coding agent
Requires Node.js 22.19 or later in the Node 22 line, or Node.js 24.
npm install --global hoi4-agent-tools@latest[mcp_servers.hoi4_agent_tools]
command = "hoi4-agent-tools.cmd"On non-Windows systems, use hoi4-agent-tools as the command. Agentic HOI4 repositories can include these steps in their agent template so the coding agent installs and registers the server itself; manual installation is not required in that workflow. Once connected, the server follows the active mod supplied by the client and the agent can call its HOI4 tools directly.
Tools
Tool | Purpose |
| Read focus trees, continuous-focus placement, and structural or reference problems. |
| Produce fast HTML, SVG, JSON, and source-linked layout artifacts. |
| Produce a high-fidelity PNG review with decoded source icons. |
| Create or update a focus tree. |
| Read a scripted GUI and its linked assets and logic. |
| Render generated and explicit GUI scenarios, states, resolutions, and layout diagnostics. |
| Create or update a GUI source package. |
| Search, click, navigate, and inspect the complete rendered map and its linked data. |
| Render full-map layers, overlays, names, IDs, coordinates, and source-linked catalogs. |
| Create or update states, provinces, IDs, networks, positions, and connected map data. |
| Scan, trace, explain, lint, or assess event chains and their state flow. |
| Render source-linked event routes, options, timing, state, scope, and unresolved edges. |
| Compare event-chain topology and diagnostics between revisions. |
| Scan, trace, explain, lint, and assess technology and doctrine systems. |
| Render source layouts with real item sizes and year guides, plus dependencies and assets. |
| Compare technology graphs, placements, references, diagnostics, and source overlays. |
| Locate weighted logic and discover compatible adapters, candidates, and required inputs. |
| Evaluate exact values, probabilities, timing, bounds, and unresolved inputs. |
| Find sensitivity, breakpoints, cliffs, and rank reversals across declared ranges. |
| Run deterministic sampled analysis with confidence and convergence data. |
| Analyze declared recovery, caps, cooldowns, resets, timers, and terminal states. |
| Attribute AI-weight and MTTH changes between real or proposed source. |
| Render cached rankings, matrices, timing, sensitivity, sequence, and comparisons. |
Set HOI4_AGENT_TOOLS_CHAOSX=1 on the server process to expose the optional chaosx.focus_country_assets and chaosx.visual_revision tools used by ChaosX workflows. They remain absent from the default public tool list.
Large outputs are linked hoi4-agent:// resources. For resources over 1 MiB, follow the continuationUri returned in _meta until it is null; clients may also request byte ranges with ?offset=<bytes>&length=<bytes>.
Coexistence with agent workflows
HOI4 Agent Tools provides HOI4 domain operations without replacing repository instructions such as AGENTS.md, skills, plans, or subagents. Its optional weighted-logic prompt helps an agent scope one probability analysis and then returns control to the normal workflow.
Connecting and listing tools does not scan mod source. Compact tool schemas and linked resources keep large diagnostics, renders, and diffs out of the agent's working context until needed. Event, technology, and probability tools analyze source without editing it; only hoi4.*_rewrite calls edit mod source.
Create or clean content
Ask your agent in normal task language. A typical workflow is inspect, render, rewrite, then inspect the result. The agent can call a raster tool when a pixel review is useful without paying that cost during every structural operation.
Focus trees: "Create a complete national focus tree for this route specification," or "Compact this existing tree into a balanced, readable layout." Existing trees can use a plan-free compact reflow; new trees use a complete plan. See Focus trees.
Scripted GUIs: "Create a scripted GUI for this mechanic," or "Render every value-driven version of this window and fix hidden controls, off-center button text, background alignment, clipping, and click-region conflicts." See Scripted GUIs.
Maps: "Render the whole map and find this state by name," "Create a state from these provinces," "Create a province inside this exact rectangle," or "Swap these state IDs and update connected references." See Maps.
Event chains: "Trace every route from this event and explain where its flags and variables change," or "Compare the workspace event graph with its previous revision and render the affected routes." See Event chains.
Technology trees: "Explain everything this technology requires and unlocks," or "Compare this technology patch and render every affected folder and doctrine branch." See Technology trees.
AI and MTTH: "Compare these focus weights across peace, defensive-war, and low-stability scenarios," or "Show when this MTTH event becomes likely and which unknown inputs control the result." See AI and MTTH analysis.
HTTP
Use stdio for local MCP clients. For shared or remote deployments, see HTTP.
Development
npm ci
npm run checkSee Development. Apache-2.0 licensed. Hearts of Iron IV and Paradox Interactive are trademarks of their respective owners; this project is unaffiliated.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server for deep research or task groups
MCP Server for JFrog, providing tools for development and artifact management.
MCP server for developer documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol (MCP) server for exploring, analyzing, and decompiling Java JAR files.2715MIT
- AlicenseNot gradedqualityAmaintenanceA provider-agnostic MCP server that synchronizes work-in-progress between multiple coding sessions to prevent file conflicts.892MIT
- AlicenseAqualityAmaintenanceAn MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.314413MIT
- FlicenseBqualityBmaintenanceAn MCP server that provides a bounded development workflow for ExileAPI plugins, enabling agents to detect compiler references, create linked Git repositories, and read build errors.19-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/klimPaskov/hoi4-agent-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server










