enfusion-mcp 0.4.8 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +194 -188
  2. package/data/api/arma-classes.json +334719 -20876
  3. package/data/api/enfusion-classes.json +20675 -718
  4. package/data/wiki/pages.json +42 -42
  5. package/dist/config.d.ts +2 -0
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +10 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/index/search-engine.d.ts +31 -2
  10. package/dist/index/search-engine.d.ts.map +1 -1
  11. package/dist/index/search-engine.js +167 -3
  12. package/dist/index/search-engine.js.map +1 -1
  13. package/dist/index/types.d.ts +27 -0
  14. package/dist/index/types.d.ts.map +1 -1
  15. package/dist/pak/reader.d.ts +28 -0
  16. package/dist/pak/reader.d.ts.map +1 -0
  17. package/dist/pak/reader.js +141 -0
  18. package/dist/pak/reader.js.map +1 -0
  19. package/dist/pak/vfs.d.ts +56 -0
  20. package/dist/pak/vfs.d.ts.map +1 -0
  21. package/dist/pak/vfs.js +200 -0
  22. package/dist/pak/vfs.js.map +1 -0
  23. package/dist/prompts/create-mod.d.ts.map +1 -1
  24. package/dist/prompts/create-mod.js +151 -139
  25. package/dist/prompts/create-mod.js.map +1 -1
  26. package/dist/prompts/modify-mod.d.ts.map +1 -1
  27. package/dist/prompts/modify-mod.js +72 -70
  28. package/dist/prompts/modify-mod.js.map +1 -1
  29. package/dist/resources/class-resource.d.ts.map +1 -1
  30. package/dist/resources/class-resource.js +8 -0
  31. package/dist/resources/class-resource.js.map +1 -1
  32. package/dist/scraper/doxygen-parser.d.ts.map +1 -1
  33. package/dist/scraper/doxygen-parser.js +244 -0
  34. package/dist/scraper/doxygen-parser.js.map +1 -1
  35. package/dist/scraper/writer.d.ts.map +1 -1
  36. package/dist/scraper/writer.js +18 -3
  37. package/dist/scraper/writer.js.map +1 -1
  38. package/dist/server.d.ts.map +1 -1
  39. package/dist/server.js +9 -0
  40. package/dist/server.js.map +1 -1
  41. package/dist/tools/api-search.d.ts.map +1 -1
  42. package/dist/tools/api-search.js +135 -2
  43. package/dist/tools/api-search.js.map +1 -1
  44. package/dist/tools/asset-search.d.ts +4 -0
  45. package/dist/tools/asset-search.d.ts.map +1 -0
  46. package/dist/tools/asset-search.js +180 -0
  47. package/dist/tools/asset-search.js.map +1 -0
  48. package/dist/tools/game-browse.d.ts +4 -0
  49. package/dist/tools/game-browse.d.ts.map +1 -0
  50. package/dist/tools/game-browse.js +178 -0
  51. package/dist/tools/game-browse.js.map +1 -0
  52. package/dist/tools/game-read.d.ts +4 -0
  53. package/dist/tools/game-read.d.ts.map +1 -0
  54. package/dist/tools/game-read.js +138 -0
  55. package/dist/tools/game-read.js.map +1 -0
  56. package/dist/tools/wb-entities.d.ts.map +1 -1
  57. package/dist/tools/wb-entities.js +33 -6
  58. package/dist/tools/wb-entities.js.map +1 -1
  59. package/dist/tools/wiki-search.d.ts.map +1 -1
  60. package/dist/tools/wiki-search.js +2 -1
  61. package/dist/tools/wiki-search.js.map +1 -1
  62. package/dist/tools/workshop-info.d.ts +4 -0
  63. package/dist/tools/workshop-info.d.ts.map +1 -0
  64. package/dist/tools/workshop-info.js +124 -0
  65. package/dist/tools/workshop-info.js.map +1 -0
  66. package/dist/workbench/client.d.ts +9 -3
  67. package/dist/workbench/client.d.ts.map +1 -1
  68. package/dist/workbench/client.js +27 -16
  69. package/dist/workbench/client.js.map +1 -1
  70. package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_ModifyEntity.c +472 -295
  71. package/package.json +58 -58
package/README.md CHANGED
@@ -1,188 +1,194 @@
1
- # enfusion-mcp
2
-
3
- MCP server for Arma Reforger modding. Describe what you want to build, and Claude handles everything — API research, code generation, project scaffolding, Workbench control, and in-editor testing. Zero modding experience required.
4
-
5
- ## Install
6
-
7
- ### Claude Code (Windows)
8
-
9
- ```bash
10
- claude mcp add --scope user enfusion-mcp -- cmd /c npx -y enfusion-mcp
11
- ```
12
-
13
- ### Claude Code (macOS / Linux)
14
-
15
- ```bash
16
- claude mcp add --scope user enfusion-mcp -- npx -y enfusion-mcp
17
- ```
18
-
19
- Restart Claude Code. Verify with `/mcp`.
20
-
21
- ### Claude Desktop
22
-
23
- Add to your `claude_desktop_config.json`:
24
-
25
- **Windows:**
26
-
27
- ```json
28
- {
29
- "mcpServers": {
30
- "enfusion-mcp": {
31
- "command": "cmd",
32
- "args": ["/c", "npx", "-y", "enfusion-mcp"]
33
- }
34
- }
35
- }
36
- ```
37
-
38
- **macOS / Linux:**
39
-
40
- ```json
41
- {
42
- "mcpServers": {
43
- "enfusion-mcp": {
44
- "command": "npx",
45
- "args": ["-y", "enfusion-mcp"]
46
- }
47
- }
48
- }
49
- ```
50
-
51
- ### Workbench Plugin
52
-
53
- The live Workbench tools (`wb_*`) require handler scripts running inside Workbench. These ship with the package in `mod/Scripts/WorkbenchGame/EnfusionMCP/` and are installed automatically when Claude launches Workbench via `wb_launch`.
54
-
55
- ## Usage
56
-
57
- Just ask Claude to make a mod:
58
-
59
- - *"Create a HUD widget that shows player health and stamina"*
60
- - *"Make a zombie survival game mode with wave spawning"*
61
- - *"Create a custom faction called CSAT with desert camo soldiers"*
62
- - *"Add an interactive object that heals the player when used"*
63
- - *"Override the damage system to add armor mechanics"*
64
-
65
- Or use the guided prompts for structured workflows:
66
-
67
- | Prompt | Description |
68
- |--------|-------------|
69
- | `/create-mod` | Full guided mod creation — from idea to built addon |
70
- | `/modify-mod` | Modify or extend an existing mod project |
71
-
72
- Claude will:
73
-
74
- 1. **Assess complexity** — simple mods are built in one pass; large mods (e.g., a DayZ-style overhaul) get broken into phases with a plan you approve before any code is written
75
- 2. **Research** the Enfusion API (8,693 indexed classes) and the Arma Reforger wiki (250+ guides and tutorials) to find the right approach
76
- 3. **Scaffold** the full addon `.gproj`, scripts, prefabs, configs, UI layouts
77
- 4. **Launch Workbench** if it's not already running
78
- 5. **Load the project**, reload scripts, register resources
79
- 6. **Validate and build** the addon
80
- 7. **Enter play mode** so you can test in-game
81
-
82
- For complex mods, a `MODPLAN.md` is written to the project root tracking the full vision, completed phases, and what's next — so any future session can pick up right where the last one left off via `/modify-mod`.
83
-
84
- ## Tools
85
-
86
- ### Offline Tools
87
-
88
- Work without Workbench running — API search, mod scaffolding, code generation, validation, and building.
89
-
90
- | Tool | What it does |
91
- |------|-------------|
92
- | `api_search` | Search 8,693 Enfusion/Arma Reforger API classes and methods |
93
- | `wiki_search` | Search 250+ tutorials and guides from the Enfusion engine docs and BI Community Wiki |
94
- | `project_browse` | List files in a mod project directory |
95
- | `project_read` | Read any project file |
96
- | `project_write` | Write or update project files |
97
- | `mod_create` | Scaffold a complete addon with directory structure and `.gproj` |
98
- | `script_create` | Generate Enforce Script (`.c`) files 7 types: component, gamemode, action, entity, manager, modded, basic |
99
- | `prefab_create` | Generate Entity Template (`.et`) prefabs 7 types: character, vehicle, weapon, spawnpoint, gamemode, interactive, generic |
100
- | `layout_create` | Generate UI layout (`.layout`) files — 5 types: hud, menu, dialog, list, custom |
101
- | `config_create` | Generate config files factions, missions, entity catalogs, editor placeables |
102
- | `server_config` | Generate dedicated server config for local testing |
103
- | `mod_validate` | Validate project structure, scripts, prefabs, configs, and naming |
104
- | `mod_build` | Build the addon using the Workbench CLI |
105
-
106
- ### Live Workbench Tools
107
-
108
- Control a running Workbench instance over TCP. Requires the handler scripts installed (see setup above).
109
-
110
- | Tool | What it does |
111
- |------|-------------|
112
- | `wb_launch` | Start Workbench if not running, wait for NET API |
113
- | `wb_connect` | Test connection to Workbench |
114
- | `wb_state` | Full state snapshot — mode, world, entity count, selection |
115
- | `wb_play` | Switch to game mode (Play in Editor) |
116
- | `wb_stop` | Return to edit mode |
117
- | `wb_save` | Save the current world |
118
- | `wb_undo_redo` | Undo or redo the last action |
119
- | `wb_open_resource` | Open a resource in its editor |
120
- | `wb_reload` | Reload scripts or plugins without restarting |
121
- | `wb_execute_action` | Run any Workbench menu action by path |
122
- | `wb_entity_create` | Create entity from prefab at a position |
123
- | `wb_entity_delete` | Delete entity by name |
124
- | `wb_entity_list` | List and search entities in the world |
125
- | `wb_entity_inspect` | Get entity details properties, components, children |
126
- | `wb_entity_modify` | Move, rotate, rename, reparent, set properties |
127
- | `wb_entity_select` | Select, deselect, clear, get current selection |
128
- | `wb_component` | Add, remove, list entity components |
129
- | `wb_terrain` | Query terrain height and world bounds |
130
- | `wb_layers` | Create, delete, rename layers, set visibility/active |
131
- | `wb_resources` | Register resources, rebuild database |
132
- | `wb_prefabs` | Create templates, save, GUID lookup |
133
- | `wb_clipboard` | Copy, cut, paste, duplicate entities |
134
- | `wb_script_editor` | Read/write lines in the open script file |
135
- | `wb_localization` | String table CRUD for localization |
136
- | `wb_projects` | List loaded projects, open `.gproj` files |
137
- | `wb_validate` | Material and texture validation |
138
-
139
- ### Mod Patterns
140
-
141
- 10 built-in templates for `mod_create`:
142
-
143
- `game-mode` `custom-faction` `custom-action` `spawn-system` `custom-component` `modded-behavior` `admin-tool` `custom-vehicle` `weapon-reskin` `hud-widget`
144
-
145
- ### MCP Resources
146
-
147
- | URI | Description |
148
- |-----|-------------|
149
- | `enfusion://class/{className}` | Full class docs with inheritance, methods, ancestors/descendants |
150
- | `enfusion://pattern/{patternName}` | Mod pattern definition with all templates |
151
- | `enfusion://group/{groupName}` | API group with class list |
152
-
153
- ## Configuration
154
-
155
- All optional. Sensible defaults are used when nothing is set.
156
-
157
- | Environment Variable | Description | Default |
158
- |---------------------|-------------|---------|
159
- | `ENFUSION_PROJECT_PATH` | Default mod output directory | `~/Documents/My Games/ArmaReforgerWorkbench/addons` |
160
- | `ENFUSION_WORKBENCH_PATH` | Path to Arma Reforger Tools | `C:\Program Files (x86)\Steam\steamapps\common\Arma Reforger Tools` |
161
- | `ENFUSION_WORKBENCH_HOST` | NET API host | `127.0.0.1` |
162
- | `ENFUSION_WORKBENCH_PORT` | NET API port | `5775` |
163
-
164
- Config can also be loaded from `~/.enfusion-mcp/config.json`. Environment variables take priority.
165
-
166
- ## Requirements
167
-
168
- - **Node.js 20+**
169
- - **Arma Reforger Tools** (Steam) — needed for `mod_build` and all `wb_*` tools
170
-
171
- ## Development
172
-
173
- ```bash
174
- git clone https://github.com/Articulated7/enfusion-mcp.git
175
- cd enfusion-mcp
176
- npm install
177
- npm run scrape # Build API index from Workbench docs
178
- npm run build
179
- npm test # 163 tests
180
- ```
181
-
182
- ## Documentation
183
-
184
- Full documentation is on the [GitHub Wiki](https://github.com/Articulated7/enfusion-mcp/wiki).
185
-
186
- ## License
187
-
188
- MIT
1
+ # enfusion-mcp
2
+
3
+ MCP server for Arma Reforger modding. Describe what you want to build, and Claude handles everything — API research, code generation, project scaffolding, Workbench control, and in-editor testing. Zero modding experience required.
4
+
5
+ ## Install
6
+
7
+ ### Claude Code (Windows)
8
+
9
+ ```bash
10
+ claude mcp add --scope user enfusion-mcp -- cmd /c npx -y enfusion-mcp
11
+ ```
12
+
13
+ ### Claude Code (macOS / Linux)
14
+
15
+ ```bash
16
+ claude mcp add --scope user enfusion-mcp -- npx -y enfusion-mcp
17
+ ```
18
+
19
+ Restart Claude Code. Verify with `/mcp`.
20
+
21
+ ### Claude Desktop
22
+
23
+ Add to your `claude_desktop_config.json`:
24
+
25
+ **Windows:**
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "enfusion-mcp": {
31
+ "command": "cmd",
32
+ "args": ["/c", "npx", "-y", "enfusion-mcp"]
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ **macOS / Linux:**
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "enfusion-mcp": {
44
+ "command": "npx",
45
+ "args": ["-y", "enfusion-mcp"]
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ Restart Claude Desktop. Verify with `/mcp`.
52
+
53
+ ### Workbench Plugin
54
+
55
+ The live Workbench tools (`wb_*`) require handler scripts running inside Workbench. These ship with the package in `mod/Scripts/WorkbenchGame/EnfusionMCP/` and are installed automatically when Claude launches Workbench via `wb_launch`.
56
+
57
+ ## Usage
58
+
59
+ Just ask Claude to make a mod:
60
+
61
+ - *"Create a HUD widget that shows player health and stamina"*
62
+ - *"Make a zombie survival game mode with wave spawning"*
63
+ - *"Create a custom faction called CSAT with desert camo soldiers"*
64
+ - *"Add an interactive object that heals the player when used"*
65
+ - *"Override the damage system to add armor mechanics"*
66
+
67
+ Or use the guided prompts for structured workflows:
68
+
69
+ | Prompt | Description |
70
+ |--------|-------------|
71
+ | `/create-mod` | Full guided mod creation — from idea to built addon |
72
+ | `/modify-mod` | Modify or extend an existing mod project |
73
+
74
+ Claude will:
75
+
76
+ 1. **Assess complexity** simple mods are built in one pass; large mods (e.g., a DayZ-style overhaul) get broken into phases with a plan you approve before any code is written
77
+ 2. **Research** the Enfusion API (8,693 indexed classes), the Arma Reforger wiki (250+ guides), and base game assets (read directly from `.pak` archives) to find the right approach
78
+ 3. **Scaffold** the full addon — `.gproj`, scripts, prefabs, configs, UI layouts
79
+ 4. **Launch Workbench** if it's not already running
80
+ 5. **Load the project**, reload scripts, register resources
81
+ 6. **Validate and build** the addon
82
+ 7. **Enter play mode** so you can test in-game
83
+
84
+ For complex mods, a `MODPLAN.md` is written to the project root tracking the full vision, completed phases, and what's next — so any future session can pick up right where the last one left off via `/modify-mod`.
85
+
86
+ ## Tools
87
+
88
+ ### Offline Tools
89
+
90
+ Work without Workbench running API search, mod scaffolding, code generation, validation, and building.
91
+
92
+ | Tool | What it does |
93
+ |------|-------------|
94
+ | `api_search` | Search 8,693 Enfusion/Arma Reforger API classes and methods |
95
+ | `wiki_search` | Search 250+ tutorials and guides from the Enfusion engine docs and BI Community Wiki |
96
+ | `game_browse` | Browse base game files — loose files and `.pak` archives transparently |
97
+ | `game_read` | Read base game files scripts, prefabs, configs from loose files or `.pak` |
98
+ | `asset_search` | Search game assets by name across loose files and `.pak` archives |
99
+ | `project_browse` | List files in a mod project directory |
100
+ | `project_read` | Read any project file |
101
+ | `project_write` | Write or update project files |
102
+ | `mod_create` | Scaffold a complete addon with directory structure and `.gproj` |
103
+ | `script_create` | Generate Enforce Script (`.c`) files — 7 types: component, gamemode, action, entity, manager, modded, basic |
104
+ | `prefab_create` | Generate Entity Template (`.et`) prefabs 7 types: character, vehicle, weapon, spawnpoint, gamemode, interactive, generic |
105
+ | `layout_create` | Generate UI layout (`.layout`) files — 5 types: hud, menu, dialog, list, custom |
106
+ | `config_create` | Generate config files — factions, missions, entity catalogs, editor placeables |
107
+ | `server_config` | Generate dedicated server config for local testing |
108
+ | `mod_validate` | Validate project structure, scripts, prefabs, configs, and naming |
109
+ | `mod_build` | Build the addon using the Workbench CLI |
110
+
111
+ ### Live Workbench Tools
112
+
113
+ Control a running Workbench instance over TCP. Requires the handler scripts installed (see setup above).
114
+
115
+ | Tool | What it does |
116
+ |------|-------------|
117
+ | `wb_launch` | Start Workbench if not running, wait for NET API |
118
+ | `wb_connect` | Test connection to Workbench |
119
+ | `wb_state` | Full state snapshot mode, world, entity count, selection |
120
+ | `wb_play` | Switch to game mode (Play in Editor) |
121
+ | `wb_stop` | Return to edit mode |
122
+ | `wb_save` | Save the current world |
123
+ | `wb_undo_redo` | Undo or redo the last action |
124
+ | `wb_open_resource` | Open a resource in its editor |
125
+ | `wb_reload` | Reload scripts or plugins without restarting |
126
+ | `wb_execute_action` | Run any Workbench menu action by path |
127
+ | `wb_entity_create` | Create entity from prefab at a position |
128
+ | `wb_entity_delete` | Delete entity by name |
129
+ | `wb_entity_list` | List and search entities in the world |
130
+ | `wb_entity_inspect` | Get entity details — properties, components, children |
131
+ | `wb_entity_modify` | Move, rotate, rename, reparent, set/clear/get/list properties |
132
+ | `wb_entity_select` | Select, deselect, clear, get current selection |
133
+ | `wb_component` | Add, remove, list entity components |
134
+ | `wb_terrain` | Query terrain height and world bounds |
135
+ | `wb_layers` | Create, delete, rename layers, set visibility/active |
136
+ | `wb_resources` | Register resources, rebuild database |
137
+ | `wb_prefabs` | Create templates, save, GUID lookup |
138
+ | `wb_clipboard` | Copy, cut, paste, duplicate entities |
139
+ | `wb_script_editor` | Read/write lines in the open script file |
140
+ | `wb_localization` | String table CRUD for localization |
141
+ | `wb_projects` | List loaded projects, open `.gproj` files |
142
+ | `wb_validate` | Material and texture validation |
143
+
144
+ ### Mod Patterns
145
+
146
+ 10 built-in templates for `mod_create`:
147
+
148
+ `game-mode` `custom-faction` `custom-action` `spawn-system` `custom-component` `modded-behavior` `admin-tool` `custom-vehicle` `weapon-reskin` `hud-widget`
149
+
150
+ ### MCP Resources
151
+
152
+ | URI | Description |
153
+ |-----|-------------|
154
+ | `enfusion://class/{className}` | Full class docs with inheritance, methods, ancestors/descendants |
155
+ | `enfusion://pattern/{patternName}` | Mod pattern definition with all templates |
156
+ | `enfusion://group/{groupName}` | API group with class list |
157
+
158
+ ## Configuration
159
+
160
+ All optional. Sensible defaults are used when nothing is set.
161
+
162
+ | Environment Variable | Description | Default |
163
+ |---------------------|-------------|---------|
164
+ | `ENFUSION_PROJECT_PATH` | Default mod output directory | `~/Documents/My Games/ArmaReforgerWorkbench/addons` |
165
+ | `ENFUSION_WORKBENCH_PATH` | Path to Arma Reforger Tools | `C:\Program Files (x86)\Steam\steamapps\common\Arma Reforger Tools` |
166
+ | `ENFUSION_GAME_PATH` | Path to the Arma Reforger game install (used as CWD when launching Workbench so base-game addons resolve correctly) | Auto-detected from sibling of `ENFUSION_WORKBENCH_PATH` |
167
+ | `ENFUSION_WORKBENCH_HOST` | NET API host | `127.0.0.1` |
168
+ | `ENFUSION_WORKBENCH_PORT` | NET API port | `5775` |
169
+
170
+ Config can also be loaded from `~/.enfusion-mcp/config.json`. Environment variables take priority.
171
+
172
+ ## Requirements
173
+
174
+ - **Node.js 20+**
175
+ - **Arma Reforger Tools** (Steam) — needed for `mod_build` and all `wb_*` tools
176
+
177
+ ## Development
178
+
179
+ ```bash
180
+ git clone https://github.com/Articulated7/enfusion-mcp.git
181
+ cd enfusion-mcp
182
+ npm install
183
+ npm run scrape # Build API index from Workbench docs
184
+ npm run build
185
+ npm test # 187 tests
186
+ ```
187
+
188
+ ## Documentation
189
+
190
+ Full documentation is on the [GitHub Wiki](https://github.com/Articulated7/enfusion-mcp/wiki).
191
+
192
+ ## License
193
+
194
+ MIT