enfusion-mcp 0.2.2 → 0.3.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.
- package/README.md +90 -243
- package/dist/index.js +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/mod-build.js +8 -8
- package/dist/tools/mod-build.js.map +1 -1
- package/dist/tools/wb-clipboard.js +1 -1
- package/dist/tools/wb-clipboard.js.map +1 -1
- package/dist/tools/wb-components.js +1 -1
- package/dist/tools/wb-components.js.map +1 -1
- package/dist/tools/wb-connect.d.ts.map +1 -1
- package/dist/tools/wb-connect.js +6 -10
- package/dist/tools/wb-connect.js.map +1 -1
- package/dist/tools/wb-editor.js +5 -5
- package/dist/tools/wb-editor.js.map +1 -1
- package/dist/tools/wb-entities.js +6 -6
- package/dist/tools/wb-entities.js.map +1 -1
- package/dist/tools/wb-execute-action.js +1 -1
- package/dist/tools/wb-execute-action.js.map +1 -1
- package/dist/tools/wb-launch.d.ts +1 -2
- package/dist/tools/wb-launch.d.ts.map +1 -1
- package/dist/tools/wb-launch.js +18 -90
- package/dist/tools/wb-launch.js.map +1 -1
- package/dist/tools/wb-layers.js +1 -1
- package/dist/tools/wb-layers.js.map +1 -1
- package/dist/tools/wb-localization.js +1 -1
- package/dist/tools/wb-localization.js.map +1 -1
- package/dist/tools/wb-prefabs.js +2 -2
- package/dist/tools/wb-prefabs.js.map +1 -1
- package/dist/tools/wb-projects.js +1 -1
- package/dist/tools/wb-projects.js.map +1 -1
- package/dist/tools/wb-resources.js +2 -2
- package/dist/tools/wb-resources.js.map +1 -1
- package/dist/tools/wb-script-editor.d.ts.map +1 -1
- package/dist/tools/wb-script-editor.js +28 -2
- package/dist/tools/wb-script-editor.js.map +1 -1
- package/dist/tools/wb-state.d.ts.map +1 -1
- package/dist/tools/wb-state.js +17 -50
- package/dist/tools/wb-state.js.map +1 -1
- package/dist/tools/wb-terrain.js +1 -1
- package/dist/tools/wb-terrain.js.map +1 -1
- package/dist/workbench/client.d.ts +29 -12
- package/dist/workbench/client.d.ts.map +1 -1
- package/dist/workbench/client.js +160 -34
- package/dist/workbench/client.js.map +1 -1
- package/dist/workbench/protocol.js +1 -1
- package/dist/workbench/protocol.js.map +1 -1
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Clipboard.c +126 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Components.c +229 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_CreateEntity.c +146 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_DeleteEntity.c +117 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_EditorControl.c +141 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_ExecuteAction.c +93 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_GetEntity.c +212 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_GetState.c +130 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Layers.c +183 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_ListEntities.c +163 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Localization.c +186 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_ModifyEntity.c +295 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Ping.c +66 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Prefabs.c +185 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Resources.c +100 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_ScriptEditor.c +151 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_SelectEntity.c +200 -0
- package/mod/Scripts/WorkbenchGame/EnfusionMCP/EMCP_WB_Terrain.c +106 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,312 +1,159 @@
|
|
|
1
1
|
# enfusion-mcp
|
|
2
2
|
|
|
3
|
-
MCP server
|
|
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
4
|
|
|
5
|
-
|
|
6
|
-
Claude ←→ MCP (stdio) ←→ TCP ←→ Workbench NET API (port 5775)
|
|
7
|
-
↓
|
|
8
|
-
NetApiHandler scripts
|
|
9
|
-
(WorldEditorAPI, ScriptEditor,
|
|
10
|
-
ResourceManager, etc.)
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
39 tools: 14 offline (API search, scaffolding, validation, build) + 25 live Workbench control over TCP.
|
|
14
|
-
3 guided prompts. 3 MCP resources. 10 mod patterns.
|
|
5
|
+
## Install
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### 1. Connect to Claude Code
|
|
7
|
+
### Claude Code
|
|
19
8
|
|
|
20
9
|
```bash
|
|
21
10
|
claude mcp add --scope user enfusion-mcp -- npx -y enfusion-mcp
|
|
22
11
|
```
|
|
23
12
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
claude mcp add --scope user -e ENFUSION_PROJECT_PATH=/path/to/your/mod enfusion-mcp -- npx -y enfusion-mcp
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Restart Claude Code or start a new session. Verify with `/mcp`.
|
|
31
|
-
|
|
32
|
-
### 2. Enable Workbench NET API
|
|
33
|
-
|
|
34
|
-
Open Arma Reforger Tools → **File → Options → General → Net API** → check **Enabled**. Default port: **5775**.
|
|
35
|
-
|
|
36
|
-
Or let Claude do it — the `wb_launch` tool can start Workbench for you.
|
|
37
|
-
|
|
38
|
-
### 3. Install the Workbench handler scripts
|
|
39
|
-
|
|
40
|
-
Copy the `CC_WB_*.c` handler scripts into your mod's `Scripts/WorkbenchGame/` directory. These are the Workbench-side handlers that expose editor internals to the MCP.
|
|
41
|
-
|
|
42
|
-
Handler scripts are in [`mod/Scripts/WorkbenchGame/ClaudeCommander/`](mod/Scripts/WorkbenchGame/ClaudeCommander/) (18 files). Restart Workbench or **Tools → Reload Scripts** after copying.
|
|
13
|
+
Restart Claude Code. Verify with `/mcp`.
|
|
43
14
|
|
|
44
15
|
### Claude Desktop
|
|
45
16
|
|
|
17
|
+
Add to your `claude_desktop_config.json`:
|
|
18
|
+
|
|
46
19
|
```json
|
|
47
20
|
{
|
|
48
21
|
"mcpServers": {
|
|
49
22
|
"enfusion-mcp": {
|
|
50
23
|
"command": "npx",
|
|
51
|
-
"args": ["-y", "enfusion-mcp"]
|
|
52
|
-
"env": {
|
|
53
|
-
"ENFUSION_PROJECT_PATH": "C:\\path\\to\\your\\mod"
|
|
54
|
-
}
|
|
24
|
+
"args": ["-y", "enfusion-mcp"]
|
|
55
25
|
}
|
|
56
26
|
}
|
|
57
27
|
}
|
|
58
28
|
```
|
|
59
29
|
|
|
60
|
-
###
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
git clone https://github.com/Articulated7/enfusion-mcp.git
|
|
64
|
-
cd enfusion-mcp
|
|
65
|
-
npm install
|
|
66
|
-
npm run scrape # Build API index from Workbench docs
|
|
67
|
-
npm run build
|
|
68
|
-
```
|
|
30
|
+
### Workbench Plugin
|
|
69
31
|
|
|
70
|
-
|
|
32
|
+
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`.
|
|
71
33
|
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
"mcpServers": {
|
|
75
|
-
"enfusion-mcp": {
|
|
76
|
-
"command": "node",
|
|
77
|
-
"args": ["C:\\path\\to\\enfusion-mcp\\dist\\index.js"]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
34
|
+
## Usage
|
|
82
35
|
|
|
83
|
-
|
|
36
|
+
Just ask Claude to make a mod:
|
|
84
37
|
|
|
85
|
-
|
|
38
|
+
- *"Create a HUD widget that shows player health and stamina"*
|
|
39
|
+
- *"Make a zombie survival game mode with wave spawning"*
|
|
40
|
+
- *"Create a custom faction called CSAT with desert camo soldiers"*
|
|
41
|
+
- *"Add an interactive object that heals the player when used"*
|
|
42
|
+
- *"Override the damage system to add armor mechanics"*
|
|
86
43
|
|
|
87
|
-
|
|
88
|
-
2. **Scaffold** — Creates the full addon directory, `.gproj`, scripts, prefabs, configs, and UI layouts
|
|
89
|
-
3. **Launch** — Starts Workbench if needed, loads the project, registers resources
|
|
90
|
-
4. **Compile** — Reloads scripts, reports and fixes any compilation errors
|
|
91
|
-
5. **Test** — Enters play mode so you can verify in-game
|
|
44
|
+
Or use the guided prompts for structured workflows:
|
|
92
45
|
|
|
93
|
-
|
|
46
|
+
| Prompt | Description |
|
|
47
|
+
|--------|-------------|
|
|
48
|
+
| `/create-mod` | Full guided mod creation — from idea to built addon |
|
|
49
|
+
| `/modify-mod` | Modify or extend an existing mod project |
|
|
94
50
|
|
|
95
|
-
|
|
51
|
+
Claude will:
|
|
96
52
|
|
|
97
|
-
|
|
53
|
+
1. **Research** the Enfusion API (8,693 indexed classes) to find the right parent classes and methods
|
|
54
|
+
2. **Scaffold** the full addon — `.gproj`, scripts, prefabs, configs, UI layouts
|
|
55
|
+
3. **Launch Workbench** if it's not already running
|
|
56
|
+
4. **Load the project**, reload scripts, register resources
|
|
57
|
+
5. **Validate and build** the addon
|
|
58
|
+
6. **Enter play mode** so you can test in-game
|
|
98
59
|
|
|
99
|
-
|
|
100
|
-
|--------|-------------|
|
|
101
|
-
| `/create-mod` | Full mod creation — API research, pattern selection, scaffold, scripts, prefabs, configs, layouts, Workbench integration, and testing |
|
|
102
|
-
| `/add-script` | Create a new Enforce Script with the right type, parent class, and method stubs, then compile in Workbench |
|
|
103
|
-
| `/add-prefab` | Create a new Entity Template with the right components, then register and open in Workbench |
|
|
60
|
+
## Tools
|
|
104
61
|
|
|
105
|
-
|
|
62
|
+
### Offline Tools
|
|
106
63
|
|
|
107
|
-
|
|
64
|
+
Work without Workbench running — API search, mod scaffolding, code generation, validation, and building.
|
|
108
65
|
|
|
109
66
|
| Tool | What it does |
|
|
110
67
|
|------|-------------|
|
|
111
68
|
| `api_search` | Search 8,693 Enfusion/Arma Reforger API classes and methods |
|
|
112
|
-
| `wiki_search` | Search tutorial and guide content |
|
|
113
|
-
| `project_browse` | List files in a
|
|
114
|
-
| `project_read` | Read project
|
|
115
|
-
| `project_write` | Write
|
|
116
|
-
| `mod_create` | Scaffold a complete addon
|
|
117
|
-
| `script_create` | Generate Enforce Script (
|
|
118
|
-
| `prefab_create` | Generate Entity Template (
|
|
119
|
-
| `layout_create` | Generate UI layout (
|
|
120
|
-
| `config_create` | Generate config files
|
|
69
|
+
| `wiki_search` | Search tutorial and guide content about Enfusion concepts |
|
|
70
|
+
| `project_browse` | List files in a mod project directory |
|
|
71
|
+
| `project_read` | Read any project file |
|
|
72
|
+
| `project_write` | Write or update project files |
|
|
73
|
+
| `mod_create` | Scaffold a complete addon with directory structure and `.gproj` |
|
|
74
|
+
| `script_create` | Generate Enforce Script (`.c`) files — 7 types: component, gamemode, action, entity, manager, modded, basic |
|
|
75
|
+
| `prefab_create` | Generate Entity Template (`.et`) prefabs — 7 types: character, vehicle, weapon, spawnpoint, gamemode, interactive, generic |
|
|
76
|
+
| `layout_create` | Generate UI layout (`.layout`) files — 5 types: hud, menu, dialog, list, custom |
|
|
77
|
+
| `config_create` | Generate config files — factions, missions, entity catalogs, editor placeables |
|
|
121
78
|
| `server_config` | Generate dedicated server config for local testing |
|
|
122
|
-
| `mod_validate` |
|
|
123
|
-
| `mod_build` | Build addon
|
|
124
|
-
|
|
125
|
-
All creation tools cross-reference the appropriate Workbench tools — after creating a script, Claude knows to call `wb_reload`; after creating a prefab, it knows to call `wb_resources`.
|
|
79
|
+
| `mod_validate` | Validate project structure, scripts, prefabs, configs, and naming |
|
|
80
|
+
| `mod_build` | Build the addon using the Workbench CLI |
|
|
126
81
|
|
|
127
|
-
|
|
82
|
+
### Live Workbench Tools
|
|
128
83
|
|
|
129
|
-
|
|
84
|
+
Control a running Workbench instance over TCP. Requires the handler scripts installed (see setup above).
|
|
130
85
|
|
|
131
86
|
| Tool | What it does |
|
|
132
87
|
|------|-------------|
|
|
133
|
-
| `wb_launch` |
|
|
134
|
-
| `wb_connect` | Test connection
|
|
135
|
-
| `wb_state` | Full state snapshot — mode, world
|
|
88
|
+
| `wb_launch` | Start Workbench if not running, wait for NET API |
|
|
89
|
+
| `wb_connect` | Test connection to Workbench |
|
|
90
|
+
| `wb_state` | Full state snapshot — mode, world, entity count, selection |
|
|
136
91
|
| `wb_play` | Switch to game mode (Play in Editor) |
|
|
137
|
-
| `wb_stop` |
|
|
92
|
+
| `wb_stop` | Return to edit mode |
|
|
138
93
|
| `wb_save` | Save the current world |
|
|
139
|
-
| `wb_undo_redo` | Undo or redo the last
|
|
140
|
-
| `wb_open_resource` | Open a resource
|
|
141
|
-
| `wb_reload` | Reload scripts or plugins
|
|
142
|
-
| `wb_execute_action` |
|
|
143
|
-
| `wb_entity_create` | Create entity from prefab at position
|
|
94
|
+
| `wb_undo_redo` | Undo or redo the last action |
|
|
95
|
+
| `wb_open_resource` | Open a resource in its editor |
|
|
96
|
+
| `wb_reload` | Reload scripts or plugins without restarting |
|
|
97
|
+
| `wb_execute_action` | Run any Workbench menu action by path |
|
|
98
|
+
| `wb_entity_create` | Create entity from prefab at a position |
|
|
144
99
|
| `wb_entity_delete` | Delete entity by name |
|
|
145
|
-
| `wb_entity_list` | List
|
|
100
|
+
| `wb_entity_list` | List and search entities in the world |
|
|
146
101
|
| `wb_entity_inspect` | Get entity details — properties, components, children |
|
|
147
|
-
| `wb_entity_modify` | Move, rotate, rename, reparent, set
|
|
148
|
-
| `wb_entity_select` | Select, deselect, clear
|
|
102
|
+
| `wb_entity_modify` | Move, rotate, rename, reparent, set properties |
|
|
103
|
+
| `wb_entity_select` | Select, deselect, clear, get current selection |
|
|
149
104
|
| `wb_component` | Add, remove, list entity components |
|
|
150
|
-
| `wb_terrain` | Query terrain height
|
|
151
|
-
| `wb_layers` | Create, delete, rename layers, set visibility/
|
|
152
|
-
| `wb_resources` | Register, rebuild
|
|
153
|
-
| `wb_prefabs` | Create
|
|
154
|
-
| `wb_clipboard` | Copy, cut, paste,
|
|
155
|
-
| `wb_script_editor` | Read/write
|
|
156
|
-
| `wb_localization` | String table CRUD
|
|
157
|
-
| `wb_projects` | List loaded projects,
|
|
105
|
+
| `wb_terrain` | Query terrain height and world bounds |
|
|
106
|
+
| `wb_layers` | Create, delete, rename layers, set visibility/active |
|
|
107
|
+
| `wb_resources` | Register resources, rebuild database |
|
|
108
|
+
| `wb_prefabs` | Create templates, save, GUID lookup |
|
|
109
|
+
| `wb_clipboard` | Copy, cut, paste, duplicate entities |
|
|
110
|
+
| `wb_script_editor` | Read/write lines in the open script file |
|
|
111
|
+
| `wb_localization` | String table CRUD for localization |
|
|
112
|
+
| `wb_projects` | List loaded projects, open `.gproj` files |
|
|
158
113
|
| `wb_validate` | Material and texture validation |
|
|
159
114
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
| URI | Description |
|
|
163
|
-
|-----|-------------|
|
|
164
|
-
| `enfusion://class/{className}` | Full class docs with inheritance tree, methods, ancestors/descendants |
|
|
165
|
-
| `enfusion://pattern/{patternName}` | Mod pattern definition with scripts, prefabs, and config templates |
|
|
166
|
-
| `enfusion://group/{groupName}` | API group with class list and count |
|
|
167
|
-
|
|
168
|
-
## Example Usage
|
|
169
|
-
|
|
170
|
-
**Create a mod from scratch:**
|
|
171
|
-
- *"Create a HUD widget that shows player health"*
|
|
172
|
-
- *"Make a zombie survival game mode with wave spawning"*
|
|
173
|
-
- *"Create a custom faction called CSAT with desert camo soldiers"*
|
|
174
|
-
|
|
175
|
-
**Work with a running Workbench:**
|
|
176
|
-
- *"Launch Workbench and open my mod project"*
|
|
177
|
-
- *"Create a soldier at position 6400 0 6400 using the US rifleman prefab"*
|
|
178
|
-
- *"Get the terrain height at 3200, 4800"*
|
|
179
|
-
- *"Switch to play mode and test"*
|
|
180
|
-
- *"Show me all the layers in this world"*
|
|
181
|
-
|
|
182
|
-
**Research the API:**
|
|
183
|
-
- *"Search the API for SCR_BaseGameMode"*
|
|
184
|
-
- *"How does DamageManagerComponent work?"*
|
|
185
|
-
- *"Find all classes related to inventory"*
|
|
186
|
-
|
|
187
|
-
## Mod Patterns
|
|
115
|
+
### Mod Patterns
|
|
188
116
|
|
|
189
117
|
10 built-in templates for `mod_create`:
|
|
190
118
|
|
|
191
|
-
|
|
192
|
-
|---------|-------------|
|
|
193
|
-
| `game-mode` | Custom game mode with scoring and win conditions |
|
|
194
|
-
| `custom-faction` | New faction with characters and loadouts |
|
|
195
|
-
| `custom-action` | Interactive objects with UserAction |
|
|
196
|
-
| `spawn-system` | Custom spawn manager with spawn points |
|
|
197
|
-
| `custom-component` | Reusable ScriptComponent |
|
|
198
|
-
| `modded-behavior` | Override existing class behavior |
|
|
199
|
-
| `admin-tool` | Keybind-triggered admin commands |
|
|
200
|
-
| `custom-vehicle` | New vehicle variant |
|
|
201
|
-
| `weapon-reskin` | Modded weapon properties |
|
|
202
|
-
| `hud-widget` | Custom HUD element |
|
|
203
|
-
|
|
204
|
-
## NetApiHandler Scripts
|
|
205
|
-
|
|
206
|
-
The live tools require custom Enforce Script handlers running inside Workbench. Each handler is a class extending `NetApiHandler` with a `Request` and `Response` pair extending `JsonApiStruct`.
|
|
207
|
-
|
|
208
|
-
**Location:** `Scripts/WorkbenchGame/ClaudeCommander/`
|
|
209
|
-
**Important:** Must be in `WorkbenchGame`, not `Game` — the `NetApiHandler` base class only exists in the WorkbenchGame script module.
|
|
210
|
-
|
|
211
|
-
| Handler | Actions |
|
|
212
|
-
|---------|---------|
|
|
213
|
-
| `CC_WB_Ping` | Health check, returns editor mode |
|
|
214
|
-
| `CC_WB_GetState` | Full state snapshot |
|
|
215
|
-
| `CC_WB_EditorControl` | play, stop, save, saveAs, undo, redo, openResource |
|
|
216
|
-
| `CC_WB_ExecuteAction` | Execute menu actions by path |
|
|
217
|
-
| `CC_WB_ListEntities` | Paginated entity list with name filter |
|
|
218
|
-
| `CC_WB_GetEntity` | Entity details by name or index |
|
|
219
|
-
| `CC_WB_CreateEntity` | Create entity from prefab resource path |
|
|
220
|
-
| `CC_WB_DeleteEntity` | Delete entity by name |
|
|
221
|
-
| `CC_WB_ModifyEntity` | move, rotate, rename, setProperty, clearProperty |
|
|
222
|
-
| `CC_WB_SelectEntity` | select, deselect, clear, getSelected |
|
|
223
|
-
| `CC_WB_Components` | add, remove, list components |
|
|
224
|
-
| `CC_WB_Terrain` | getHeight, getBounds |
|
|
225
|
-
| `CC_WB_Layers` | list, create, delete, rename, setActive, setVisibility, lock, unlock |
|
|
226
|
-
| `CC_WB_Resources` | register, rebuild, getInfo, open |
|
|
227
|
-
| `CC_WB_Prefabs` | createTemplate, save, getGuid, locate |
|
|
228
|
-
| `CC_WB_Clipboard` | copy, cut, paste, pasteAtCursor, duplicate, hasCopied |
|
|
229
|
-
| `CC_WB_ScriptEditor` | getCurrentFile, getLine, setLine, insertLine, removeLine, getLinesCount, openFile |
|
|
230
|
-
| `CC_WB_Localization` | insert, delete, modify, getTable |
|
|
231
|
-
|
|
232
|
-
## Wire Protocol
|
|
233
|
-
|
|
234
|
-
The Workbench NET API uses a binary TCP protocol. Each call opens a new TCP connection.
|
|
235
|
-
|
|
236
|
-
**Request format:**
|
|
237
|
-
```
|
|
238
|
-
[int32LE protocolVersion=1]
|
|
239
|
-
[pascalString clientId]
|
|
240
|
-
[pascalString contentType="JsonRPC"]
|
|
241
|
-
[pascalString payload (JSON with "APIFunc": "HandlerClassName", ...params)]
|
|
242
|
-
```
|
|
119
|
+
`game-mode` `custom-faction` `custom-action` `spawn-system` `custom-component` `modded-behavior` `admin-tool` `custom-vehicle` `weapon-reskin` `hud-widget`
|
|
243
120
|
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
[pascalString status] — "Ok" on success, error message otherwise
|
|
247
|
-
[pascalString payload] — JSON data (present on success, empty on error)
|
|
248
|
-
```
|
|
121
|
+
### MCP Resources
|
|
249
122
|
|
|
250
|
-
|
|
123
|
+
| URI | Description |
|
|
124
|
+
|-----|-------------|
|
|
125
|
+
| `enfusion://class/{className}` | Full class docs with inheritance, methods, ancestors/descendants |
|
|
126
|
+
| `enfusion://pattern/{patternName}` | Mod pattern definition with all templates |
|
|
127
|
+
| `enfusion://group/{groupName}` | API group with class list |
|
|
251
128
|
|
|
252
129
|
## Configuration
|
|
253
130
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
|
257
|
-
|
|
131
|
+
All optional. Sensible defaults are used when nothing is set.
|
|
132
|
+
|
|
133
|
+
| Environment Variable | Description | Default |
|
|
134
|
+
|---------------------|-------------|---------|
|
|
135
|
+
| `ENFUSION_PROJECT_PATH` | Default mod output directory | `~/Documents/My Games/ArmaReforgerWorkbench/addons` |
|
|
136
|
+
| `ENFUSION_WORKBENCH_PATH` | Path to Arma Reforger Tools | `C:\Program Files (x86)\Steam\steamapps\common\Arma Reforger Tools` |
|
|
258
137
|
| `ENFUSION_WORKBENCH_HOST` | NET API host | `127.0.0.1` |
|
|
259
138
|
| `ENFUSION_WORKBENCH_PORT` | NET API port | `5775` |
|
|
260
|
-
| `ENFUSION_MCP_DATA_DIR` | Scraped API data directory | `./data` |
|
|
261
139
|
|
|
262
|
-
Config
|
|
140
|
+
Config can also be loaded from `~/.enfusion-mcp/config.json`. Environment variables take priority.
|
|
263
141
|
|
|
264
|
-
##
|
|
142
|
+
## Requirements
|
|
265
143
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
npm test # Run tests (158 tests)
|
|
269
|
-
npm run test:watch # Watch mode
|
|
270
|
-
npm run dev # Run from source with tsx
|
|
271
|
-
npm run scrape # Rebuild API index
|
|
272
|
-
```
|
|
144
|
+
- **Node.js 20+**
|
|
145
|
+
- **Arma Reforger Tools** (Steam) — needed for `mod_build` and all `wb_*` tools
|
|
273
146
|
|
|
274
|
-
|
|
147
|
+
## Development
|
|
275
148
|
|
|
149
|
+
```bash
|
|
150
|
+
git clone https://github.com/Articulated7/enfusion-mcp.git
|
|
151
|
+
cd enfusion-mcp
|
|
152
|
+
npm install
|
|
153
|
+
npm run scrape # Build API index from Workbench docs
|
|
154
|
+
npm run build
|
|
155
|
+
npm test # 163 tests
|
|
276
156
|
```
|
|
277
|
-
enfusion-mcp/
|
|
278
|
-
src/
|
|
279
|
-
index.ts # Entry point (stdio MCP server)
|
|
280
|
-
server.ts # Tool/prompt/resource registration
|
|
281
|
-
config.ts # Multi-layer config loading
|
|
282
|
-
workbench/
|
|
283
|
-
protocol.ts # NET API TCP wire protocol encoder/decoder
|
|
284
|
-
client.ts # WorkbenchClient — TCP connection manager
|
|
285
|
-
tools/
|
|
286
|
-
wb-launch.ts # Start Workbench executable
|
|
287
|
-
wb-*.ts # 25 live Workbench control tools
|
|
288
|
-
api-search.ts # + 14 offline tools
|
|
289
|
-
layout-create.ts # UI layout generator
|
|
290
|
-
...
|
|
291
|
-
formats/ # Enfusion text serialization parser
|
|
292
|
-
templates/ # Code generators (script, prefab, config, layout)
|
|
293
|
-
index/ # API search engine (8,693 classes)
|
|
294
|
-
patterns/ # Mod pattern library (10 patterns)
|
|
295
|
-
prompts/ # MCP prompt definitions (3 prompts)
|
|
296
|
-
resources/ # MCP resource templates (3 resources)
|
|
297
|
-
data/
|
|
298
|
-
api/ # Scraped class data (~44 MB)
|
|
299
|
-
wiki/ # Tutorial pages
|
|
300
|
-
patterns/ # 10 mod pattern definitions
|
|
301
|
-
tests/ # Vitest test suite (158 tests)
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## Requirements
|
|
305
|
-
|
|
306
|
-
- **Node.js 20+**
|
|
307
|
-
- **Arma Reforger Tools** (Steam) — required for live tools + `mod_build`
|
|
308
|
-
- **NET API enabled** in Workbench options (for live tools)
|
|
309
|
-
- **CC_WB_*.c handler scripts** loaded in Workbench (for live tools)
|
|
310
157
|
|
|
311
158
|
## License
|
|
312
159
|
|
package/dist/index.js
CHANGED
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuCzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuCzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAyDrE"}
|
package/dist/server.js
CHANGED
|
@@ -57,8 +57,8 @@ export function registerTools(server, config) {
|
|
|
57
57
|
registerServerConfig(server, config);
|
|
58
58
|
registerLayoutCreate(server, config);
|
|
59
59
|
// Workbench Live Control tools (Phase 4)
|
|
60
|
-
const wbClient = new WorkbenchClient(config.workbenchHost, config.workbenchPort);
|
|
61
|
-
registerWbLaunch(server,
|
|
60
|
+
const wbClient = new WorkbenchClient(config.workbenchHost, config.workbenchPort, config);
|
|
61
|
+
registerWbLaunch(server, wbClient);
|
|
62
62
|
registerWbConnect(server, wbClient);
|
|
63
63
|
registerWbReload(server, wbClient);
|
|
64
64
|
registerWbEditorTools(server, wbClient);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
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B,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/tools/mod-build.js
CHANGED
|
@@ -5,14 +5,14 @@ import { spawn } from "node:child_process";
|
|
|
5
5
|
const WORKBENCH_DIAG_EXE = "ArmaReforgerWorkbenchSteamDiag.exe";
|
|
6
6
|
const BUILD_TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
7
7
|
function findWorkbenchExe(workbenchPath) {
|
|
8
|
-
//
|
|
9
|
-
const
|
|
10
|
-
if (existsSync(
|
|
11
|
-
return
|
|
12
|
-
//
|
|
13
|
-
const
|
|
14
|
-
if (existsSync(
|
|
15
|
-
return
|
|
8
|
+
// Check Workbench subdirectory first (standard Steam layout: "Arma Reforger Tools/Workbench/")
|
|
9
|
+
const subPath = join(workbenchPath, "Workbench", WORKBENCH_DIAG_EXE);
|
|
10
|
+
if (existsSync(subPath))
|
|
11
|
+
return subPath;
|
|
12
|
+
// Check root (in case config points directly to Workbench/)
|
|
13
|
+
const rootPath = join(workbenchPath, WORKBENCH_DIAG_EXE);
|
|
14
|
+
if (existsSync(rootPath))
|
|
15
|
+
return rootPath;
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
18
|
function runBuild(exePath, args, timeoutMs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod-build.js","sourceRoot":"","sources":["../../src/tools/mod-build.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAChE,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;AAEpD,SAAS,gBAAgB,CAAC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,CAAC;gBAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC;YAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACjE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,EAAE,EAAE,CAAC;aACjE,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -9,7 +9,7 @@ export function registerWbClipboard(server, client) {
|
|
|
9
9
|
},
|
|
10
10
|
}, async ({ action }) => {
|
|
11
11
|
try {
|
|
12
|
-
const result = await client.call("
|
|
12
|
+
const result = await client.call("EMCP_WB_Clipboard", {
|
|
13
13
|
action,
|
|
14
14
|
});
|
|
15
15
|
if (action === "hasCopied") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wb-clipboard.js","sourceRoot":"","sources":["../../src/tools/wb-clipboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAuB;IAC5E,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,WAAW,EACT,8IAA8I;QAChJ,WAAW,EAAE;YACX,MAAM,EAAE,CAAC;iBACN,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;iBACzE,QAAQ,CACP,6LAA6L,CAC9L;SACJ;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YAEF,MAAM,KAAK,GAAG,CAAC,KAAK,YAAY,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC;YACxD,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS;gBAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;YACnF,IAAI,MAAM,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAEtD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACxE,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,yBAAyB,MAAM,MAAM,GAAG,EAAE;qBACjD;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -33,7 +33,7 @@ export function registerWbComponent(server, client) {
|
|
|
33
33
|
params.componentClass = componentClass;
|
|
34
34
|
if (componentIndex !== undefined)
|
|
35
35
|
params.componentIndex = componentIndex;
|
|
36
|
-
const result = await client.call("
|
|
36
|
+
const result = await client.call("EMCP_WB_Components", params);
|
|
37
37
|
if (action === "list") {
|
|
38
38
|
const components = Array.isArray(result.components) ? result.components : [];
|
|
39
39
|
if (components.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wb-components.js","sourceRoot":"","sources":["../../src/tools/wb-components.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC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I,EAAE,eAAe,WAAW,uBAAuB,UAAU,sBAAsB,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;qBAClK;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,gCAAgC,UAAU,MAAM,GAAG,EAAE;qBAC5D;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wb-connect.d.ts","sourceRoot":"","sources":["../../src/tools/wb-connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"wb-connect.d.ts","sourceRoot":"","sources":["../../src/tools/wb-connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CA6ClF"}
|
package/dist/tools/wb-connect.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function registerWbConnect(server, client) {
|
|
2
2
|
server.registerTool("wb_connect", {
|
|
3
|
-
description: "Test connection to Arma Reforger Workbench. Returns connection status
|
|
3
|
+
description: "Test connection to Arma Reforger Workbench. Returns connection status and current editor mode. Use this to verify Workbench is running with the NET API enabled.",
|
|
4
4
|
inputSchema: {},
|
|
5
5
|
}, async () => {
|
|
6
6
|
try {
|
|
@@ -10,24 +10,20 @@ export function registerWbConnect(server, client) {
|
|
|
10
10
|
content: [
|
|
11
11
|
{
|
|
12
12
|
type: "text",
|
|
13
|
-
text: "**Connection Failed**\n\nCould not reach Workbench. Ensure:\n1. Arma Reforger Tools (Workbench) is running\n2. NET API is enabled: File > Options > General > Net API\n3. The
|
|
13
|
+
text: "**Connection Failed**\n\nCould not reach Workbench. Ensure:\n1. Arma Reforger Tools (Workbench) is running\n2. NET API is enabled: File > Options > General > Net API\n3. The EnfusionMCP handler addon is loaded in Workbench",
|
|
14
14
|
},
|
|
15
15
|
],
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
// Get detailed state
|
|
19
|
-
const details = await client.call("
|
|
18
|
+
// Get detailed state — Ping returns: status, mode, message
|
|
19
|
+
const details = await client.call("EMCP_WB_Ping");
|
|
20
20
|
const lines = [];
|
|
21
21
|
lines.push("**Workbench Connected**\n");
|
|
22
22
|
lines.push(`- **Status:** Connected`);
|
|
23
23
|
if (details.mode)
|
|
24
24
|
lines.push(`- **Mode:** ${details.mode}`);
|
|
25
|
-
if (details.
|
|
26
|
-
lines.push(`- **
|
|
27
|
-
if (details.version)
|
|
28
|
-
lines.push(`- **Version:** ${details.version}`);
|
|
29
|
-
if (details.clientId)
|
|
30
|
-
lines.push(`- **Client ID:** ${details.clientId}`);
|
|
25
|
+
if (details.message)
|
|
26
|
+
lines.push(`- **Info:** ${details.message}`);
|
|
31
27
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
32
28
|
}
|
|
33
29
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wb-connect.js","sourceRoot":"","sources":["../../src/tools/wb-connect.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAuB;IAC1E,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"wb-connect.js","sourceRoot":"","sources":["../../src/tools/wb-connect.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,MAAuB;IAC1E,MAAM,CAAC,YAAY,CACjB,YAAY,EACZ;QACE,WAAW,EACT,kKAAkK;QACpK,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAClC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,gOAAgO;yBACvO;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,2DAA2D;YAC3D,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,IAAI,CAA0B,cAAc,CAAC,CAAC;YAE3E,MAAM,KAAK,GAAa,EAAE,CAAC;YAC3B,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;YACtC,IAAI,OAAO,CAAC,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5D,IAAI,OAAO,CAAC,OAAO;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YAElE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC1E,CAAC;QAA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