clausewitz-mcp
Provides modding support for Paradox Interactive games, including syntax checking, validation, and lookup of scripts, definitions, and localisation across EU4, EU5, Victoria 3, HOI4, CK3, and Stellaris.
Click on "Deploy 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., "@clausewitz-mcp look up has_country_flag trigger"
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.
clausewitz-mcp
An MCP server for Paradox Clausewitz/Jomini modding — EU5, EU4, Victoria 3, HOI4, CK3, Stellaris.
It gives an AI assistant the two things it needs to write Paradox script that actually loads: the game's own generated documentation for the exact patch you're modding, and a parsed index of the vanilla script tree to copy working patterns from.
No running game required. No DLL injection, no mod to install, nothing to attach to. It reads files, so it works on any OS regardless of what the game itself supports.
Why
Ask a model to write a Paradox event and you get script that looks right and silently does nothing. has_country_flagg instead of has_country_flag. An effect used in a trigger block. A localisation key that renders as raw text in game. A mod file that shadows a vanilla file nobody noticed. None of it errors — Paradox games fail quietly, which is the worst possible failure mode for a generated-then-forgotten mod.
The fix isn't a better prompt, it's grounding. Paradox games dump their entire scripting surface — every trigger, effect, scope, event target and modifier, with supported scopes — straight out of the binary via the script_docs console command. That output is exact and it's correct for your patch. This server parses it and puts it behind tool calls, so the model looks up add_prestige instead of remembering it.
CWTools already does excellent rules-based validation for Paradox script, and if you're hand-writing mods in VS Code you should use it. But it's a language server — an agent can't call it. This is the agent-facing equivalent, grounded in the game's dumps rather than hand-maintained rules, which is also why it works on a game as new as EU5 that has no rule definitions yet.
Related MCP server: ultimate-construct3-mcp
Install
uv syncRegister it with Claude Code:
claude mcp add clausewitz -- uv --directory /path/to/clausewitz-mcp run clausewitz-mcpSetup
Point it at a vanilla game tree and your mod:
set_workspace(
game_root = "/path/to/Europa Universalis IV",
mod_roots = ["/path/to/mod/my_mod"],
docs_dir = "/path/to/Documents/Paradox Interactive/<game>/docs"
)game_root and mod_roots are enough to start. docs_dir is what unlocks the good part.
Generating the docs dump
This is the step worth doing. In Steam, add -debug_mode to the game's launch options. Start the game, press ` to open the console, then run:
script_docs
dump_data_typesOutput lands in Documents/Paradox Interactive/<game>/docs and .../logs/data_types. Point docs_dir at it.
Everything is copied from there, so you only need access to a machine that can run the game once — the server itself never launches it. If you mod EU5 from a Mac, generate the dump on a Windows box and copy the folder across.
Tools
Grounding
lookup_script(name, kind)— a trigger/effect/scope/modifier from the game's own docs, verbatim, with supported scopes. Returnsdid_you_meanon a miss.search_script_docs(query, kind)— find the real name when you only know roughly what you want.docs_report()— what was ingested, so you can sanity-check the parse.
The script tree
find_definition(name, category)— where a religion/building/event/scripted effect is defined, across vanilla and mods.search_definitions(query, category)— substring search over every defined name.find_usages(name)— real working examples of a pattern before you write your own.read_block(file, key_path)— one block out of a file instead of ten thousand lines.list_categories()— map of what lives where.lookup_localisation(key)— resolve a loc key to its text, file and line.
Authoring
parse_script(text)— syntax-check a snippet before writing it, with exact line/column.validate_mod(checks)— run the checks below over your mod.
Validation
Every check is chosen to be low-noise — a reported problem should be a real one.
Check | Finds |
| Unclosed braces, dangling operators, malformed blocks, with line/column |
| Triggers/effects the game doesn't define, with |
| Referenced loc keys that resolve nowhere and will render raw in game |
| Localisation files missing the UTF-8 BOM the game silently requires |
| The same object defined twice inside your own mod |
| Mod files overriding vanilla files — usually intended, occasionally the bug |
unknown_script requires a loaded script_docs dump. Without one it is skipped, not guessed at — inferring trigger validity without the game's signature list produces exactly the confident-but-wrong output this server exists to prevent.
Supported games
Auto-detected from the game root: EU5, EU4, Victoria 3, HOI4, CK3, Stellaris. The game/ subdirectory layout used by the newer Jomini titles is handled, as are both the localization and localisation spellings.
Anything else falls back to a generic adapter and still indexes common/ and events/, so an unrecognised or brand-new title works out of the box. Pass game= to override detection.
Status
v0.1. The parser, indexer and validation passes are tested against a fixture tree (tests/fixtures). The script_docs ingester is deliberately tolerant: entries keep their raw text verbatim and that is what tool calls return, with structured fields layered on best-effort, because the dump format drifts between games and versions. Run docs_report() after loading a real dump — if a large file reports one entry, the split heuristics missed and it's worth an issue with a sample.
License
MIT
Available Tools
13 toolsdocs_reportA
Show which script_docs files were ingested and how many entries came out of each. Use this to sanity-check the dump was parsed sensibly — an entry count of 1 for a large file means the split heuristics missed.
Inputs: no named parameters. Returns: object
find_definitionA
Find where a named game object is defined (a religion, a building, a scripted effect, an event). Searches vanilla and every loaded mod.
category: optional path filter, e.g. 'common/religions' or 'events'.
Inputs: name (required), category. Returns: object
find_usagesA
Find where a name is actually used across the tree — the fastest way to get real, working examples of a pattern before writing your own.
Inputs: name (required), limit. Returns: object
list_categoriesB
List the script directories in the indexed tree with definition counts — a map of where things live, e.g. 'common/religions': 12.
Inputs: filter. Returns: object
lookup_localisationA
Resolve a localisation key to its text, file and line.
Inputs: key (required). Returns: object
lookup_scriptA
Look up a trigger, effect, scope, event target or modifier in the game's own generated documentation. Returns the raw doc entry verbatim, including supported scopes and targets.
This is the authoritative source for what exists in this build. Prefer it over recalled knowledge for anything you are about to write.
Inputs: name (required), kind. Returns: object
parse_scriptA
Syntax-check a snippet of Clausewitz script without writing it to disk.
Call this on anything you are about to write. Returns exact line/column for every problem, and the top-level keys the parser saw so you can confirm the structure came out the way you intended.
Inputs: text (required). Returns: object
read_blockA
Read one block out of a script file instead of the whole thing.
file: path relative to the game/mod script root, e.g. 'common/religions/00_religion.txt'. key_path: keys to walk into, e.g. ['catholic'] or ['my_event', 'trigger']. source: 'vanilla' or a mod directory name, when the same path exists in both.
Inputs: file (required), source, key_path. Returns: object
search_definitionsC
Substring search over every defined object name in the indexed tree.
Inputs: query (required), limit, category. Returns: object
search_script_docsA
Substring search across script_docs names and bodies. Use when you know roughly what you want ('prestige', 'add flag') but not the exact name.
kind: trigger, effect, scope, event_target, modifier, on_action, data_type.
Inputs: query (required), kind, limit. Returns: object
set_workspaceA
Point the server at a vanilla game tree, optional mod trees, and an optional script_docs dump, then index everything.
game_root: the game's install directory (the one containing common/, or a
game/ folder for CK3/Vic3/EU5).
mod_roots: mod directories, in load order — later entries win.
docs_dir: output of the script_docs console command. Strongly recommended;
several checks are skipped without it.
game: override auto-detection (eu5, eu4, vic3, hoi4, ck3, stellaris).
Inputs: game_root (required), game, docs_dir, mod_roots. Returns: object
validate_modA
Run validation over the loaded mod(s).
checks: any of syntax, encoding, duplicates, localisation, unknown_script,
shadowing. Defaults to all. unknown_script needs script_docs loaded
and is skipped otherwise rather than guessed at.
Inputs: checks. Returns: object
workspace_statusB
What is currently indexed, and whether script_docs are loaded.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Tools are mostly distinct, targeting separate concerns: reading blocks, listing categories, localisation lookup, parsing, validation, definition lookup, substring search on definitions or docs, usage search, and workspace management. The pairings find/search and lookup/search are distinguished by exact vs. substring and game objects vs. script_docs, though they could still be confused by an agent without careful reading.
Names predominantly follow a verb_noun pattern with snake_case (read_block, find_definition, set_workspace). The exceptions are docs_report and workspace_status, which are noun-first compounds, creating a minor inconsistency but not enough to cause confusion.
13 tools is well within the sweet spot for a domain-specific server. Each tool addresses a distinct need—setup, indexing, search, reading, validation, and documentation—without redundancy or bloat.
The surface covers the core workflow of a Clausewitz modding assistant: workspace setup, indexing, searching definitions/usages, reading script blocks, looking up docs, validating syntax and mods, and checking docs ingestion. Minor gaps include the absence of a whole-file read or a file-write tool, but those fall outside the server's read/validate role.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
An MCP server that gives your AI access to the source code and docs of all public github repos
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server for inspecting and interacting with Europa Universalis V game installs and mods, including file browsing, entity queries, diplomacy and religion reports, and mod update workflows.MIT
- AlicenseAqualityDmaintenanceUnified MCP server for Construct 3 providing offline documentation, project read/write, analysis, and scripting support. Enables AI-driven game development and project management through natural language.61MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes structured World of Warcraft API data (functions, deprecated replacements, enums, events, widget methods) to AI agents, enabling querying and exploration of WoW API without wiki parsing.14 npm15MIT
- AlicenseBqualityBmaintenanceLocal MCP server for Cities: Skylines II that provides a searchable wiki corpus, curated research reports, and in-game encyclopedia for answering gameplay and modding questions, plus tools for scaffolding, building, and packaging mod projects.1374 PyPI10MIT