@owine/unifi-protect-mcp 2.8.2 → 2.9.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 +19 -9
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# UniFi Protect MCP Server
|
|
2
2
|
|
|
3
|
-
An MCP (Model Context Protocol) server that exposes UniFi Protect's Integration REST API as tools for Claude Code and other MCP clients. Aligned with UniFi Protect API **7.1.
|
|
3
|
+
An MCP (Model Context Protocol) server that exposes UniFi Protect's Integration REST API as tools for Claude Code and other MCP clients. Aligned with UniFi Protect API **7.1.83** — 73 tools covering cameras, lights, sensors, chimes, viewers, sirens, fobs, relays, speakers, bridges, link stations, alarm hubs, arm profiles, live views, files, users, NVR status, and WebSocket subscriptions.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- Node.js
|
|
7
|
+
- Node.js 22.x (22.13 or newer) or 24.x — see `engines` in `package.json`
|
|
8
8
|
- A UniFi Protect system with the Integration API enabled
|
|
9
9
|
- An API key generated from your UniFi Protect console
|
|
10
10
|
|
|
@@ -27,10 +27,13 @@ If you prefer to build locally:
|
|
|
27
27
|
```bash
|
|
28
28
|
git clone https://github.com/owine/unifi-protect-mcp.git
|
|
29
29
|
cd unifi-protect-mcp
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
corepack enable # provides pnpm at the version pinned in package.json
|
|
31
|
+
pnpm install
|
|
32
|
+
pnpm run build
|
|
32
33
|
```
|
|
33
34
|
|
|
35
|
+
This project uses pnpm — `npm install` ignores `pnpm-lock.yaml` and may resolve different dependency versions than CI.
|
|
36
|
+
|
|
34
37
|
Then add to Claude Code:
|
|
35
38
|
|
|
36
39
|
```bash
|
|
@@ -224,14 +227,21 @@ This server provides layered safety controls for responsible operation:
|
|
|
224
227
|
|
|
225
228
|
## Development
|
|
226
229
|
|
|
230
|
+
The Node version used for development is pinned in `.nvmrc`. With [fnm](https://github.com/Schniz/fnm) installed, `fnm use` reads it automatically on `cd`.
|
|
231
|
+
|
|
227
232
|
```bash
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
+
pnpm run build # Compile TypeScript
|
|
234
|
+
pnpm start # Run the server
|
|
235
|
+
pnpm run typecheck # Type-check without emitting
|
|
236
|
+
pnpm run lint # ESLint
|
|
237
|
+
pnpm run lint:fix # ESLint with auto-fix
|
|
238
|
+
pnpm test # Run all tests (vitest)
|
|
239
|
+
pnpm run test:watch # Run tests in watch mode
|
|
240
|
+
pnpm run test:coverage # Run tests with coverage
|
|
233
241
|
```
|
|
234
242
|
|
|
243
|
+
Git hooks are managed by [lefthook](https://github.com/evilmartians/lefthook) — `pnpm exec lefthook install` enables them. Pre-commit runs ESLint on staged files and a full typecheck, so fnm and pnpm both need to be on your PATH.
|
|
244
|
+
|
|
235
245
|
### Commit conventions
|
|
236
246
|
|
|
237
247
|
This project uses [conventional commits](https://www.conventionalcommits.org/) and [release-please](https://github.com/googleapis/release-please) for automated releases:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owine/unifi-protect-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.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@11.
|
|
25
|
+
"packageManager": "pnpm@11.15.1",
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/owine/unifi-protect-mcp.git"
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
41
|
-
"ws": "8.21.
|
|
41
|
+
"ws": "8.21.1",
|
|
42
42
|
"zod": "4.4.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@eslint/js": "10.0.1",
|
|
46
|
-
"@types/node": "24.13.
|
|
46
|
+
"@types/node": "24.13.3",
|
|
47
47
|
"@types/ws": "8.18.1",
|
|
48
|
-
"@vitest/coverage-v8": "4.1.
|
|
49
|
-
"eslint": "10.
|
|
50
|
-
"lefthook": "2.1.
|
|
48
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
49
|
+
"eslint": "10.7.0",
|
|
50
|
+
"lefthook": "2.1.10",
|
|
51
51
|
"typescript": "6.0.3",
|
|
52
|
-
"typescript-eslint": "8.
|
|
53
|
-
"vitest": "4.1.
|
|
52
|
+
"typescript-eslint": "8.64.0",
|
|
53
|
+
"vitest": "4.1.10"
|
|
54
54
|
}
|
|
55
55
|
}
|