@owine/unifi-protect-mcp 2.14.2 → 2.15.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.
@@ -44,7 +44,7 @@ function collectMessages(client, path, duration) {
44
44
  }
45
45
  function registerSubscriptionTools(server, client) {
46
46
  server.registerTool("protect_subscribe_devices", {
47
- description: "Connect to the device update WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each message has {type: 'add'|'update'|'remove', modelKey: 'camera'|'light'|'sensor'|..., id, payload: partial device fields that changed}. Use to detect state changes like isRecording flipping, battery drops, or new devices being adopted — fields delivered are only those that changed, not the full device object.",
47
+ description: "Connect to the device update WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each message is an envelope {type, item} where item is a device resource carrying id and modelKey (camera, light, sensor, nvr, …). The 7.3.70 docs show type 'add' with the full device object as item; other message types and whether updates carry only changed fields are not documented — inspect the captured messages. Use to detect device state changes or newly adopted devices.",
48
48
  inputSchema: { duration: durationSchema },
49
49
  outputSchema: misc_js_1.subscriptionOutputSchema,
50
50
  annotations: safety_js_1.READ_ONLY,
@@ -58,7 +58,7 @@ function registerSubscriptionTools(server, client) {
58
58
  }
59
59
  });
60
60
  server.registerTool("protect_subscribe_events", {
61
- description: "Connect to the Protect event WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each event message includes: id, type ('motion' | 'ring' | 'smartDetectZone' | 'smartDetectLine' | 'sensorMotion' | 'sensorAlarm' | 'fingerprint' | 'nfcCard' | ...), start, end (null while ongoing), camera/sensor id, score, smartDetectTypes (['person','vehicle','animal','package','license_plate','face']), metadata (e.g. detected license plate text, NFC card id, fingerprint id, ULP user match).",
61
+ description: "Connect to the Protect event WebSocket and collect messages for a specified duration (1-30s). Returns {messages, duration, error?}; each message is an envelope {type: 'add' | 'update', item: {id, modelKey: 'event', type (event kind, e.g. 'ring'), start, end (epoch ms), device (ID of the camera/sensor that raised it)}} (7.3.70 docs). The full set of event kinds and any further event fields are not documented — inspect the captured messages.",
62
62
  inputSchema: { duration: durationSchema },
63
63
  outputSchema: misc_js_1.subscriptionOutputSchema,
64
64
  annotations: safety_js_1.READ_ONLY,
@@ -19,7 +19,7 @@ function registerSystemTools(server, client) {
19
19
  }
20
20
  });
21
21
  server.registerTool("protect_list_nvrs", {
22
- description: "Get the NVR (Network Video Recorder) console info. NOTE: despite the name, the Protect Integration API's /nvrs endpoint returns a SINGLE NVR object, not an array. Returns: id, modelKey, name, type (e.g. UNVR-PRO), guid, mac, doorbellSettings (defaultMessageText, defaultMessageResetTimeoutMs, customMessages[], customImages[]), armMode (status, armedAt, willBeArmedAt, breachDetectedAt, breachEventCount, breachTriggerEventId, breachEventId).",
22
+ description: "Get the NVR (Network Video Recorder) console info. NOTE: despite the name, the Protect Integration API's /nvrs endpoint returns a SINGLE NVR object, not an array. Returns: id, modelKey, name, type (e.g. UNVR-PRO), guid, mac, doorbellSettings (defaultMessageText, defaultMessageResetTimeoutMs, customMessages[], customImages[] (preview, sprite)), armMode (status, armProfileId, armedAt, willBeArmedAt, breachDetectedAt, breachEventCount, breachTriggerEventId, breachEventId).",
23
23
  outputSchema: misc_js_1.nvrOutputSchema,
24
24
  annotations: safety_js_1.READ_ONLY,
25
25
  }, async () => {
@@ -8,7 +8,7 @@ const url_js_1 = require("../utils/url.js");
8
8
  const misc_js_1 = require("../schemas/misc.js");
9
9
  function registerUserTools(server, client) {
10
10
  server.registerTool("protect_list_users", {
11
- description: "List all Protect users (filtered by the API key's access permissions). Returns array; each user includes (Integration API 7.3.47-verified): id, modelKey, name, firstName, lastName, email, ucoreUserId. The Integration API does NOT expose roles, permissions, login history, groups, or notification settings.",
11
+ description: "List all Protect users (filtered by the API key's access permissions). Returns array; each user includes (Integration API 7.3.70-verified): id, modelKey, name, firstName, lastName, email, ucoreUserId. The Integration API does NOT expose roles, permissions, login history, groups, or notification settings.",
12
12
  outputSchema: misc_js_1.userListOutputSchema,
13
13
  annotations: safety_js_1.READ_ONLY,
14
14
  }, async () => {
@@ -35,7 +35,7 @@ function registerUserTools(server, client) {
35
35
  }
36
36
  });
37
37
  server.registerTool("protect_list_ulp_users", {
38
- description: "List all UniFi Identity (ULP) users. Returns array; each ULP user includes (Integration API 7.3.47-verified): id, modelKey, firstName, lastName, fullName, email (empty string for service accounts), status (e.g. ACTIVE). Enrolled-credential detail (NFC cards, fingerprints) is NOT exposed by this API surface.",
38
+ description: "List UniFi Identity (ULP) users — per the API docs, those with enrolled credentials (NFC cards, fingerprints). Returns array; each ULP user includes (Integration API 7.3.70-verified): id, modelKey, firstName, lastName, fullName, email (empty string for service accounts), status (e.g. ACTIVE). Enrolled-credential detail (NFC cards, fingerprints) is NOT exposed by this API surface.",
39
39
  outputSchema: misc_js_1.ulpUserListOutputSchema,
40
40
  annotations: safety_js_1.READ_ONLY,
41
41
  }, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owine/unifi-protect-mcp",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
4
4
  "description": "MCP server for UniFi Protect Integration API",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -22,7 +22,7 @@
22
22
  "engines": {
23
23
  "node": "^22.13.0 || ^24.0.0"
24
24
  },
25
- "packageManager": "pnpm@12.8.2",
25
+ "packageManager": "pnpm@12.11.2",
26
26
  "repository": {
27
27
  "type": "git",
28
28
  "url": "git+https://github.com/owine/unifi-protect-mcp.git"
@@ -37,20 +37,20 @@
37
37
  "author": "owine",
38
38
  "license": "MIT",
39
39
  "dependencies": {
40
- "@modelcontextprotocol/sdk": "1.32.0",
40
+ "@modelcontextprotocol/sdk": "1.32.1",
41
41
  "ws": "8.22.0",
42
42
  "zod": "4.6.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@eslint/js": "10.0.1",
46
- "@types/node": "24.19.1",
46
+ "@types/node": "24.19.2",
47
47
  "@types/ws": "8.18.2",
48
48
  "@typescript/native": "npm:typescript@7.0.2",
49
49
  "@vitest/coverage-v8": "5.0.3",
50
50
  "eslint": "10.12.0",
51
- "lefthook": "2.1.16",
51
+ "lefthook": "2.2.1",
52
52
  "typescript": "npm:@typescript/typescript6@6.0.2",
53
- "typescript-eslint": "8.71.0",
53
+ "typescript-eslint": "8.71.1",
54
54
  "vitest": "5.0.3"
55
55
  }
56
56
  }