@owine/unifi-network-mcp 2.8.3 → 2.10.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 +23 -12
- package/dist/index.js +5 -1
- package/dist/utils/output-schemas.d.ts +86 -86
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ An MCP (Model Context Protocol) server that exposes the UniFi Network Integratio
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- Node.js
|
|
7
|
+
- Node.js 22.13+ or 24 (see `engines` in `package.json`)
|
|
8
8
|
- A UniFi Network console with the Integration API enabled
|
|
9
9
|
- An API key generated from your UniFi Network console
|
|
10
10
|
|
|
@@ -22,13 +22,14 @@ Use `-s user` for global availability across all projects, or `-s project` for t
|
|
|
22
22
|
|
|
23
23
|
### From source
|
|
24
24
|
|
|
25
|
-
If you prefer to build locally:
|
|
25
|
+
If you prefer to build locally, this project uses pnpm via Corepack — use `pnpm install`, not `npm install`, which ignores `pnpm-lock.yaml` and resolves different dependency versions:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
git clone https://github.com/owine/unifi-network-mcp.git
|
|
29
29
|
cd unifi-network-mcp
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
corepack enable
|
|
31
|
+
pnpm install
|
|
32
|
+
pnpm run build
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
Then add to Claude Code:
|
|
@@ -73,15 +74,21 @@ This server provides layered safety controls for responsible operation:
|
|
|
73
74
|
- **Tool annotations** — Every tool declares `readOnlyHint`, `destructiveHint`, and `idempotentHint` so MCP clients (like Claude Code) can make informed confirmation decisions
|
|
74
75
|
- **Read-only mode** — Enabled by default. Only read operations (list, get) are registered. Set `UNIFI_NETWORK_READ_ONLY=false` to enable write/mutating tools
|
|
75
76
|
- **Destructive tool warnings** — Tools that delete or irreversibly modify resources have descriptions prefixed with `DESTRUCTIVE:` to clearly signal risk
|
|
76
|
-
- **Confirmation parameter** —
|
|
77
|
-
- **Dry-run support** — All write tools accept an optional `dryRun: true` parameter that returns a preview of the HTTP request (method, path, body) without making any changes
|
|
77
|
+
- **Confirmation parameter** — Every tool marked `DESTRUCTIVE:` (all 10 of them, including `unifi_remove_device` and `unifi_bulk_delete_vouchers`) requires an explicit `confirm: true` parameter for the call to succeed
|
|
78
|
+
- **Dry-run support** — All 33 write tools accept an optional `dryRun: true` parameter that returns a preview of the HTTP request (method, path, body) without making any changes
|
|
79
|
+
|
|
80
|
+
## Structured Output
|
|
81
|
+
|
|
82
|
+
58 of the 74 tools (all 41 read tools, plus the 17 write tools whose API responses return the affected resource) declare an MCP `outputSchema` and return `structuredContent` alongside the usual text content. Clients that understand structured output get typed, machine-readable results instead of parsing JSON out of a text blob.
|
|
83
|
+
|
|
84
|
+
The schemas live in `src/utils/output-schemas.ts` and are verified against UniFi Network API 10.5.43. They deliberately use a **loose strategy**: every non-key field is optional and nested objects use `.passthrough()`, so firmware- and hardware-specific fields flow through unchanged rather than being stripped or triggering a validation error. This keeps the contract stable across console versions and hardware models.
|
|
78
85
|
|
|
79
86
|
## Tools (74 total)
|
|
80
87
|
|
|
81
88
|
### System (1)
|
|
82
89
|
| Tool | Description |
|
|
83
90
|
|---|---|
|
|
84
|
-
| `unifi_get_info` | Get
|
|
91
|
+
| `unifi_get_info` | Get UniFi Network application info — returns `applicationVersion` only |
|
|
85
92
|
|
|
86
93
|
### Sites (1)
|
|
87
94
|
| Tool | Description |
|
|
@@ -207,11 +214,15 @@ This server provides layered safety controls for responsible operation:
|
|
|
207
214
|
## Development
|
|
208
215
|
|
|
209
216
|
```bash
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
217
|
+
pnpm install # Install dependencies
|
|
218
|
+
pnpm run build # Compile TypeScript
|
|
219
|
+
pnpm start # Run the server
|
|
220
|
+
pnpm run typecheck # Type-check without emitting
|
|
221
|
+
pnpm run lint # ESLint
|
|
222
|
+
pnpm run lint:fix # ESLint with auto-fix
|
|
223
|
+
pnpm test # Run all tests (vitest)
|
|
224
|
+
pnpm run test:watch # Run tests in watch mode
|
|
225
|
+
pnpm run test:coverage # Run tests with coverage
|
|
215
226
|
```
|
|
216
227
|
|
|
217
228
|
### Commit conventions
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const node_module_1 = require("node:module");
|
|
4
5
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
6
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
7
|
const config_js_1 = require("./config.js");
|
|
7
8
|
const client_js_1 = require("./client.js");
|
|
8
9
|
const index_js_1 = require("./tools/index.js");
|
|
10
|
+
// Read at runtime rather than importing: package.json sits outside rootDir,
|
|
11
|
+
// so a static import would emit dist/src/ and break the published layout.
|
|
12
|
+
const { version } = (0, node_module_1.createRequire)(__filename)("../package.json");
|
|
9
13
|
async function main() {
|
|
10
14
|
const config = (0, config_js_1.loadConfig)();
|
|
11
15
|
const client = new client_js_1.NetworkClient(config);
|
|
12
16
|
const server = new mcp_js_1.McpServer({
|
|
13
17
|
name: "unifi-network",
|
|
14
|
-
version
|
|
18
|
+
version,
|
|
15
19
|
});
|
|
16
20
|
(0, index_js_1.registerAllTools)(server, client, config.readOnly);
|
|
17
21
|
if (config.readOnly) {
|
|
@@ -13,15 +13,15 @@ export declare const getInfoOutputSchema: {
|
|
|
13
13
|
applicationVersion: z.ZodOptional<z.ZodString>;
|
|
14
14
|
};
|
|
15
15
|
export declare const listSitesOutputSchema: {
|
|
16
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
16
20
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
17
21
|
id: z.ZodString;
|
|
18
22
|
internalReference: z.ZodOptional<z.ZodString>;
|
|
19
23
|
name: z.ZodOptional<z.ZodString>;
|
|
20
24
|
}, z.core.$loose>>;
|
|
21
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
};
|
|
26
26
|
export declare const networkOutputSchema: {
|
|
27
27
|
id: z.ZodString;
|
|
@@ -42,6 +42,10 @@ export declare const networkOutputSchema: {
|
|
|
42
42
|
}, z.core.$loose>>;
|
|
43
43
|
};
|
|
44
44
|
export declare const listNetworksOutputSchema: {
|
|
45
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
45
49
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
46
50
|
id: z.ZodString;
|
|
47
51
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -60,10 +64,6 @@ export declare const listNetworksOutputSchema: {
|
|
|
60
64
|
origin: z.ZodOptional<z.ZodString>;
|
|
61
65
|
}, z.core.$loose>>;
|
|
62
66
|
}, z.core.$loose>>;
|
|
63
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
64
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
66
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
67
67
|
};
|
|
68
68
|
export declare const getNetworkReferencesOutputSchema: {
|
|
69
69
|
referenceResources: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
@@ -84,6 +84,10 @@ export declare const voucherOutputSchema: {
|
|
|
84
84
|
expired: z.ZodOptional<z.ZodBoolean>;
|
|
85
85
|
};
|
|
86
86
|
export declare const listVouchersOutputSchema: {
|
|
87
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
87
91
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
88
92
|
id: z.ZodString;
|
|
89
93
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -99,10 +103,6 @@ export declare const listVouchersOutputSchema: {
|
|
|
99
103
|
authorizedGuestCount: z.ZodOptional<z.ZodNumber>;
|
|
100
104
|
expired: z.ZodOptional<z.ZodBoolean>;
|
|
101
105
|
}, z.core.$loose>>;
|
|
102
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
104
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
105
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
106
106
|
};
|
|
107
107
|
export declare const createVouchersOutputSchema: {
|
|
108
108
|
readonly vouchers: z.ZodArray<z.ZodObject<{
|
|
@@ -130,6 +130,10 @@ export declare const firewallZoneOutputSchema: {
|
|
|
130
130
|
}, z.core.$loose>>;
|
|
131
131
|
};
|
|
132
132
|
export declare const listFirewallZonesOutputSchema: {
|
|
133
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
133
137
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
134
138
|
id: z.ZodString;
|
|
135
139
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -138,10 +142,6 @@ export declare const listFirewallZonesOutputSchema: {
|
|
|
138
142
|
origin: z.ZodOptional<z.ZodString>;
|
|
139
143
|
}, z.core.$loose>>;
|
|
140
144
|
}, z.core.$loose>>;
|
|
141
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
142
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
143
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
145
145
|
};
|
|
146
146
|
export declare const firewallPolicyOutputSchema: {
|
|
147
147
|
id: z.ZodString;
|
|
@@ -162,6 +162,10 @@ export declare const firewallPolicyOutputSchema: {
|
|
|
162
162
|
}, z.core.$loose>>;
|
|
163
163
|
};
|
|
164
164
|
export declare const listFirewallPoliciesOutputSchema: {
|
|
165
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
165
169
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
166
170
|
id: z.ZodString;
|
|
167
171
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -180,10 +184,6 @@ export declare const listFirewallPoliciesOutputSchema: {
|
|
|
180
184
|
origin: z.ZodOptional<z.ZodString>;
|
|
181
185
|
}, z.core.$loose>>;
|
|
182
186
|
}, z.core.$loose>>;
|
|
183
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
184
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
186
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
187
187
|
};
|
|
188
188
|
export declare const firewallPolicyOrderingOutputSchema: {
|
|
189
189
|
orderedFirewallPolicyIds: z.ZodOptional<z.ZodObject<{
|
|
@@ -207,6 +207,10 @@ export declare const aclRuleOutputSchema: {
|
|
|
207
207
|
}, z.core.$loose>>;
|
|
208
208
|
};
|
|
209
209
|
export declare const listAclRulesOutputSchema: {
|
|
210
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
210
214
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
211
215
|
id: z.ZodString;
|
|
212
216
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -222,10 +226,6 @@ export declare const listAclRulesOutputSchema: {
|
|
|
222
226
|
origin: z.ZodOptional<z.ZodString>;
|
|
223
227
|
}, z.core.$loose>>;
|
|
224
228
|
}, z.core.$loose>>;
|
|
225
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
226
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
227
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
228
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
229
229
|
};
|
|
230
230
|
export declare const aclRuleOrderingOutputSchema: {
|
|
231
231
|
orderedAclRuleIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -240,6 +240,10 @@ export declare const switchStackOutputSchema: {
|
|
|
240
240
|
}, z.core.$loose>>;
|
|
241
241
|
};
|
|
242
242
|
export declare const listSwitchStacksOutputSchema: {
|
|
243
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
243
247
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
244
248
|
id: z.ZodString;
|
|
245
249
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -249,10 +253,6 @@ export declare const listSwitchStacksOutputSchema: {
|
|
|
249
253
|
origin: z.ZodOptional<z.ZodString>;
|
|
250
254
|
}, z.core.$loose>>;
|
|
251
255
|
}, z.core.$loose>>;
|
|
252
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
253
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
254
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
255
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
256
256
|
};
|
|
257
257
|
export declare const mcLagDomainOutputSchema: {
|
|
258
258
|
id: z.ZodString;
|
|
@@ -264,6 +264,10 @@ export declare const mcLagDomainOutputSchema: {
|
|
|
264
264
|
}, z.core.$loose>>;
|
|
265
265
|
};
|
|
266
266
|
export declare const listMcLagDomainsOutputSchema: {
|
|
267
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
268
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
267
271
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
268
272
|
id: z.ZodString;
|
|
269
273
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -273,10 +277,6 @@ export declare const listMcLagDomainsOutputSchema: {
|
|
|
273
277
|
origin: z.ZodOptional<z.ZodString>;
|
|
274
278
|
}, z.core.$loose>>;
|
|
275
279
|
}, z.core.$loose>>;
|
|
276
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
277
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
278
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
279
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
280
280
|
};
|
|
281
281
|
export declare const lagOutputSchema: {
|
|
282
282
|
id: z.ZodString;
|
|
@@ -290,6 +290,10 @@ export declare const lagOutputSchema: {
|
|
|
290
290
|
}, z.core.$loose>>;
|
|
291
291
|
};
|
|
292
292
|
export declare const listLagsOutputSchema: {
|
|
293
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
293
297
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
294
298
|
id: z.ZodString;
|
|
295
299
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -301,10 +305,6 @@ export declare const listLagsOutputSchema: {
|
|
|
301
305
|
origin: z.ZodOptional<z.ZodString>;
|
|
302
306
|
}, z.core.$loose>>;
|
|
303
307
|
}, z.core.$loose>>;
|
|
304
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
305
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
306
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
307
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
308
308
|
};
|
|
309
309
|
export declare const dnsPolicyOutputSchema: {
|
|
310
310
|
id: z.ZodString;
|
|
@@ -318,6 +318,10 @@ export declare const dnsPolicyOutputSchema: {
|
|
|
318
318
|
}, z.core.$loose>>;
|
|
319
319
|
};
|
|
320
320
|
export declare const listDnsPoliciesOutputSchema: {
|
|
321
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
321
325
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
322
326
|
id: z.ZodString;
|
|
323
327
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -329,10 +333,6 @@ export declare const listDnsPoliciesOutputSchema: {
|
|
|
329
333
|
origin: z.ZodOptional<z.ZodString>;
|
|
330
334
|
}, z.core.$loose>>;
|
|
331
335
|
}, z.core.$loose>>;
|
|
332
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
333
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
334
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
335
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
336
336
|
};
|
|
337
337
|
export declare const trafficMatchingListOutputSchema: {
|
|
338
338
|
id: z.ZodString;
|
|
@@ -344,6 +344,10 @@ export declare const trafficMatchingListOutputSchema: {
|
|
|
344
344
|
}, z.core.$loose>>;
|
|
345
345
|
};
|
|
346
346
|
export declare const listTrafficMatchingListsOutputSchema: {
|
|
347
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
347
351
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
348
352
|
id: z.ZodString;
|
|
349
353
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -353,16 +357,13 @@ export declare const listTrafficMatchingListsOutputSchema: {
|
|
|
353
357
|
origin: z.ZodOptional<z.ZodString>;
|
|
354
358
|
}, z.core.$loose>>;
|
|
355
359
|
}, z.core.$loose>>;
|
|
360
|
+
};
|
|
361
|
+
export declare const listDevicesOutputSchema: {
|
|
356
362
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
357
363
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
358
364
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
359
365
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
360
|
-
};
|
|
361
|
-
export declare const listDevicesOutputSchema: {
|
|
362
366
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
363
|
-
adoptedAt: z.ZodOptional<z.ZodString>;
|
|
364
|
-
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
365
|
-
interfaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
366
367
|
id: z.ZodString;
|
|
367
368
|
name: z.ZodOptional<z.ZodString>;
|
|
368
369
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -372,13 +373,21 @@ export declare const listDevicesOutputSchema: {
|
|
|
372
373
|
supported: z.ZodOptional<z.ZodBoolean>;
|
|
373
374
|
firmwareVersion: z.ZodOptional<z.ZodString>;
|
|
374
375
|
firmwareUpdatable: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
adoptedAt: z.ZodOptional<z.ZodString>;
|
|
377
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
378
|
+
interfaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
379
|
}, z.core.$loose>>;
|
|
376
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
377
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
378
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
379
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
380
380
|
};
|
|
381
381
|
export declare const getDeviceOutputSchema: {
|
|
382
|
+
id: z.ZodString;
|
|
383
|
+
name: z.ZodOptional<z.ZodString>;
|
|
384
|
+
model: z.ZodOptional<z.ZodString>;
|
|
385
|
+
macAddress: z.ZodOptional<z.ZodString>;
|
|
386
|
+
ipAddress: z.ZodOptional<z.ZodString>;
|
|
387
|
+
state: z.ZodOptional<z.ZodString>;
|
|
388
|
+
supported: z.ZodOptional<z.ZodBoolean>;
|
|
389
|
+
firmwareVersion: z.ZodOptional<z.ZodString>;
|
|
390
|
+
firmwareUpdatable: z.ZodOptional<z.ZodBoolean>;
|
|
382
391
|
adoptedAt: z.ZodOptional<z.ZodString>;
|
|
383
392
|
provisionedAt: z.ZodOptional<z.ZodString>;
|
|
384
393
|
configurationId: z.ZodOptional<z.ZodString>;
|
|
@@ -408,15 +417,6 @@ export declare const getDeviceOutputSchema: {
|
|
|
408
417
|
channel: z.ZodOptional<z.ZodNumber>;
|
|
409
418
|
}, z.core.$loose>>>;
|
|
410
419
|
}, z.core.$loose>>;
|
|
411
|
-
id: z.ZodString;
|
|
412
|
-
name: z.ZodOptional<z.ZodString>;
|
|
413
|
-
model: z.ZodOptional<z.ZodString>;
|
|
414
|
-
macAddress: z.ZodOptional<z.ZodString>;
|
|
415
|
-
ipAddress: z.ZodOptional<z.ZodString>;
|
|
416
|
-
state: z.ZodOptional<z.ZodString>;
|
|
417
|
-
supported: z.ZodOptional<z.ZodBoolean>;
|
|
418
|
-
firmwareVersion: z.ZodOptional<z.ZodString>;
|
|
419
|
-
firmwareUpdatable: z.ZodOptional<z.ZodBoolean>;
|
|
420
420
|
};
|
|
421
421
|
export declare const getDeviceStatisticsOutputSchema: {
|
|
422
422
|
uptimeSec: z.ZodOptional<z.ZodNumber>;
|
|
@@ -439,6 +439,10 @@ export declare const getDeviceStatisticsOutputSchema: {
|
|
|
439
439
|
}, z.core.$loose>>;
|
|
440
440
|
};
|
|
441
441
|
export declare const listClientsOutputSchema: {
|
|
442
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
443
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
444
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
442
446
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
443
447
|
id: z.ZodString;
|
|
444
448
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -451,10 +455,6 @@ export declare const listClientsOutputSchema: {
|
|
|
451
455
|
type: z.ZodOptional<z.ZodString>;
|
|
452
456
|
}, z.core.$loose>>;
|
|
453
457
|
}, z.core.$loose>>;
|
|
454
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
455
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
456
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
457
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
458
458
|
};
|
|
459
459
|
export declare const getClientOutputSchema: {
|
|
460
460
|
id: z.ZodString;
|
|
@@ -469,6 +469,10 @@ export declare const getClientOutputSchema: {
|
|
|
469
469
|
}, z.core.$loose>>;
|
|
470
470
|
};
|
|
471
471
|
export declare const listWifiOutputSchema: {
|
|
472
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
473
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
474
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
475
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
472
476
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
473
477
|
id: z.ZodString;
|
|
474
478
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -485,10 +489,6 @@ export declare const listWifiOutputSchema: {
|
|
|
485
489
|
origin: z.ZodOptional<z.ZodString>;
|
|
486
490
|
}, z.core.$loose>>;
|
|
487
491
|
}, z.core.$loose>>;
|
|
488
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
489
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
490
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
491
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
492
492
|
};
|
|
493
493
|
export declare const getWifiOutputSchema: {
|
|
494
494
|
id: z.ZodString;
|
|
@@ -507,16 +507,20 @@ export declare const getWifiOutputSchema: {
|
|
|
507
507
|
}, z.core.$loose>>;
|
|
508
508
|
};
|
|
509
509
|
export declare const listWansOutputSchema: {
|
|
510
|
+
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
511
|
+
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
510
514
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
511
515
|
id: z.ZodString;
|
|
512
516
|
name: z.ZodOptional<z.ZodString>;
|
|
513
517
|
}, z.core.$loose>>;
|
|
518
|
+
};
|
|
519
|
+
export declare const listVpnServersOutputSchema: {
|
|
514
520
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
515
521
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
516
522
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
517
523
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
518
|
-
};
|
|
519
|
-
export declare const listVpnServersOutputSchema: {
|
|
520
524
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
521
525
|
id: z.ZodString;
|
|
522
526
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -526,22 +530,22 @@ export declare const listVpnServersOutputSchema: {
|
|
|
526
530
|
origin: z.ZodOptional<z.ZodString>;
|
|
527
531
|
}, z.core.$loose>>;
|
|
528
532
|
}, z.core.$loose>>;
|
|
533
|
+
};
|
|
534
|
+
export declare const listVpnTunnelsOutputSchema: {
|
|
529
535
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
530
536
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
531
537
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
532
538
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
533
|
-
};
|
|
534
|
-
export declare const listVpnTunnelsOutputSchema: {
|
|
535
539
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
536
540
|
id: z.ZodString;
|
|
537
541
|
name: z.ZodOptional<z.ZodString>;
|
|
538
542
|
}, z.core.$loose>>;
|
|
543
|
+
};
|
|
544
|
+
export declare const listRadiusProfilesOutputSchema: {
|
|
539
545
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
540
546
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
541
547
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
542
548
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
543
|
-
};
|
|
544
|
-
export declare const listRadiusProfilesOutputSchema: {
|
|
545
549
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
546
550
|
id: z.ZodString;
|
|
547
551
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -549,61 +553,57 @@ export declare const listRadiusProfilesOutputSchema: {
|
|
|
549
553
|
origin: z.ZodOptional<z.ZodString>;
|
|
550
554
|
}, z.core.$loose>>;
|
|
551
555
|
}, z.core.$loose>>;
|
|
556
|
+
};
|
|
557
|
+
export declare const listDeviceTagsOutputSchema: {
|
|
552
558
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
553
559
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
554
560
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
555
561
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
556
|
-
};
|
|
557
|
-
export declare const listDeviceTagsOutputSchema: {
|
|
558
562
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
559
563
|
id: z.ZodString;
|
|
560
564
|
name: z.ZodOptional<z.ZodString>;
|
|
561
565
|
deviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
562
566
|
}, z.core.$loose>>;
|
|
567
|
+
};
|
|
568
|
+
export declare const listDpiCategoriesOutputSchema: {
|
|
563
569
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
564
570
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
565
571
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
566
572
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
567
|
-
};
|
|
568
|
-
export declare const listDpiCategoriesOutputSchema: {
|
|
569
573
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
570
574
|
id: z.ZodNumber;
|
|
571
575
|
name: z.ZodOptional<z.ZodString>;
|
|
572
576
|
}, z.core.$loose>>;
|
|
577
|
+
};
|
|
578
|
+
export declare const listDpiApplicationsOutputSchema: {
|
|
573
579
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
574
580
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
575
581
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
576
582
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
577
|
-
};
|
|
578
|
-
export declare const listDpiApplicationsOutputSchema: {
|
|
579
583
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
580
584
|
id: z.ZodNumber;
|
|
581
585
|
name: z.ZodOptional<z.ZodString>;
|
|
582
586
|
}, z.core.$loose>>;
|
|
587
|
+
};
|
|
588
|
+
export declare const listCountriesOutputSchema: {
|
|
583
589
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
584
590
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
585
591
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
586
592
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
587
|
-
};
|
|
588
|
-
export declare const listCountriesOutputSchema: {
|
|
589
593
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
590
594
|
code: z.ZodString;
|
|
591
595
|
name: z.ZodOptional<z.ZodString>;
|
|
592
596
|
}, z.core.$loose>>;
|
|
597
|
+
};
|
|
598
|
+
export declare const listPendingDevicesOutputSchema: {
|
|
593
599
|
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
594
600
|
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
595
601
|
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
596
602
|
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
597
|
-
};
|
|
598
|
-
export declare const listPendingDevicesOutputSchema: {
|
|
599
603
|
readonly data: z.ZodArray<z.ZodObject<{
|
|
600
604
|
macAddress: z.ZodOptional<z.ZodString>;
|
|
601
605
|
model: z.ZodOptional<z.ZodString>;
|
|
602
606
|
ipAddress: z.ZodOptional<z.ZodString>;
|
|
603
607
|
firmwareVersion: z.ZodOptional<z.ZodString>;
|
|
604
608
|
}, z.core.$loose>>;
|
|
605
|
-
readonly offset: z.ZodOptional<z.ZodNumber>;
|
|
606
|
-
readonly limit: z.ZodOptional<z.ZodNumber>;
|
|
607
|
-
readonly count: z.ZodOptional<z.ZodNumber>;
|
|
608
|
-
readonly totalCount: z.ZodOptional<z.ZodNumber>;
|
|
609
609
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owine/unifi-network-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "MCP server for the UniFi Network 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.17.0",
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/owine/unifi-network-mcp.git"
|
|
@@ -43,11 +43,12 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/js": "10.0.1",
|
|
45
45
|
"@types/node": "24.13.3",
|
|
46
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
46
47
|
"@vitest/coverage-v8": "4.1.10",
|
|
47
|
-
"eslint": "10.
|
|
48
|
+
"eslint": "10.8.0",
|
|
48
49
|
"lefthook": "2.1.10",
|
|
49
|
-
"typescript": "6.0.
|
|
50
|
-
"typescript-eslint": "8.
|
|
50
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
51
|
+
"typescript-eslint": "8.65.0",
|
|
51
52
|
"vitest": "4.1.10"
|
|
52
53
|
}
|
|
53
54
|
}
|