ames-unifi-mcp 1.0.4 → 1.0.7

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 CHANGED
@@ -17,7 +17,8 @@
17
17
 
18
18
  <p align="center">
19
19
  <a href="https://www.npmjs.com/package/ames-unifi-mcp"><img src="https://img.shields.io/npm/v/ames-unifi-mcp?style=flat-square&color=f5a542" alt="npm"></a>
20
- <a href="https://github.com/oliverames/ames-unifi-mcp/releases/tag/v1.0.3"><img src="https://img.shields.io/github/v/release/oliverames/ames-unifi-mcp?style=flat-square&color=f5a542&label=MCPB" alt="MCPB release"></a>
20
+ <a href="https://github.com/oliverames/ames-unifi-mcp/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/oliverames/ames-unifi-mcp/ci.yml?branch=main&style=flat-square&label=CI&color=f5a542" alt="CI"></a>
21
+ <a href="https://github.com/oliverames/ames-unifi-mcp/releases/tag/v1.0.7"><img src="https://img.shields.io/github/v/release/oliverames/ames-unifi-mcp?style=flat-square&color=f5a542&label=MCPB" alt="MCPB release"></a>
21
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-f5a542?style=flat-square" alt="License"></a>
22
23
  <a href="https://www.buymeacoffee.com/oliverames"><img src="https://img.shields.io/badge/Buy_Me_a_Coffee-support-f5a542?style=flat-square&logo=buy-me-a-coffee&logoColor=white" alt="Buy Me a Coffee"></a>
23
24
  </p>
@@ -44,9 +45,9 @@ Every mutating operation passes through a **confirm gate** that returns a dry-ru
44
45
 
45
46
  ### Install with MCPB
46
47
 
47
- For Claude Desktop and other MCPB-compatible clients, download the local bundle from the [v1.0.3 release](https://github.com/oliverames/ames-unifi-mcp/releases/tag/v1.0.3):
48
+ For Claude Desktop and other MCPB-compatible clients, download the local bundle from the [v1.0.7 release](https://github.com/oliverames/ames-unifi-mcp/releases/tag/v1.0.7):
48
49
 
49
- [Download `ames-unifi-mcp-1.0.3.mcpb`](https://github.com/oliverames/ames-unifi-mcp/releases/download/v1.0.3/ames-unifi-mcp-1.0.3.mcpb)
50
+ [Download `ames-unifi-mcp-1.0.7.mcpb`](https://github.com/oliverames/ames-unifi-mcp/releases/download/v1.0.7/ames-unifi-mcp-1.0.7.mcpb)
50
51
 
51
52
  The bundle includes the UniFi favicon, production runtime binaries for macOS and Linux, and setup prompts for host, authentication, site, SSL, tool mode, and permission profile.
52
53
 
@@ -136,7 +137,7 @@ If a tool isn't in the index, the controller firmware is too old to support it.
136
137
  <tr>
137
138
  <td width="50%" valign="top">
138
139
 
139
- **Devices** &mdash; 29 tools
140
+ **Devices** &mdash; 63 tools
140
141
  ```
141
142
  device_list device_restart
142
143
  device_get device_adopt
@@ -146,9 +147,12 @@ device_spectrum_scan device_rolling_upgrade_*
146
147
  device_migrate device_port_action
147
148
  device_list_v2 device_stats_latest
148
149
  device_unadopt device_pending_list
150
+ system_device_tags system_tag_*
151
+ switching_stack_* switching_lag_*
152
+ switching_mclag_* cloud_device_list
149
153
  ```
150
154
 
151
- **Clients** &mdash; 15 tools
155
+ **Clients** &mdash; 16 tools
152
156
  ```
153
157
  client_list_active client_block/unblock
154
158
  client_get client_reconnect
@@ -157,112 +161,107 @@ client_rename client_update
157
161
  client_list_v2 client_action
158
162
  ```
159
163
 
160
- **Networks** &mdash; 10 tools
164
+ **Networks** &mdash; 39 tools
161
165
  ```
162
- network_list network_create
163
- network_get network_update
164
- network_delete network_*_v2 (Integration API)
166
+ network_list network_create
167
+ network_get network_update
168
+ network_delete network_*_v2
169
+ system_network_references
170
+ system_radius_profiles_v2
171
+ dns_policy_* system_portprofile_*
165
172
  ```
166
173
 
167
- **Wireless (WLAN + WiFi)** &mdash; 12 tools
174
+ **Wireless (WLAN + WiFi)** &mdash; 14 tools
168
175
  ```
169
176
  wlan_list wlan_create/update/delete
170
177
  wlan_enable wlan_disable
171
178
  wifi_broadcast_list/get/create/update/delete
172
179
  ```
173
180
 
174
- **Firewall** &mdash; 23 tools
181
+ **Firewall** &mdash; 30 tools
175
182
  ```
176
183
  firewall_rule_* (legacy CRUD)
177
184
  firewall_group_* (address/port groups)
178
185
  firewall_zone_* (ZBF zones, 9.0+)
179
186
  firewall_policy_* (ZBF policies + ordering)
187
+ acl_rule_* acl_rule_ordering_*
180
188
  ```
181
189
 
182
- **ACL Rules** &mdash; 7 tools
190
+ **QoS** &mdash; 10 tools
183
191
  ```
184
- acl_rule_list/get/create/update/delete
185
- acl_rule_ordering_get/set
186
- ```
187
-
188
- **DNS Policies** &mdash; 5 tools
189
- ```
190
- dns_policy_list/get/create/update/delete
192
+ traffic_matching_list_* (10.0+)
191
193
  ```
192
194
 
193
- **Traffic & QoS** &mdash; 15 tools
195
+ **Routing** &mdash; 10 tools
194
196
  ```
195
197
  traffic_rule_* (v2 API rules)
196
198
  traffic_route_* (v2 API routes)
197
- traffic_matching_list_* (10.0+)
199
+ system_static_route_*
198
200
  ```
199
201
 
200
- </td>
201
- <td width="50%" valign="top">
202
-
203
202
  **VPN** &mdash; 10 tools
204
203
  ```
205
204
  vpn_server_list/get/create/update/delete
206
205
  vpn_tunnel_list/get/create/update/delete
207
206
  ```
208
207
 
209
- **Switching** &mdash; 15 tools
210
- ```
211
- switching_stack_* (switch stacks)
212
- switching_lag_* (link aggregation)
213
- switching_mclag_* (MC-LAG domains)
214
- ```
208
+ </td>
209
+ <td width="50%" valign="top">
215
210
 
216
- **Stats & DPI** &mdash; 24 tools
211
+ **Stats** &mdash; 20 tools
217
212
  ```
218
213
  stats_site_health stats_sysinfo
219
214
  stats_dashboard stats_report
220
215
  stats_speedtest_* stats_ips_events
221
216
  stats_rogueap stats_spectrumscan
217
+ ```
218
+
219
+ **DPI** &mdash; 11 tools
220
+ ```
222
221
  stats_dpi_site stats_dpi_client
223
222
  stats_dpi_apps stats_dpi_categories
223
+ misc_dpigroup_*
224
224
  ```
225
225
 
226
- **Events & Alarms** &mdash; 5 tools
226
+ **Events** &mdash; 8 tools
227
227
  ```
228
228
  event_list alarm_list
229
229
  alarm_count alarm_archive
230
230
  alarm_archive_all
231
231
  ```
232
232
 
233
- **Hotspot & Guests** &mdash; 13 tools
233
+ **Hotspot** &mdash; 27 tools
234
234
  ```
235
235
  hotspot_authorize/unauthorize_guest
236
236
  hotspot_create_voucher hotspot_extend
237
237
  hotspot_voucher_*_v2 (Integration API)
238
238
  hotspot_config hotspot_packages
239
+ misc_hotspotop_* hotspot_2_0_package_*
239
240
  ```
240
241
 
241
- **System & Settings** &mdash; 53 tools
242
+ **System** &mdash; 27 tools
242
243
  ```
243
244
  system_reboot/poweroff system_settings
244
- system_backup_* system_firmware_*
245
- system_port_forward_* system_static_route_*
246
- system_usergroup_* system_portprofile_*
247
- system_dhcpoption_* system_radiusprofile_*
248
- system_tag_* system_led_toggle
245
+ system_firmware_* admin_site_*
246
+ admin_invite/revoke cloud_host_list/get
247
+ cloud_site_list cloud_sdwan_*
248
+ ```
249
+
250
+ **Settings** &mdash; 19 tools
251
+ ```
252
+ system_setting_* system_led_toggle
253
+ system_ips_update misc_scheduletask_*
254
+ misc_cnt_resource
249
255
  ```
250
256
 
251
- **Cloud API** &mdash; 9 tools
257
+ **Backup** &mdash; 5 tools
252
258
  ```
253
- cloud_host_list/get cloud_site_list
254
- cloud_device_list cloud_isp_metrics
255
- cloud_sdwan_*
259
+ system_backup_* backup_restore
256
260
  ```
257
261
 
258
- **Admin & Misc** &mdash; 56 tools
262
+ **PoE** &mdash; 1 tool
259
263
  ```
260
- admin_site_create/delete/rename
261
- admin_invite/revoke/grant/update
262
- poe_power_cycle syslog_query
263
- apgroup_* misc_rogueknown_*
264
- misc_scheduletask_* misc_hotspotop_*
265
- misc_dpigroup_* misc_cnt_resource
264
+ poe_power_cycle
266
265
  ```
267
266
 
268
267
  </td>
@@ -290,6 +289,10 @@ The server covers all three UniFi API layers:
290
289
  | `UNIFI_API_KEY` | * | &mdash; | API key (preferred, requires 9.1.105+) |
291
290
  | `UNIFI_USERNAME` | * | &mdash; | Username (if no API key) |
292
291
  | `UNIFI_PASSWORD` | * | &mdash; | Password (if no API key) |
292
+ | `UNIFI_HOST_OP_REF` | No | empty | Caller-owned 1Password reference for the controller URL |
293
+ | `UNIFI_API_KEY_OP_REF` | No | empty | Caller-owned 1Password reference for the API key |
294
+ | `UNIFI_USERNAME_OP_REF` | No | empty | Caller-owned 1Password reference for the username |
295
+ | `UNIFI_PASSWORD_OP_REF` | No | empty | Caller-owned 1Password reference for the password |
293
296
  | `UNIFI_SITE` | No | `default` | Site name |
294
297
  | `UNIFI_VERIFY_SSL` | No | `true` | `false` for self-signed certs |
295
298
  | `UNIFI_TOOL_MODE` | No | `lazy` | `lazy` (3 meta-tools) or `eager` (all 310 tools) |
@@ -299,14 +302,14 @@ The server covers all three UniFi API layers:
299
302
 
300
303
  ### 1Password fallback
301
304
 
302
- If env vars are unset, the server falls back to 1Password CLI (`op read`) using these references:
305
+ The server can resolve credentials through 1Password CLI, but it does not assume a vault or item name. Set the reference variables to paths you own:
303
306
 
304
- - `op://Development/UniFi Controller/host`
305
- - `op://Development/UniFi Controller/api_key`
306
- - `op://Development/UniFi Controller/username`
307
- - `op://Development/UniFi Controller/password`
307
+ ```bash
308
+ UNIFI_HOST_OP_REF="op://Your Vault/Your Item/host"
309
+ UNIFI_API_KEY_OP_REF="op://Your Vault/Your Item/api_key"
310
+ ```
308
311
 
309
- Create a `UniFi Controller` item in your `Development` vault with those fields and the server will resolve credentials at startup with no env vars required. Resolution happens in `internal/config/config.go:opRead` and requires either an interactive `op` session or `OP_SERVICE_ACCOUNT_TOKEN` in the environment.
312
+ Plaintext environment variables take priority. The server calls `op read` only when a plaintext value is empty and its matching reference variable is set. This keeps the public package neutral and prevents unexpected 1Password lookups.
310
313
 
311
314
  ### Authentication Methods
312
315
 
@@ -314,18 +317,7 @@ Create a `UniFi Controller` item in your `Development` vault with those fields a
314
317
 
315
318
  **Username/Password** &mdash; Uses session cookies with automatic re-login on expiry. The server includes a single-flight re-login mechanism that prevents thundering-herd issues when batch operations encounter session timeouts simultaneously.
316
319
 
317
- ### 1Password Integration
318
-
319
- If credentials are not set in the environment, the server automatically attempts to resolve them from [1Password CLI](https://developer.1password.com/docs/cli/):
320
-
321
- | Variable | 1Password Reference |
322
- |----------|-------------------|
323
- | `UNIFI_HOST` | `op://Development/UniFi Controller/host` |
324
- | `UNIFI_API_KEY` | `op://Development/UniFi Controller/api_key` |
325
- | `UNIFI_USERNAME` | `op://Development/UniFi Controller/username` |
326
- | `UNIFI_PASSWORD` | `op://Development/UniFi Controller/password` |
327
-
328
- This means you can skip setting env vars entirely if you have `op` installed and a service account or session active. The fallback adds ~1-2s to startup and is silently skipped if 1Password is unavailable.
320
+ See [integration testing](docs/INTEGRATION_TESTING.md) for a safe controller test sequence and [release guidance](docs/RELEASING.md) for the checks that produce the npm package, MCPB bundle, checksums, and SBOM.
329
321
 
330
322
  ---
331
323
 
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("child_process");
4
+ const path = require("path");
5
+ const os = require("os");
6
+
7
+ const binaryName = "ames-unifi-mcp";
8
+
9
+ const platformMap = {
10
+ "darwin-arm64": `${binaryName}-darwin-arm64`,
11
+ "darwin-x64": `${binaryName}-darwin-amd64`,
12
+ "linux-arm64": `${binaryName}-linux-arm64`,
13
+ "linux-x64": `${binaryName}-linux-amd64`,
14
+ };
15
+
16
+ const key = `${os.platform()}-${os.arch()}`;
17
+ const platformBinary = platformMap[key];
18
+
19
+ if (!platformBinary) {
20
+ console.error(
21
+ `Unsupported platform: ${key}. Supported: ${Object.keys(platformMap).join(", ")}`
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ const binaryPath = path.join(__dirname, "..", "dist", platformBinary);
27
+ const child = spawn(binaryPath, process.argv.slice(2), {
28
+ stdio: "inherit",
29
+ });
30
+
31
+ child.on("error", (error) => {
32
+ console.error(`Failed to start ${binaryName}: ${error.message}`);
33
+ process.exit(1);
34
+ });
35
+
36
+ child.on("exit", (code, signal) => {
37
+ if (signal) {
38
+ process.kill(process.pid, signal);
39
+ return;
40
+ }
41
+
42
+ process.exit(code ?? 0);
43
+ });
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ames-unifi-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "UniFi Network MCP server — 310 tools for complete controller management via the Model Context Protocol",
5
5
  "keywords": [
6
6
  "mcp",
@@ -20,7 +20,7 @@
20
20
  "license": "MIT",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/oliverames/ames-unifi-mcp.git"
23
+ "url": "git+https://github.com/oliverames/ames-unifi-mcp.git"
24
24
  },
25
25
  "homepage": "https://github.com/oliverames/ames-unifi-mcp#readme",
26
26
  "bugs": {
@@ -30,14 +30,14 @@
30
30
  "ames-unifi-mcp": "bin/ames-unifi-mcp"
31
31
  },
32
32
  "files": [
33
- "dist/",
34
- "install.js",
33
+ "bin/ames-unifi-mcp",
34
+ "dist/ames-unifi-mcp-darwin-arm64",
35
+ "dist/ames-unifi-mcp-darwin-amd64",
36
+ "dist/ames-unifi-mcp-linux-arm64",
37
+ "dist/ames-unifi-mcp-linux-amd64",
35
38
  "README.md",
36
39
  "LICENSE"
37
40
  ],
38
- "scripts": {
39
- "postinstall": "node install.js"
40
- },
41
41
  "os": [
42
42
  "darwin",
43
43
  "linux"
package/install.js DELETED
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // Postinstall script: copies the correct platform binary to bin/ames-unifi-mcp
4
-
5
- const fs = require("fs");
6
- const path = require("path");
7
- const os = require("os");
8
-
9
- const BINARY_NAME = "ames-unifi-mcp";
10
-
11
- const PLATFORM_MAP = {
12
- "darwin-arm64": `${BINARY_NAME}-darwin-arm64`,
13
- "darwin-x64": `${BINARY_NAME}-darwin-amd64`,
14
- "linux-arm64": `${BINARY_NAME}-linux-arm64`,
15
- "linux-x64": `${BINARY_NAME}-linux-amd64`,
16
- };
17
-
18
- function install() {
19
- const platform = os.platform();
20
- const arch = os.arch();
21
- const key = `${platform}-${arch}`;
22
-
23
- const binaryFile = PLATFORM_MAP[key];
24
- if (!binaryFile) {
25
- console.error(
26
- `Unsupported platform: ${platform}-${arch}. ` +
27
- `Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`
28
- );
29
- process.exit(1);
30
- }
31
-
32
- const distDir = path.join(__dirname, "dist");
33
- const binDir = path.join(__dirname, "bin");
34
- const src = path.join(distDir, binaryFile);
35
- const dest = path.join(binDir, BINARY_NAME);
36
-
37
- if (!fs.existsSync(src)) {
38
- console.error(`Binary not found: ${src}`);
39
- console.error("Try rebuilding: make build-all");
40
- process.exit(1);
41
- }
42
-
43
- // Ensure bin/ exists
44
- if (!fs.existsSync(binDir)) {
45
- fs.mkdirSync(binDir, { recursive: true });
46
- }
47
-
48
- // Copy binary
49
- fs.copyFileSync(src, dest);
50
-
51
- // Make executable
52
- fs.chmodSync(dest, 0o755);
53
-
54
- console.log(`Installed ${BINARY_NAME} for ${platform}/${arch}`);
55
- }
56
-
57
- install();