@usex/mikrotik-mcp 6.14.0 → 6.16.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.
Files changed (67) hide show
  1. package/dist/cli.js +3366 -527
  2. package/dist/index.d.ts +115 -101
  3. package/dist/index.js +24 -10
  4. package/dist/shared/cli-8hn9vb7c.js +115 -0
  5. package/dist/shared/{cli-rcx7e9h4.js → cli-8j89p9xc.js} +4 -2
  6. package/dist/shared/cli-kb8zq3rx.js +9 -0
  7. package/dist/shared/{cli-w6km895r.js → cli-p7bt2fa3.js} +1 -1
  8. package/dist/shared/{cli-4xzq2n6j.js → cli-rmtax5nd.js} +1 -1
  9. package/dist/shared/{cli-r1ng5cjy.js → cli-rs00sr7q.js} +1 -1
  10. package/dist/shared/{cli-1vn2bbpy.js → cli-vf68spka.js} +5115 -1935
  11. package/dist/shared/cli-znnh8xtd.js +15 -0
  12. package/dist/shared/{library-1swafsvq.js → library-m6wrdeqa.js} +1 -1
  13. package/dist/shared/{library-0qn06vwr.js → library-nbtg49vh.js} +1 -1
  14. package/dist/shared/{library-1nhmbsv0.js → library-rc32xwsh.js} +1 -1
  15. package/dist/shared/{library-2wd7mt3g.js → library-rrzzp9qg.js} +4786 -1581
  16. package/dist/shared/{library-jpmbkkz7.js → library-s31n8vk4.js} +1 -1
  17. package/dist/ui/observability.html +296 -124
  18. package/package.json +25 -17
  19. package/schemas/README.md +5 -5
  20. package/schemas/config.schema.json +288 -6
  21. package/schemas/devtools-manifest.json +301 -5
  22. package/schemas/tool-catalog.json +1116 -42
  23. package/schemas/tools/add_alert_rule.json +1 -1
  24. package/schemas/tools/apply_config_template.json +56 -0
  25. package/schemas/tools/apply_wireless_to_wifi_migration.json +30 -0
  26. package/schemas/tools/deploy_container_stack.json +112 -0
  27. package/schemas/tools/design_zone_firewall.json +81 -0
  28. package/schemas/tools/discover_unmanaged_devices.json +49 -0
  29. package/schemas/tools/enrol_device.json +56 -0
  30. package/schemas/tools/expire_wireguard_users.json +19 -0
  31. package/schemas/tools/export_logs.json +2 -1
  32. package/schemas/tools/find_tools.json +1 -1
  33. package/schemas/tools/firmware_check.json +0 -5
  34. package/schemas/tools/firmware_post_upgrade.json +29 -0
  35. package/schemas/tools/firmware_repo_fetch.json +30 -0
  36. package/schemas/tools/firmware_repo_list.json +7 -0
  37. package/schemas/tools/firmware_stage_from_repo.json +19 -0
  38. package/schemas/tools/follow_ipv6_prefix.json +51 -0
  39. package/schemas/tools/generate_hotspot_vouchers.json +37 -1
  40. package/schemas/tools/get_container_logs.json +20 -0
  41. package/schemas/tools/get_logs.json +2 -1
  42. package/schemas/tools/get_logs_by_severity.json +2 -1
  43. package/schemas/tools/get_logs_by_topic.json +2 -1
  44. package/schemas/tools/get_security_logs.json +2 -1
  45. package/schemas/tools/get_system_events.json +2 -1
  46. package/schemas/tools/list_config_templates.json +7 -0
  47. package/schemas/tools/list_voucher_batches.json +7 -0
  48. package/schemas/tools/list_wireguard_users.json +12 -0
  49. package/schemas/tools/onboard_wireguard_user.json +17 -2
  50. package/schemas/tools/plan_wireless_to_wifi_migration.json +14 -0
  51. package/schemas/tools/protect_hotspot_login.json +32 -0
  52. package/schemas/tools/remove_config_template.json +14 -0
  53. package/schemas/tools/remove_threat_feed.json +1 -0
  54. package/schemas/tools/remove_voucher_batch.json +24 -0
  55. package/schemas/tools/remove_zone_firewall.json +14 -0
  56. package/schemas/tools/revoke_wireguard_user.json +1 -0
  57. package/schemas/tools/run_routeros_command.json +6 -1
  58. package/schemas/tools/save_config_template.json +20 -0
  59. package/schemas/tools/search_logs.json +2 -1
  60. package/schemas/tools/subscribe_threat_feed.json +1 -0
  61. package/schemas/tools/test_alert_channel.json +1 -1
  62. package/schemas/tools/unfollow_ipv6_prefix.json +18 -0
  63. package/schemas/tools/unprotect_hotspot_login.json +7 -0
  64. package/schemas/tools/update_alert_rule.json +1 -1
  65. package/schemas/tools/upgrade_container_image.json +29 -0
  66. package/schemas/tools/validate_routeros_command.json +13 -0
  67. package/scripts/service.ts +242 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usex/mikrotik-mcp",
3
- "version": "6.14.0",
3
+ "version": "6.16.0",
4
4
  "description": "MCP server for MikroTik RouterOS — 780+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
5
5
  "keywords": [
6
6
  "ai",
@@ -57,6 +57,7 @@
57
57
  "build:mcp": "bun run --bun scripts/build-mcpb.ts",
58
58
  "build:mcp:all": "bun run --bun scripts/build-mcpb.ts --all",
59
59
  "dev": "bunup --watch",
60
+ "dev:all": "bun run scripts/dev-all.ts",
60
61
  "dev:dashboard": "bunx vp dev -c ui/vite.observability.config.ts",
61
62
  "dev:tools": "bunx vp dev -c ui/vite.observability.config.ts --mode devtools",
62
63
  "docker:publish": "bun --no-env-file scripts/publish-docker.ts",
@@ -66,7 +67,7 @@
66
67
  "gen:docs": "bun run --bun scripts/gen-tool-docs.ts && vp fmt --write docs/content/docs/reference docs/content/docs/guides/config-schema.md docs/content/docs/guides/prompt-catalog.md",
67
68
  "gen": "bun run --bun gen:schemas && bun run --bun gen:docs",
68
69
  "start": "bun run --bun src/cli.ts serve",
69
- "start:dev": "bun run --watch --bun src/cli.ts serve",
70
+ "start:dev": "bun run --bun scripts/start-dev.ts",
70
71
  "discover": "bun run --bun scripts/discover-macs.ts",
71
72
  "flags:download": "bun run --bun scripts/download-flags.ts",
72
73
  "chat": "bunx mcp-chat --server \"./dist/cli.js serve\"",
@@ -104,24 +105,26 @@
104
105
  "@modelcontextprotocol/core": "^2.4.0",
105
106
  "@modelcontextprotocol/ext-apps": "^2.0.4",
106
107
  "@modelcontextprotocol/sdk": "^1.32.2",
108
+ "@ternlight/base": "^0.1.1",
107
109
  "@tikoci/centrs": "^0.1.10",
108
110
  "figlet": "^1.12.0",
109
111
  "gradient-string": "^3.0.0",
110
112
  "ipaddr.js": "^2.5.0",
113
+ "qrcode-generator": "^2.0.4",
111
114
  "ssh2": "^1.17.0",
112
115
  "zod": "^4.6.7"
113
116
  },
114
117
  "devDependencies": {
115
118
  "@anthropic-ai/mcpb": "^2.1.2",
116
- "@devframes/hub": "1.3.5",
117
- "@devframes/hub-ui": "1.3.5",
118
- "@devframes/plugin-a11y": "1.3.5",
119
- "@devframes/plugin-a11y--assets": "1.3.5",
120
- "@devframes/plugin-data-inspector": "1.3.5",
121
- "@devframes/plugin-data-inspector--assets": "1.3.5",
122
- "@devframes/plugin-inspect": "1.3.5",
123
- "@devframes/plugin-inspect--assets": "1.3.5",
124
- "@devframes/vite": "1.3.5",
119
+ "@devframes/hub": "1.4.0",
120
+ "@devframes/hub-ui": "1.4.0",
121
+ "@devframes/plugin-a11y": "1.4.0",
122
+ "@devframes/plugin-a11y--assets": "1.4.0",
123
+ "@devframes/plugin-data-inspector": "1.4.0",
124
+ "@devframes/plugin-data-inspector--assets": "1.4.0",
125
+ "@devframes/plugin-inspect": "1.4.0",
126
+ "@devframes/plugin-inspect--assets": "1.4.0",
127
+ "@devframes/vite": "1.4.0",
125
128
  "@paper-design/shaders-react": "^0.0.82",
126
129
  "@resvg/resvg-js": "^2.6.2",
127
130
  "@tailwindcss/vite": "^4.3.5",
@@ -134,26 +137,31 @@
134
137
  "@types/ssh2": "^1.15.6",
135
138
  "@types/update-notifier": "^6.0.9",
136
139
  "@typescript/native": "npm:typescript@^7.0.2",
137
- "@vitest/coverage-v8": "5.1.0",
138
- "@vitest/ui": "5.1.0",
140
+ "@vitest/coverage-v8": "5.1.1",
141
+ "@vitest/ui": "5.1.1",
142
+ "@xterm/addon-fit": "0.11.0",
143
+ "@xterm/xterm": "6.0.0",
144
+ "animejs": "^4.5.0",
139
145
  "bunup": "^0.16.32",
140
146
  "class-variance-authority": "^0.7.1",
141
147
  "clsx": "^2.1.1",
142
148
  "date-fns": "^4.4.0",
143
- "devframe": "1.3.5",
149
+ "devframe": "1.4.0",
150
+ "dockview-react": "8.9.1",
144
151
  "gsap": "^3.15.1",
145
152
  "happy-dom": "^21.0.4",
146
153
  "lenis": "^1.3.27",
147
154
  "license-checker": "^25.0.1",
148
- "lucide-react": "^1.73.0",
155
+ "lucide-react": "^1.76.0",
156
+ "mcp-remote": "0.16.7",
149
157
  "motion": "^14.14.0",
150
- "qrcode-generator": "^2.0.4",
151
158
  "radix-ui": "^1.8.1",
152
159
  "react": "^19.3.1",
153
160
  "react-day-picker": "^10.0.2",
154
161
  "react-dom": "^19.3.1",
155
- "recharts": "^3.10.1",
162
+ "recharts": "^3.11.0",
156
163
  "release-it": "^21.1.2",
164
+ "shadcn": "4.23.0",
157
165
  "shiki": "^4.6.0",
158
166
  "skullet": "^0.0.3",
159
167
  "sonner": "^2.0.8",
package/schemas/README.md CHANGED
@@ -4,11 +4,11 @@ Machine-readable JSON Schemas for `@usex/mikrotik-mcp`, **generated** from the
4
4
  TypeScript source by `scripts/gen-schemas.ts` (`bun run gen:schemas`). Do not
5
5
  edit by hand — regenerate instead.
6
6
 
7
- | File | Contents |
8
- | -------------------- | ------------------------------------------------------------------------------------------ |
9
- | `config.schema.json` | The runtime configuration object (env vars / CLI flags). |
10
- | `tool-catalog.json` | Every one of the 983 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
11
- | `tools/<name>.json` | The input JSON Schema for a single tool. |
7
+ | File | Contents |
8
+ | -------------------- | ------------------------------------------------------------------------------------------- |
9
+ | `config.schema.json` | The runtime configuration object (env vars / CLI flags). |
10
+ | `tool-catalog.json` | Every one of the 1009 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
11
+ | `tools/<name>.json` | The input JSON Schema for a single tool. |
12
12
 
13
13
  `risk` is derived from the MCP tool annotations:
14
14
  `read` · `write` · `write-idempotent` · `destructive` · `dangerous`.
@@ -160,6 +160,21 @@
160
160
  "keyPassphrase": {
161
161
  "type": "string"
162
162
  },
163
+ "passwordFrom": {
164
+ "type": "string",
165
+ "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
166
+ },
167
+ "keyPassphraseFrom": {
168
+ "type": "string",
169
+ "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
170
+ },
171
+ "sshAgent": {
172
+ "type": "boolean"
173
+ },
174
+ "hostKeySha256": {
175
+ "type": "string",
176
+ "pattern": "^(?:SHA256:)?[A-Za-z0-9+/]{43}=?$"
177
+ },
163
178
  "timeoutMs": {
164
179
  "default": 10000,
165
180
  "type": "integer",
@@ -261,8 +276,10 @@
261
276
  "allowedHosts": "",
262
277
  "allowedOrigins": "",
263
278
  "corsOrigins": "",
279
+ "sessionIdleTimeout": 86400000,
264
280
  "toolPageSize": 0,
265
- "toolSurface": "full",
281
+ "toolSurface": "auto",
282
+ "semanticSearch": true,
266
283
  "coreTools": "",
267
284
  "appViews": false,
268
285
  "capabilityGating": "annotate"
@@ -296,6 +313,12 @@
296
313
  "default": "",
297
314
  "type": "string"
298
315
  },
316
+ "sessionIdleTimeout": {
317
+ "default": 86400000,
318
+ "type": "integer",
319
+ "exclusiveMinimum": 0,
320
+ "maximum": 9007199254740991
321
+ },
299
322
  "toolPageSize": {
300
323
  "default": 0,
301
324
  "type": "integer",
@@ -303,9 +326,13 @@
303
326
  "maximum": 9007199254740991
304
327
  },
305
328
  "toolSurface": {
306
- "default": "full",
329
+ "default": "auto",
307
330
  "type": "string",
308
- "enum": ["full", "core"]
331
+ "enum": ["auto", "full", "core"]
332
+ },
333
+ "semanticSearch": {
334
+ "default": true,
335
+ "type": "boolean"
309
336
  },
310
337
  "coreTools": {
311
338
  "default": "",
@@ -328,8 +355,10 @@
328
355
  "allowedHosts",
329
356
  "allowedOrigins",
330
357
  "corsOrigins",
358
+ "sessionIdleTimeout",
331
359
  "toolPageSize",
332
360
  "toolSurface",
361
+ "semanticSearch",
333
362
  "coreTools",
334
363
  "appViews",
335
364
  "capabilityGating"
@@ -381,7 +410,9 @@
381
410
  "captureBody": true,
382
411
  "redactInput": false,
383
412
  "maxBodyBytes": 16384,
384
- "feedLimit": 200
413
+ "feedLimit": 200,
414
+ "terminal": true,
415
+ "files": true
385
416
  },
386
417
  "type": "object",
387
418
  "properties": {
@@ -431,6 +462,14 @@
431
462
  "type": "integer",
432
463
  "exclusiveMinimum": 0,
433
464
  "maximum": 10000
465
+ },
466
+ "terminal": {
467
+ "default": true,
468
+ "type": "boolean"
469
+ },
470
+ "files": {
471
+ "default": true,
472
+ "type": "boolean"
434
473
  }
435
474
  },
436
475
  "required": [
@@ -442,7 +481,9 @@
442
481
  "captureBody",
443
482
  "redactInput",
444
483
  "maxBodyBytes",
445
- "feedLimit"
484
+ "feedLimit",
485
+ "terminal",
486
+ "files"
446
487
  ],
447
488
  "additionalProperties": false
448
489
  },
@@ -498,6 +539,54 @@
498
539
  "required": ["url"],
499
540
  "additionalProperties": false
500
541
  },
542
+ "telegram": {
543
+ "type": "object",
544
+ "properties": {
545
+ "token": {
546
+ "type": "string",
547
+ "minLength": 1
548
+ },
549
+ "chatId": {
550
+ "type": "string",
551
+ "minLength": 1
552
+ }
553
+ },
554
+ "required": ["token", "chatId"],
555
+ "additionalProperties": false
556
+ },
557
+ "email": {
558
+ "type": "object",
559
+ "properties": {
560
+ "host": {
561
+ "type": "string",
562
+ "minLength": 1
563
+ },
564
+ "port": {
565
+ "type": "integer",
566
+ "exclusiveMinimum": 0,
567
+ "maximum": 9007199254740991
568
+ },
569
+ "secure": {
570
+ "type": "boolean"
571
+ },
572
+ "username": {
573
+ "type": "string"
574
+ },
575
+ "password": {
576
+ "type": "string"
577
+ },
578
+ "from": {
579
+ "type": "string",
580
+ "minLength": 3
581
+ },
582
+ "to": {
583
+ "type": "string",
584
+ "minLength": 3
585
+ }
586
+ },
587
+ "required": ["host", "from", "to"],
588
+ "additionalProperties": false
589
+ },
501
590
  "webhook": {
502
591
  "type": "object",
503
592
  "properties": {
@@ -534,11 +623,193 @@
534
623
  "type": "integer",
535
624
  "exclusiveMinimum": 0,
536
625
  "maximum": 9007199254740991
626
+ },
627
+ "digest": {
628
+ "type": "object",
629
+ "properties": {
630
+ "enabled": {
631
+ "default": false,
632
+ "type": "boolean"
633
+ },
634
+ "hour": {
635
+ "default": 8,
636
+ "type": "integer",
637
+ "minimum": 0,
638
+ "maximum": 23
639
+ },
640
+ "channels": {
641
+ "default": [],
642
+ "type": "array",
643
+ "items": {
644
+ "type": "string",
645
+ "enum": ["slack", "discord", "ntfy", "telegram", "email", "webhook", "mcp"]
646
+ }
647
+ }
648
+ },
649
+ "required": ["enabled", "hour", "channels"],
650
+ "additionalProperties": false
537
651
  }
538
652
  },
539
653
  "required": ["enabled", "rules", "channels", "maxHistory"],
540
654
  "additionalProperties": false
541
655
  },
656
+ "audit": {
657
+ "type": "object",
658
+ "properties": {
659
+ "syslog": {
660
+ "type": "object",
661
+ "properties": {
662
+ "host": {
663
+ "type": "string",
664
+ "minLength": 1
665
+ },
666
+ "port": {
667
+ "default": 514,
668
+ "type": "integer",
669
+ "exclusiveMinimum": 0,
670
+ "maximum": 9007199254740991
671
+ },
672
+ "protocol": {
673
+ "default": "udp",
674
+ "type": "string",
675
+ "enum": ["udp", "tcp"]
676
+ },
677
+ "facility": {
678
+ "default": 13,
679
+ "type": "integer",
680
+ "minimum": 0,
681
+ "maximum": 23
682
+ },
683
+ "appName": {
684
+ "default": "mikrotik-mcp",
685
+ "type": "string"
686
+ },
687
+ "includeInput": {
688
+ "default": false,
689
+ "type": "boolean"
690
+ },
691
+ "writesOnly": {
692
+ "default": false,
693
+ "type": "boolean"
694
+ }
695
+ },
696
+ "required": [
697
+ "host",
698
+ "port",
699
+ "protocol",
700
+ "facility",
701
+ "appName",
702
+ "includeInput",
703
+ "writesOnly"
704
+ ],
705
+ "additionalProperties": false
706
+ }
707
+ },
708
+ "additionalProperties": false
709
+ },
710
+ "approvals": {
711
+ "type": "object",
712
+ "properties": {
713
+ "enabled": {
714
+ "default": false,
715
+ "type": "boolean"
716
+ },
717
+ "minRisk": {
718
+ "default": "DESTRUCTIVE",
719
+ "type": "string",
720
+ "enum": ["WRITE", "DESTRUCTIVE", "DANGEROUS"]
721
+ },
722
+ "ttlMinutes": {
723
+ "default": 30,
724
+ "type": "integer",
725
+ "minimum": 1,
726
+ "maximum": 1440
727
+ },
728
+ "notify": {
729
+ "default": [],
730
+ "type": "array",
731
+ "items": {
732
+ "type": "string",
733
+ "enum": ["slack", "discord", "ntfy", "telegram", "email", "webhook", "mcp"]
734
+ }
735
+ }
736
+ },
737
+ "required": ["enabled", "minRisk", "ttlMinutes", "notify"],
738
+ "additionalProperties": false
739
+ },
740
+ "vouchers": {
741
+ "type": "object",
742
+ "properties": {
743
+ "issue": {
744
+ "type": "object",
745
+ "properties": {
746
+ "token": {
747
+ "type": "string",
748
+ "minLength": 16
749
+ },
750
+ "tokenFrom": {
751
+ "type": "string",
752
+ "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
753
+ },
754
+ "device": {
755
+ "type": "string"
756
+ },
757
+ "profile": {
758
+ "type": "string"
759
+ },
760
+ "uptimeLimit": {
761
+ "type": "string",
762
+ "pattern": "^\\d+[wdhms](?:\\d+[wdhms])*$"
763
+ },
764
+ "batch": {
765
+ "default": "sold",
766
+ "type": "string",
767
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,30}$"
768
+ },
769
+ "codePrefix": {
770
+ "default": "g",
771
+ "type": "string",
772
+ "pattern": "^[A-Za-z0-9]{0,6}$"
773
+ },
774
+ "maxPerMinute": {
775
+ "default": 30,
776
+ "type": "integer",
777
+ "minimum": 1,
778
+ "maximum": 600
779
+ }
780
+ },
781
+ "required": ["batch", "codePrefix", "maxPerMinute"],
782
+ "additionalProperties": false
783
+ }
784
+ },
785
+ "additionalProperties": false
786
+ },
787
+ "gitMirror": {
788
+ "type": "object",
789
+ "properties": {
790
+ "dir": {
791
+ "type": "string",
792
+ "minLength": 1
793
+ },
794
+ "commit": {
795
+ "default": true,
796
+ "type": "boolean"
797
+ },
798
+ "push": {
799
+ "default": false,
800
+ "type": "boolean"
801
+ },
802
+ "sortSections": {
803
+ "default": false,
804
+ "type": "boolean"
805
+ },
806
+ "author": {
807
+ "type": "string"
808
+ }
809
+ },
810
+ "required": ["dir", "commit", "push", "sortSections"],
811
+ "additionalProperties": false
812
+ },
542
813
  "flows": {
543
814
  "default": {
544
815
  "enabled": false,
@@ -811,6 +1082,10 @@
811
1082
  "default": false,
812
1083
  "type": "boolean"
813
1084
  },
1085
+ "verifyWrites": {
1086
+ "default": true,
1087
+ "type": "boolean"
1088
+ },
814
1089
  "access": {
815
1090
  "default": {
816
1091
  "enabled": false,
@@ -930,6 +1205,11 @@
930
1205
  "disableUpdateCheck": {
931
1206
  "default": false,
932
1207
  "type": "boolean"
1208
+ },
1209
+ "logLevel": {
1210
+ "default": "error",
1211
+ "type": "string",
1212
+ "enum": ["error", "warn", "info", "debug"]
933
1213
  }
934
1214
  },
935
1215
  "required": [
@@ -944,10 +1224,12 @@
944
1224
  "attacks",
945
1225
  "ssh",
946
1226
  "readOnly",
1227
+ "verifyWrites",
947
1228
  "access",
948
1229
  "tools",
949
1230
  "memory",
950
- "disableUpdateCheck"
1231
+ "disableUpdateCheck",
1232
+ "logLevel"
951
1233
  ],
952
1234
  "additionalProperties": false
953
1235
  }