@usex/mikrotik-mcp 3.5.0 → 3.7.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 (42) hide show
  1. package/dist/cli.js +4027 -2098
  2. package/dist/index.js +4023 -2094
  3. package/dist/ui/observability.html +2 -2
  4. package/package.json +1 -1
  5. package/schemas/README.md +1 -1
  6. package/schemas/tool-catalog.json +1539 -159
  7. package/schemas/tools/add_dhcp_client.json +33 -0
  8. package/schemas/tools/apply_traffic_shaping.json +48 -0
  9. package/schemas/tools/audit_certificate_expiry.json +16 -0
  10. package/schemas/tools/audit_firewall_hardening.json +7 -0
  11. package/schemas/tools/build_guest_hotspot.json +48 -0
  12. package/schemas/tools/build_wireguard_mesh.json +79 -0
  13. package/schemas/tools/design_network_segment.json +65 -0
  14. package/schemas/tools/force_cloud_update.json +7 -0
  15. package/schemas/tools/forecast_link_saturation.json +23 -0
  16. package/schemas/tools/forward_port.json +45 -0
  17. package/schemas/tools/generate_hotspot_vouchers.json +33 -0
  18. package/schemas/tools/get_dhcp_client.json +13 -0
  19. package/schemas/tools/get_ip_cloud.json +7 -0
  20. package/schemas/tools/harden_firewall.json +104 -0
  21. package/schemas/tools/list_dhcp_clients.json +12 -0
  22. package/schemas/tools/onboard_wireguard_user.json +39 -0
  23. package/schemas/tools/remove_dhcp_client.json +12 -0
  24. package/schemas/tools/remove_firewall_hardening.json +7 -0
  25. package/schemas/tools/remove_threat_feed.json +13 -0
  26. package/schemas/tools/remove_time_policy.json +13 -0
  27. package/schemas/tools/renew_dhcp_client.json +17 -0
  28. package/schemas/tools/request_letsencrypt_certificate.json +13 -0
  29. package/schemas/tools/revoke_wireguard_user.json +13 -0
  30. package/schemas/tools/run_failover_drill.json +33 -0
  31. package/schemas/tools/set_dhcp_client.json +24 -0
  32. package/schemas/tools/set_ip_cloud.json +16 -0
  33. package/schemas/tools/set_ip_cloud_advanced.json +13 -0
  34. package/schemas/tools/set_time_policy.json +47 -0
  35. package/schemas/tools/setup_port_knock.json +39 -0
  36. package/schemas/tools/setup_wan_failover.json +36 -0
  37. package/schemas/tools/setup_wan_loadbalance.json +32 -0
  38. package/schemas/tools/subscribe_threat_feed.json +37 -0
  39. package/schemas/tools/test_ssh_from_device.json +28 -0
  40. package/schemas/tools/test_ssh_to_device.json +7 -0
  41. package/schemas/tools/test_ssh_to_host.json +38 -0
  42. package/schemas/tools/tune_wifi_channel.json +23 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "request_letsencrypt_certificate",
4
+ "type": "object",
5
+ "properties": {
6
+ "dns_name": {
7
+ "type": "string",
8
+ "description": "Public DNS name that resolves to this router, e.g. 'vpn.example.com'"
9
+ }
10
+ },
11
+ "required": ["dns_name"],
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "revoke_wireguard_user",
4
+ "type": "object",
5
+ "properties": {
6
+ "user": {
7
+ "type": "string",
8
+ "description": "The user label used at onboarding"
9
+ }
10
+ },
11
+ "required": ["user"],
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "run_failover_drill",
4
+ "type": "object",
5
+ "properties": {
6
+ "target_type": {
7
+ "default": "interface",
8
+ "type": "string",
9
+ "enum": ["interface", "route"]
10
+ },
11
+ "target": {
12
+ "type": "string",
13
+ "description": "Interface name (e.g. 'ether1-wan') or, for route, a find expression / .id"
14
+ },
15
+ "verify_host": {
16
+ "type": "string",
17
+ "description": "Host to ping during the outage to confirm the backup path, e.g. '8.8.8.8'"
18
+ },
19
+ "ping_count": {
20
+ "default": 5,
21
+ "type": "integer",
22
+ "minimum": 1,
23
+ "maximum": 50
24
+ },
25
+ "confirm": {
26
+ "default": false,
27
+ "description": "Must be true to actually run the drill",
28
+ "type": "boolean"
29
+ }
30
+ },
31
+ "required": ["target_type", "target", "verify_host", "ping_count", "confirm"],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "set_dhcp_client",
4
+ "type": "object",
5
+ "properties": {
6
+ "interface": {
7
+ "type": "string"
8
+ },
9
+ "add_default_route": {
10
+ "type": "boolean"
11
+ },
12
+ "use_peer_dns": {
13
+ "type": "boolean"
14
+ },
15
+ "use_peer_ntp": {
16
+ "type": "boolean"
17
+ },
18
+ "disabled": {
19
+ "type": "boolean"
20
+ }
21
+ },
22
+ "required": ["interface"],
23
+ "additionalProperties": false
24
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "set_ip_cloud",
4
+ "type": "object",
5
+ "properties": {
6
+ "ddns_enabled": {
7
+ "description": "Enable (true) or disable (false) the DDNS name",
8
+ "type": "boolean"
9
+ },
10
+ "update_time": {
11
+ "description": "Also sync the router clock from the cloud",
12
+ "type": "boolean"
13
+ }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "set_ip_cloud_advanced",
4
+ "type": "object",
5
+ "properties": {
6
+ "use_local_address": {
7
+ "type": "boolean",
8
+ "description": "Publish the local address (true) instead of the public address (false)"
9
+ }
10
+ },
11
+ "required": ["use_local_address"],
12
+ "additionalProperties": false
13
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "set_time_policy",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "description": "Policy id, e.g. 'kids-bedtime'"
9
+ },
10
+ "list": {
11
+ "default": "parental-devices",
12
+ "description": "Address-list of the affected devices",
13
+ "type": "string"
14
+ },
15
+ "addresses": {
16
+ "description": "Device IPs to add to the list",
17
+ "type": "array",
18
+ "items": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "block_start": {
23
+ "default": "22:00",
24
+ "description": "Daily cut-off time (HH:MM)",
25
+ "type": "string"
26
+ },
27
+ "block_end": {
28
+ "default": "07:00",
29
+ "description": "Daily restore time (HH:MM)",
30
+ "type": "string"
31
+ },
32
+ "block_domains": {
33
+ "description": "Domains to always block via DNS",
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "apply": {
40
+ "default": false,
41
+ "description": "false = preview (default); true = install",
42
+ "type": "boolean"
43
+ }
44
+ },
45
+ "required": ["name", "list", "block_start", "block_end", "apply"],
46
+ "additionalProperties": false
47
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "setup_port_knock",
4
+ "type": "object",
5
+ "properties": {
6
+ "sequence": {
7
+ "minItems": 2,
8
+ "type": "array",
9
+ "items": {
10
+ "type": "integer",
11
+ "minimum": 1,
12
+ "maximum": 65535
13
+ },
14
+ "description": "Secret knock ports, in order, e.g. [7001, 8002, 9003]"
15
+ },
16
+ "protect_ports": {
17
+ "default": "22,8291,8728",
18
+ "description": "Management ports to hide",
19
+ "type": "string"
20
+ },
21
+ "open_timeout": {
22
+ "default": "1h",
23
+ "description": "How long access stays open after the knock",
24
+ "type": "string"
25
+ },
26
+ "stage_timeout": {
27
+ "default": "10s",
28
+ "description": "Allowed window between consecutive knocks",
29
+ "type": "string"
30
+ },
31
+ "apply": {
32
+ "default": false,
33
+ "description": "false = preview (default); true = install",
34
+ "type": "boolean"
35
+ }
36
+ },
37
+ "required": ["sequence", "protect_ports", "open_timeout", "stage_timeout", "apply"],
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "setup_wan_failover",
4
+ "type": "object",
5
+ "properties": {
6
+ "primary_gateway": {
7
+ "type": "string",
8
+ "description": "Primary WAN gateway IP (or interface name)"
9
+ },
10
+ "backup_gateways": {
11
+ "minItems": 1,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "description": "One or more backup WAN gateways, in failover order"
17
+ },
18
+ "check": {
19
+ "default": "ping",
20
+ "description": "Gateway health-check method",
21
+ "type": "string",
22
+ "enum": ["ping", "arp"]
23
+ },
24
+ "comment_prefix": {
25
+ "default": "wan-failover",
26
+ "type": "string"
27
+ },
28
+ "apply": {
29
+ "default": false,
30
+ "description": "false = preview only (default); true = execute",
31
+ "type": "boolean"
32
+ }
33
+ },
34
+ "required": ["primary_gateway", "backup_gateways", "check", "comment_prefix", "apply"],
35
+ "additionalProperties": false
36
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "setup_wan_loadbalance",
4
+ "type": "object",
5
+ "properties": {
6
+ "gateways": {
7
+ "minItems": 2,
8
+ "type": "array",
9
+ "items": {
10
+ "type": "string"
11
+ },
12
+ "description": "Two or more WAN gateways to balance across"
13
+ },
14
+ "check": {
15
+ "default": "ping",
16
+ "description": "Gateway health-check method",
17
+ "type": "string",
18
+ "enum": ["ping", "arp"]
19
+ },
20
+ "comment": {
21
+ "default": "wan-ecmp",
22
+ "type": "string"
23
+ },
24
+ "apply": {
25
+ "default": false,
26
+ "description": "false = preview only (default); true = execute",
27
+ "type": "boolean"
28
+ }
29
+ },
30
+ "required": ["gateways", "check", "comment", "apply"],
31
+ "additionalProperties": false
32
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "subscribe_threat_feed",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "description": "Short feed id, e.g. 'spamhaus-drop'"
9
+ },
10
+ "url": {
11
+ "type": "string",
12
+ "description": "HTTPS URL of a RouterOS .rsc address-list file"
13
+ },
14
+ "address_list": {
15
+ "default": "threat-blocklist",
16
+ "description": "Address-list to populate",
17
+ "type": "string"
18
+ },
19
+ "interval": {
20
+ "default": "1h",
21
+ "description": "How often to refresh the feed",
22
+ "type": "string"
23
+ },
24
+ "drop": {
25
+ "default": true,
26
+ "description": "Also add a raw drop rule for the address-list",
27
+ "type": "boolean"
28
+ },
29
+ "apply": {
30
+ "default": false,
31
+ "description": "false = preview (default); true = install",
32
+ "type": "boolean"
33
+ }
34
+ },
35
+ "required": ["name", "url", "address_list", "interval", "drop", "apply"],
36
+ "additionalProperties": false
37
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "test_ssh_from_device",
4
+ "type": "object",
5
+ "properties": {
6
+ "host": {
7
+ "type": "string",
8
+ "description": "Remote host the ROUTER should SSH to"
9
+ },
10
+ "port": {
11
+ "default": 22,
12
+ "type": "integer",
13
+ "minimum": 1,
14
+ "maximum": 65535
15
+ },
16
+ "user": {
17
+ "type": "string",
18
+ "description": "Username on the remote host"
19
+ },
20
+ "command": {
21
+ "default": "/system identity print",
22
+ "description": "Command to run on the remote host as the connectivity test",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": ["host", "port", "user", "command"],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "test_ssh_to_device",
4
+ "type": "object",
5
+ "properties": {},
6
+ "additionalProperties": false
7
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "test_ssh_to_host",
4
+ "type": "object",
5
+ "properties": {
6
+ "host": {
7
+ "type": "string",
8
+ "description": "Target IP or hostname"
9
+ },
10
+ "port": {
11
+ "default": 22,
12
+ "type": "integer",
13
+ "minimum": 1,
14
+ "maximum": 65535
15
+ },
16
+ "username": {
17
+ "type": "string"
18
+ },
19
+ "password": {
20
+ "description": "Password auth (omit if using a key)",
21
+ "type": "string"
22
+ },
23
+ "key_path": {
24
+ "description": "Path (on the MCP host) to a private key file",
25
+ "type": "string"
26
+ },
27
+ "key_passphrase": {
28
+ "type": "string"
29
+ },
30
+ "command": {
31
+ "default": "/system identity print",
32
+ "description": "Command to run once connected (a harmless RouterOS read by default)",
33
+ "type": "string"
34
+ }
35
+ },
36
+ "required": ["host", "port", "username", "command"],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "tune_wifi_channel",
4
+ "type": "object",
5
+ "properties": {
6
+ "interface": {
7
+ "type": "string",
8
+ "description": "Wireless interface, e.g. 'wlan1'"
9
+ },
10
+ "duration": {
11
+ "default": "5",
12
+ "description": "Survey duration in seconds",
13
+ "type": "string"
14
+ },
15
+ "apply": {
16
+ "default": false,
17
+ "description": "false = survey & recommend (default); true = set it",
18
+ "type": "boolean"
19
+ }
20
+ },
21
+ "required": ["interface", "duration", "apply"],
22
+ "additionalProperties": false
23
+ }