x-m32-mcp-server 3.0.0 → 3.2.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 +232 -61
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/services/__mocks__/mock-x32-connection.d.ts +87 -0
- package/dist/services/__mocks__/mock-x32-connection.d.ts.map +1 -0
- package/dist/services/__mocks__/mock-x32-connection.js +232 -0
- package/dist/services/__mocks__/mock-x32-connection.js.map +1 -0
- package/dist/tools/bus.d.ts +7 -0
- package/dist/tools/bus.d.ts.map +1 -0
- package/dist/tools/bus.js +346 -0
- package/dist/tools/bus.js.map +1 -0
- package/dist/tools/channel.d.ts.map +1 -1
- package/dist/tools/channel.js +13 -12
- package/dist/tools/channel.js.map +1 -1
- package/dist/tools/connection.d.ts.map +1 -1
- package/dist/tools/connection.js +158 -6
- package/dist/tools/connection.js.map +1 -1
- package/dist/tools/fx.d.ts +7 -0
- package/dist/tools/fx.d.ts.map +1 -0
- package/dist/tools/fx.js +215 -0
- package/dist/tools/fx.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/main.d.ts +7 -0
- package/dist/tools/main.d.ts.map +1 -0
- package/dist/tools/main.js +255 -0
- package/dist/tools/main.js.map +1 -0
- package/dist/tools/parameter.d.ts.map +1 -1
- package/dist/tools/parameter.js +4 -2
- package/dist/tools/parameter.js.map +1 -1
- package/dist/utils/error-helper.d.ts +178 -0
- package/dist/utils/error-helper.d.ts.map +1 -0
- package/dist/utils/error-helper.js +208 -0
- package/dist/utils/error-helper.js.map +1 -0
- package/dist/utils/error-messages.d.ts +178 -0
- package/dist/utils/error-messages.d.ts.map +1 -0
- package/dist/utils/error-messages.example.d.ts +82 -0
- package/dist/utils/error-messages.example.d.ts.map +1 -0
- package/dist/utils/error-messages.example.js +241 -0
- package/dist/utils/error-messages.example.js.map +1 -0
- package/dist/utils/error-messages.js +338 -0
- package/dist/utils/error-messages.js.map +1 -0
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -1,36 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# X32/M32 MCP Server
|
|
2
2
|
|
|
3
|
-
A Model Context Protocol (MCP) server for controlling Behringer X32/M32 digital mixing consoles via OSC protocol.
|
|
3
|
+
A comprehensive Model Context Protocol (MCP) server for controlling Behringer X32/M32 digital mixing consoles via OSC protocol.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
This MCP server enables AI assistants to control X32/M32 digital mixing consoles through semantic, task-based tools. It implements the OSC (Open Sound Control) protocol to communicate with the mixer over the network, providing intuitive
|
|
8
|
-
|
|
7
|
+
This MCP server enables AI assistants to control X32/M32 digital mixing consoles through semantic, task-based tools. It implements the OSC (Open Sound Control) protocol to communicate with the mixer over the network, providing intuitive control of channels, buses, effects, and
|
|
8
|
+
routing with a focus on type safety and developer experience.
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Connection Management
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- Connect and disconnect from X32/M32 mixers over network
|
|
15
|
+
- Retrieve mixer information (model, firmware version)
|
|
16
|
+
- Monitor connection status and network configuration
|
|
17
|
+
- Auto-discovery support for standard X32 port (10023)
|
|
18
|
+
|
|
19
|
+
### Channel Control
|
|
20
|
+
|
|
21
|
+
- **Volume Control**: Set channel faders with both linear (0.0-1.0) and dB values (-90 to +10 dB)
|
|
15
22
|
- **Gain Control**: Adjust preamp gain for input channels
|
|
16
23
|
- **Mute/Solo**: Control channel mute and solo states
|
|
17
24
|
- **Pan Control**: Set stereo positioning with multiple input formats (percentage, LR notation, linear)
|
|
18
25
|
- **EQ Control**: Configure 4-band parametric EQ per channel
|
|
26
|
+
- **Channel Configuration**: Set custom names (max 12 characters) and colors (16 color options)
|
|
27
|
+
|
|
28
|
+
### Bus/Aux Control
|
|
29
|
+
|
|
30
|
+
- **Bus Volume**: Set mix bus fader levels with linear or dB values
|
|
31
|
+
- **Bus Mute**: Mute/unmute mix buses
|
|
32
|
+
- **Channel Sends**: Control channel send levels to buses
|
|
33
|
+
- **Bus State**: Retrieve complete bus configuration and status
|
|
19
34
|
|
|
20
|
-
###
|
|
35
|
+
### Effects Processing
|
|
21
36
|
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
37
|
+
- **Parameter Control**: Set effects parameters on 8 FX racks
|
|
38
|
+
- **Bypass Control**: Bypass or enable effects processing
|
|
39
|
+
- **State Retrieval**: Get complete effects rack state and configuration
|
|
24
40
|
|
|
25
|
-
###
|
|
41
|
+
### Main/Monitor Outputs
|
|
26
42
|
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **Auto-discovery**: Support for standard X32 port (10023)
|
|
43
|
+
- **Main Output**: Control main stereo output volume and mute
|
|
44
|
+
- **Monitor Control**: Set monitor output levels
|
|
30
45
|
|
|
31
|
-
###
|
|
46
|
+
### Low-Level Access
|
|
32
47
|
|
|
33
|
-
- **Parameter
|
|
48
|
+
- **Parameter Tools**: Direct access to any OSC parameter for advanced users
|
|
34
49
|
- **Generic Get/Set**: Read and write any mixer parameter by OSC address
|
|
35
50
|
|
|
36
51
|
## Installation
|
|
@@ -92,34 +107,61 @@ connection_connect with host: "192.168.1.100" and port: 10023
|
|
|
92
107
|
|
|
93
108
|
## Available Tools
|
|
94
109
|
|
|
95
|
-
|
|
110
|
+
Complete reference of all 21 tools organized by domain:
|
|
111
|
+
|
|
112
|
+
### Connection Tools (4 tools)
|
|
113
|
+
|
|
114
|
+
| Tool | Description | Parameters |
|
|
115
|
+
| ----------------------- | ---------------------------------------------- | -------------------------------------------- |
|
|
116
|
+
| `connection_connect` | Connect to X32/M32 mixer via OSC | `host` (IP address), `port` (default: 10023) |
|
|
117
|
+
| `connection_disconnect` | Disconnect from mixer | None |
|
|
118
|
+
| `connection_get_info` | Get mixer model and firmware information | None |
|
|
119
|
+
| `connection_get_status` | Get current connection status and network info | None |
|
|
120
|
+
|
|
121
|
+
### Channel Tools (8 tools)
|
|
96
122
|
|
|
97
|
-
| Tool
|
|
98
|
-
| ----------------------- |
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
123
|
+
| Tool | Description | Parameters |
|
|
124
|
+
| --------------------- | ----------------------- | ------------------------------------------------------------ |
|
|
125
|
+
| `channel_set_volume` | Set channel fader level | `channel` (1-32), `value`, `unit` (linear/db) |
|
|
126
|
+
| `channel_set_gain` | Set preamp gain | `channel` (1-32), `gain` (0.0-1.0) |
|
|
127
|
+
| `channel_mute` | Mute/unmute channel | `channel` (1-32), `muted` (boolean) |
|
|
128
|
+
| `channel_solo` | Solo/unsolo channel | `channel` (1-32), `solo` (boolean) |
|
|
129
|
+
| `channel_set_name` | Set channel name/label | `channel` (1-32), `name` (max 12 chars) |
|
|
130
|
+
| `channel_set_color` | Set channel strip color | `channel` (1-32), `color` (name or 0-15) |
|
|
131
|
+
| `channel_set_pan` | Set stereo pan position | `channel` (1-32), `pan` (percentage/LR/linear) |
|
|
132
|
+
| `channel_set_eq_band` | Configure EQ band | `channel` (1-32), `band` (1-4), `parameter` (f/g/q), `value` |
|
|
103
133
|
|
|
104
|
-
###
|
|
134
|
+
### Bus Tools (4 tools)
|
|
105
135
|
|
|
106
|
-
| Tool
|
|
107
|
-
|
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `channel_set_name` | Set channel name | `channel`, `name` |
|
|
113
|
-
| `channel_set_color` | Set channel color | `channel`, `color` |
|
|
114
|
-
| `channel_set_pan` | Set stereo position | `channel`, `pan` |
|
|
115
|
-
| `channel_set_eq_band` | Configure EQ band | `channel`, `band`, `parameter`, `value` |
|
|
136
|
+
| Tool | Description | Parameters |
|
|
137
|
+
| ---------------- | ----------------------------- | ----------------------------------------------------------- |
|
|
138
|
+
| `bus_set_volume` | Set bus fader level | `bus` (1-16), `value`, `unit` (linear/db) |
|
|
139
|
+
| `bus_mute` | Mute/unmute bus | `bus` (1-16), `muted` (boolean) |
|
|
140
|
+
| `bus_set_send` | Set channel send level to bus | `channel` (1-32), `bus` (1-16), `value`, `unit` (linear/db) |
|
|
141
|
+
| `bus_get_state` | Get complete bus state | `bus` (1-16) |
|
|
116
142
|
|
|
117
|
-
###
|
|
143
|
+
### FX Tools (3 tools)
|
|
118
144
|
|
|
119
|
-
| Tool
|
|
120
|
-
|
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
145
|
+
| Tool | Description | Parameters |
|
|
146
|
+
| ------------------ | --------------------------- | ------------------------------------------------- |
|
|
147
|
+
| `fx_set_parameter` | Set effects parameter value | `fx` (1-8), `parameter` (1-64), `value` (0.0-1.0) |
|
|
148
|
+
| `fx_get_state` | Get effects rack state | `fx` (1-8) |
|
|
149
|
+
| `fx_bypass` | Bypass/enable effect | `fx` (1-8), `bypass` (boolean) |
|
|
150
|
+
|
|
151
|
+
### Main/Monitor Tools (3 tools)
|
|
152
|
+
|
|
153
|
+
| Tool | Description | Parameters |
|
|
154
|
+
| ------------------- | ----------------------------- | --------------------------- |
|
|
155
|
+
| `main_set_volume` | Set main stereo output volume | `value`, `unit` (linear/db) |
|
|
156
|
+
| `main_mute` | Mute/unmute main output | `muted` (boolean) |
|
|
157
|
+
| `monitor_set_level` | Set monitor output level | `value`, `unit` (linear/db) |
|
|
158
|
+
|
|
159
|
+
### Low-Level Tools (2 tools)
|
|
160
|
+
|
|
161
|
+
| Tool | Description | Parameters |
|
|
162
|
+
| --------------- | -------------------------------- | ----------------------------- |
|
|
163
|
+
| `get_parameter` | Get any parameter by OSC address | `address` (OSC path) |
|
|
164
|
+
| `set_parameter` | Set any parameter by OSC address | `address` (OSC path), `value` |
|
|
123
165
|
|
|
124
166
|
## Usage Examples
|
|
125
167
|
|
|
@@ -151,7 +193,7 @@ await channel_set_volume({ channel: 1, value: -10, unit: 'db' });
|
|
|
151
193
|
// Using linear values (0.0 to 1.0)
|
|
152
194
|
await channel_set_volume({ channel: 1, value: 0.75, unit: 'linear' });
|
|
153
195
|
|
|
154
|
-
// Unity gain (0 dB)
|
|
196
|
+
// Unity gain (0 dB = 0.75 linear)
|
|
155
197
|
await channel_set_volume({ channel: 1, value: 0, unit: 'db' });
|
|
156
198
|
```
|
|
157
199
|
|
|
@@ -170,6 +212,48 @@ await channel_set_pan({ channel: 1, pan: 'R75' }); // 75% right
|
|
|
170
212
|
await channel_set_pan({ channel: 1, pan: 0.5 }); // Center
|
|
171
213
|
```
|
|
172
214
|
|
|
215
|
+
### Bus Routing and Mixing
|
|
216
|
+
|
|
217
|
+
```javascript
|
|
218
|
+
// Set bus 1 volume
|
|
219
|
+
await bus_set_volume({ bus: 1, value: -6, unit: 'db' });
|
|
220
|
+
|
|
221
|
+
// Send channel 5 to bus 1 (aux send)
|
|
222
|
+
await bus_set_send({ channel: 5, bus: 1, value: 0.8, unit: 'linear' });
|
|
223
|
+
|
|
224
|
+
// Mute bus 2
|
|
225
|
+
await bus_mute({ bus: 2, muted: true });
|
|
226
|
+
|
|
227
|
+
// Get complete bus state
|
|
228
|
+
await bus_get_state({ bus: 1 });
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Effects Control
|
|
232
|
+
|
|
233
|
+
```javascript
|
|
234
|
+
// Set reverb time (example - parameter 01 on FX rack 1)
|
|
235
|
+
await fx_set_parameter({ fx: 1, parameter: 1, value: 0.7 });
|
|
236
|
+
|
|
237
|
+
// Bypass FX rack 2
|
|
238
|
+
await fx_bypass({ fx: 2, bypass: true });
|
|
239
|
+
|
|
240
|
+
// Get FX rack state
|
|
241
|
+
await fx_get_state({ fx: 1 });
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Main Output Control
|
|
245
|
+
|
|
246
|
+
```javascript
|
|
247
|
+
// Set main output to -3 dB
|
|
248
|
+
await main_set_volume({ value: -3, unit: 'db' });
|
|
249
|
+
|
|
250
|
+
// Mute main output (emergency mute)
|
|
251
|
+
await main_mute({ muted: true });
|
|
252
|
+
|
|
253
|
+
// Set monitor level
|
|
254
|
+
await monitor_set_level({ value: 0.6, unit: 'linear' });
|
|
255
|
+
```
|
|
256
|
+
|
|
173
257
|
## Technical Details
|
|
174
258
|
|
|
175
259
|
### Architecture
|
|
@@ -191,54 +275,99 @@ X32/M32 Mixer
|
|
|
191
275
|
```
|
|
192
276
|
X32-MCP/
|
|
193
277
|
├── src/
|
|
194
|
-
│ ├── index.ts
|
|
195
|
-
│ ├── server.ts
|
|
196
|
-
│ ├── mcp/
|
|
197
|
-
│ ├── tools/
|
|
198
|
-
│ │ ├──
|
|
199
|
-
│ │ ├──
|
|
200
|
-
│ │
|
|
201
|
-
│ ├──
|
|
202
|
-
│ │
|
|
203
|
-
│
|
|
204
|
-
│
|
|
205
|
-
│
|
|
278
|
+
│ ├── index.ts # Entry point
|
|
279
|
+
│ ├── server.ts # Server configuration
|
|
280
|
+
│ ├── mcp/ # MCP protocol implementation
|
|
281
|
+
│ ├── tools/ # Domain-based tool implementations
|
|
282
|
+
│ │ ├── connection.ts # Connection management (4 tools)
|
|
283
|
+
│ │ ├── channel.ts # Channel control (8 tools)
|
|
284
|
+
│ │ ├── bus.ts # Bus/aux control (4 tools)
|
|
285
|
+
│ │ ├── fx.ts # Effects control (3 tools)
|
|
286
|
+
│ │ ├── main.ts # Main/monitor outputs (3 tools)
|
|
287
|
+
│ │ └── parameter.ts # Low-level parameter access (2 tools)
|
|
288
|
+
│ ├── services/ # Business logic
|
|
289
|
+
│ │ ├── x32-connection.ts # X32 OSC communication
|
|
290
|
+
│ │ └── __mocks__/ # Mock implementations for testing
|
|
291
|
+
│ ├── types/ # TypeScript type definitions
|
|
292
|
+
│ └── utils/ # Utility functions
|
|
293
|
+
│ ├── db-converter.ts # dB/linear conversion
|
|
206
294
|
│ ├── color-converter.ts # Color mapping
|
|
207
|
-
│ └── pan-converter.ts
|
|
208
|
-
|
|
209
|
-
|
|
295
|
+
│ └── pan-converter.ts # Pan value conversion
|
|
296
|
+
├── docs/ # Documentation
|
|
297
|
+
│ └── OSC-Protocol.md # X32 OSC protocol reference
|
|
298
|
+
└── package.json # Project metadata (v3.1.0)
|
|
210
299
|
```
|
|
211
300
|
|
|
212
301
|
### OSC Protocol Implementation
|
|
213
302
|
|
|
214
|
-
The server implements the X32/M32 OSC protocol for:
|
|
303
|
+
The server implements the X32/M32 OSC protocol for comprehensive mixer control:
|
|
215
304
|
|
|
216
|
-
- Channel parameters (`/ch/XX/...`)
|
|
217
|
-
- Bus routing (`/bus/XX/...`)
|
|
218
|
-
- Effects (`/fx/XX/...`)
|
|
219
|
-
- Main mix (`/main/...`)
|
|
220
|
-
- Configuration (`/config/...`)
|
|
305
|
+
- **Channel parameters** (`/ch/XX/...`) - 32 input channels with full processing control
|
|
306
|
+
- **Bus routing** (`/bus/XX/...`) - 16 mix buses for aux sends and monitor mixes
|
|
307
|
+
- **Effects** (`/fx/XX/...`) - 8 FX racks with full parameter control
|
|
308
|
+
- **Main mix** (`/main/...`) - Main stereo output and monitoring
|
|
309
|
+
- **Configuration** (`/config/...`) - Naming, colors, and system settings
|
|
221
310
|
|
|
222
311
|
See `docs/OSC-Protocol.md` for detailed protocol documentation.
|
|
223
312
|
|
|
313
|
+
### Value Conversions
|
|
314
|
+
|
|
315
|
+
The server handles automatic conversions between different value formats:
|
|
316
|
+
|
|
317
|
+
- **dB to Linear**: Fader values use non-linear mapping (-90 dB to +10 dB → 0.0 to 1.0)
|
|
318
|
+
- **Pan Values**: Supports percentage (-100 to +100), LR notation (L50/C/R75), and linear (0.0-1.0)
|
|
319
|
+
- **Color Mapping**: Named colors (red, green, blue, etc.) mapped to numeric values (0-15)
|
|
320
|
+
|
|
224
321
|
## Development
|
|
225
322
|
|
|
226
323
|
### Running Tests
|
|
227
324
|
|
|
228
325
|
```bash
|
|
326
|
+
# Run all tests
|
|
229
327
|
npm test
|
|
328
|
+
|
|
329
|
+
# Run specific test file
|
|
330
|
+
npx jest src/tools/channel.test.ts
|
|
331
|
+
|
|
332
|
+
# Run tests matching pattern
|
|
333
|
+
npx jest -t "channel_set_volume"
|
|
230
334
|
```
|
|
231
335
|
|
|
336
|
+
### Testing Infrastructure
|
|
337
|
+
|
|
338
|
+
The project includes a comprehensive mock testing infrastructure:
|
|
339
|
+
|
|
340
|
+
- **MockX32Connection**: Full OSC protocol simulation without hardware
|
|
341
|
+
- **Unit Tests**: Tests for all utility functions (db-converter, color-converter, pan-converter)
|
|
342
|
+
- **Integration Tests**: Domain tool tests verifying complete workflows
|
|
343
|
+
- **Type Safety**: Strict TypeScript checking with 100% type coverage
|
|
344
|
+
|
|
345
|
+
Test coverage includes:
|
|
346
|
+
|
|
347
|
+
- Channel operations (volume, gain, mute, solo, EQ, pan, name, color)
|
|
348
|
+
- Bus routing and mixing
|
|
349
|
+
- Effects parameter control
|
|
350
|
+
- Error handling and validation
|
|
351
|
+
- State management across multiple channels/buses
|
|
352
|
+
|
|
232
353
|
### Building
|
|
233
354
|
|
|
234
355
|
```bash
|
|
356
|
+
# Production build
|
|
235
357
|
npm run build
|
|
358
|
+
|
|
359
|
+
# Watch mode for development
|
|
360
|
+
npm run build:watch
|
|
236
361
|
```
|
|
237
362
|
|
|
238
363
|
### Linting
|
|
239
364
|
|
|
240
365
|
```bash
|
|
366
|
+
# Check code style
|
|
241
367
|
npm run lint
|
|
368
|
+
|
|
369
|
+
# Fix issues automatically
|
|
370
|
+
npm run lint:fix
|
|
242
371
|
```
|
|
243
372
|
|
|
244
373
|
## Testing with X32 Emulator
|
|
@@ -247,7 +376,24 @@ For development without physical hardware, you can use the X32 emulator:
|
|
|
247
376
|
|
|
248
377
|
1. Download the X32 emulator from the Behringer website
|
|
249
378
|
2. Run the emulator (default port: 10023)
|
|
250
|
-
3. Connect using `connection_connect` with host: `
|
|
379
|
+
3. Connect using `connection_connect` with host: `127.0.0.1` or emulator IP
|
|
380
|
+
|
|
381
|
+
Alternatively, use the built-in mock testing infrastructure for unit testing without any hardware.
|
|
382
|
+
|
|
383
|
+
## Color Reference
|
|
384
|
+
|
|
385
|
+
Available channel/bus colors:
|
|
386
|
+
|
|
387
|
+
| Color | Value | Inverted |
|
|
388
|
+
| ------- | ----- | ---------------- |
|
|
389
|
+
| Off | 0 | - |
|
|
390
|
+
| Red | 1 | red-inv (9) |
|
|
391
|
+
| Green | 2 | green-inv (10) |
|
|
392
|
+
| Yellow | 3 | yellow-inv (11) |
|
|
393
|
+
| Blue | 4 | blue-inv (12) |
|
|
394
|
+
| Magenta | 5 | magenta-inv (13) |
|
|
395
|
+
| Cyan | 6 | cyan-inv (14) |
|
|
396
|
+
| White | 7 | white-inv (15) |
|
|
251
397
|
|
|
252
398
|
## Contributing
|
|
253
399
|
|
|
@@ -265,6 +411,25 @@ Contributions are welcome! Please:
|
|
|
265
411
|
- Keep tools focused on single responsibilities
|
|
266
412
|
- Include comprehensive JSDoc comments
|
|
267
413
|
- Follow TypeScript strict mode requirements
|
|
414
|
+
- Maintain 100% type coverage for public APIs
|
|
415
|
+
- Add unit tests for all new functionality
|
|
416
|
+
|
|
417
|
+
### Tool Design Principles
|
|
418
|
+
|
|
419
|
+
When adding new tools, follow these principles:
|
|
420
|
+
|
|
421
|
+
- **Task-based**: Tools represent user intentions, not API endpoints
|
|
422
|
+
- **Domain-focused**: Group related operations by domain (channel, bus, fx, etc.)
|
|
423
|
+
- **Type-safe**: Use domain-specific parameters, not raw OSC addresses
|
|
424
|
+
- **Self-documenting**: Clear names, descriptions, and parameter definitions
|
|
425
|
+
|
|
426
|
+
See `CLAUDE.md` for detailed MCP tool design guidelines.
|
|
427
|
+
|
|
428
|
+
## Version History
|
|
429
|
+
|
|
430
|
+
- **v3.1.0** (Current) - Added bus, FX, and main/monitor tools, comprehensive testing infrastructure
|
|
431
|
+
- **v2.0.0** - ESM-only architecture, improved type safety
|
|
432
|
+
- **v1.0.0** - Initial release with channel and connection tools
|
|
268
433
|
|
|
269
434
|
## License
|
|
270
435
|
|
|
@@ -279,3 +444,9 @@ MIT
|
|
|
279
444
|
## Support
|
|
280
445
|
|
|
281
446
|
For issues, questions, or contributions, please visit: https://github.com/GoBeromsu/X32-MCP
|
|
447
|
+
|
|
448
|
+
## Related Resources
|
|
449
|
+
|
|
450
|
+
- [X32/M32 OSC Protocol Documentation](docs/OSC-Protocol.md)
|
|
451
|
+
- [Model Context Protocol Specification](https://modelcontextprotocol.io)
|
|
452
|
+
- [Behringer X32 Official Documentation](https://www.behringer.com/product.html?modelCode=P0ASF)
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
3
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
4
|
import { X32Connection } from './services/x32-connection.js';
|
|
5
|
-
import { registerConnectionTools, registerChannelTools, registerParameterTools } from './tools/index.js';
|
|
5
|
+
import { registerConnectionTools, registerChannelTools, registerBusTools, registerFxTools, registerMainTools, registerParameterTools } from './tools/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* X32 MCP Server
|
|
8
8
|
* Model Context Protocol server for X32/M32 mixer control
|
|
@@ -24,6 +24,9 @@ async function main() {
|
|
|
24
24
|
// Register all domain tools
|
|
25
25
|
registerConnectionTools(server, connection);
|
|
26
26
|
registerChannelTools(server, connection);
|
|
27
|
+
registerBusTools(server, connection);
|
|
28
|
+
registerFxTools(server, connection);
|
|
29
|
+
registerMainTools(server, connection);
|
|
27
30
|
registerParameterTools(server, connection);
|
|
28
31
|
// Setup connection event handlers
|
|
29
32
|
connection.on('connected', () => {
|
|
@@ -57,6 +60,22 @@ async function main() {
|
|
|
57
60
|
console.error(' - channel_set_pan: Set stereo position');
|
|
58
61
|
console.error(' - channel_set_eq_band: Configure EQ');
|
|
59
62
|
console.error('');
|
|
63
|
+
console.error('Bus tools:');
|
|
64
|
+
console.error(' - bus_set_volume: Set bus volume (linear or dB)');
|
|
65
|
+
console.error(' - bus_mute: Mute/unmute bus');
|
|
66
|
+
console.error(' - bus_set_send: Set channel send level to bus');
|
|
67
|
+
console.error(' - bus_get_state: Get complete bus state');
|
|
68
|
+
console.error('');
|
|
69
|
+
console.error('FX tools:');
|
|
70
|
+
console.error(' - fx_set_parameter: Set effects parameter');
|
|
71
|
+
console.error(' - fx_get_state: Get effects state');
|
|
72
|
+
console.error(' - fx_bypass: Bypass/enable effect');
|
|
73
|
+
console.error('');
|
|
74
|
+
console.error('Main/Monitor tools:');
|
|
75
|
+
console.error(' - main_set_volume: Set main stereo output volume (linear or dB)');
|
|
76
|
+
console.error(' - main_mute: Mute/unmute main output');
|
|
77
|
+
console.error(' - monitor_set_level: Set monitor output level (linear or dB)');
|
|
78
|
+
console.error('');
|
|
60
79
|
console.error('Low-level tools:');
|
|
61
80
|
console.error(' - get_parameter: Get any parameter by OSC address');
|
|
62
81
|
console.error(' - set_parameter: Set any parameter by OSC address');
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EACH,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACzB,MAAM,kBA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OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { X32ConnectionConfig, X32InfoResponse, X32StatusResponse, OscMessage } from '../../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Mock X32 Connection for Testing
|
|
5
|
+
* Simulates X32/M32 mixer responses without requiring actual hardware
|
|
6
|
+
*/
|
|
7
|
+
export declare class MockX32Connection extends EventEmitter {
|
|
8
|
+
private isConnected;
|
|
9
|
+
private config;
|
|
10
|
+
private parameterStore;
|
|
11
|
+
private readonly DEFAULT_INFO;
|
|
12
|
+
private readonly DEFAULT_STATUS;
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Initialize default parameter values
|
|
16
|
+
*/
|
|
17
|
+
private initializeDefaultParameters;
|
|
18
|
+
/**
|
|
19
|
+
* Mock connection to X32/M32 mixer
|
|
20
|
+
*/
|
|
21
|
+
connect(config: X32ConnectionConfig): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Mock disconnection from X32/M32 mixer
|
|
24
|
+
*/
|
|
25
|
+
disconnect(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Mock send OSC message
|
|
28
|
+
*/
|
|
29
|
+
sendMessage(address: string, args?: unknown[], waitForReply?: boolean): Promise<OscMessage | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Infer OSC type from value
|
|
32
|
+
*/
|
|
33
|
+
private inferOscType;
|
|
34
|
+
/**
|
|
35
|
+
* Mock get X32/M32 info
|
|
36
|
+
*/
|
|
37
|
+
getInfo(): Promise<X32InfoResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Mock get X32/M32 status
|
|
40
|
+
*/
|
|
41
|
+
getStatus(): Promise<X32StatusResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Check if connected
|
|
44
|
+
*/
|
|
45
|
+
get connected(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Get connection config
|
|
48
|
+
*/
|
|
49
|
+
getConfig(): X32ConnectionConfig | null;
|
|
50
|
+
/**
|
|
51
|
+
* Mock get parameter value
|
|
52
|
+
*/
|
|
53
|
+
getParameter<T = unknown>(address: string): Promise<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Mock set parameter value
|
|
56
|
+
*/
|
|
57
|
+
setParameter(address: string, value: unknown): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Mock get channel parameter
|
|
60
|
+
*/
|
|
61
|
+
getChannelParameter<T = unknown>(channel: number, param: string): Promise<T>;
|
|
62
|
+
/**
|
|
63
|
+
* Mock set channel parameter
|
|
64
|
+
*/
|
|
65
|
+
setChannelParameter(channel: number, param: string, value: unknown): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Mock get bus parameter
|
|
68
|
+
*/
|
|
69
|
+
getBusParameter<T = unknown>(bus: number, param: string): Promise<T>;
|
|
70
|
+
/**
|
|
71
|
+
* Mock set bus parameter
|
|
72
|
+
*/
|
|
73
|
+
setBusParameter(bus: number, param: string, value: unknown): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Reset mock to initial state
|
|
76
|
+
*/
|
|
77
|
+
reset(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Set custom parameter value for testing
|
|
80
|
+
*/
|
|
81
|
+
setMockParameter(address: string, value: unknown): void;
|
|
82
|
+
/**
|
|
83
|
+
* Get all stored parameters (for debugging)
|
|
84
|
+
*/
|
|
85
|
+
getMockParameters(): Map<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=mock-x32-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-x32-connection.d.ts","sourceRoot":"","sources":["../../../src/services/__mocks__/mock-x32-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YA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