@usex/mikrotik-mcp 5.20.0 → 5.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usex/mikrotik-mcp",
3
- "version": "5.20.0",
3
+ "version": "5.22.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",
@@ -55,6 +55,7 @@
55
55
  "dev": "bunup --watch",
56
56
  "dev:dashboard": "bunx vp dev -c ui/vite.observability.config.ts",
57
57
  "dev:tools": "bunx vp dev -c ui/vite.observability.config.ts --mode devtools",
58
+ "docker:publish": "bun --no-env-file scripts/publish-docker.ts",
58
59
  "prepack": "bun run build && bun run gen",
59
60
  "auth-check": "bun run --bun src/cli.ts auth-check",
60
61
  "gen:schemas": "bun run --bun scripts/gen-schemas.ts && vp fmt --write schemas",
@@ -81,7 +82,7 @@
81
82
  "test:watch": "vp test",
82
83
  "test:coverage": "vp test --ui --coverage --watch",
83
84
  "release": "release-it",
84
- "test:types": "tsc --noEmit",
85
+ "test:types": "tsc --noEmit && tsc --project scripts/docker-publish/tsconfig.json",
85
86
  "check": "vp check",
86
87
  "lint": "vp lint",
87
88
  "lint:fix": "vp lint --fix",
package/schemas/README.md CHANGED
@@ -7,7 +7,7 @@ edit by hand — regenerate instead.
7
7
  | File | Contents |
8
8
  | -------------------- | ------------------------------------------------------------------------------------------ |
9
9
  | `config.schema.json` | The runtime configuration object (env vars / CLI flags). |
10
- | `tool-catalog.json` | Every one of the 956 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
10
+ | `tool-catalog.json` | Every one of the 960 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
11
11
  | `tools/<name>.json` | The input JSON Schema for a single tool. |
12
12
 
13
13
  `risk` is derived from the MCP tool annotations:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": 1,
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "modules": [
5
5
  {
6
6
  "slug": "client-check",
@@ -91,6 +91,8 @@
91
91
  "tools": [
92
92
  "list_service_routing",
93
93
  "service_routing_inventory",
94
+ "service_routing_address_page",
95
+ "service_routing_traffic",
94
96
  "create_service_routing",
95
97
  "probe_service_routing",
96
98
  "preview_service_routing",
@@ -1368,6 +1370,8 @@
1368
1370
  "description": "OpenVPN servers — legacy single + RouterOS 7.17 multi-server — and clients (`/interface ovpn-*`).",
1369
1371
  "alwaysOn": false,
1370
1372
  "tools": [
1373
+ "list_ovpn_sessions",
1374
+ "disconnect_ovpn_session",
1371
1375
  "get_ovpn_server",
1372
1376
  "set_ovpn_server",
1373
1377
  "add_ovpn_server",
@@ -2456,6 +2460,22 @@
2456
2460
  "requires": null,
2457
2461
  "ui": null
2458
2462
  },
2463
+ {
2464
+ "name": "service_routing_address_page",
2465
+ "module": "service-routing",
2466
+ "group": "System & Ops",
2467
+ "noDevice": false,
2468
+ "requires": null,
2469
+ "ui": null
2470
+ },
2471
+ {
2472
+ "name": "service_routing_traffic",
2473
+ "module": "service-routing",
2474
+ "group": "System & Ops",
2475
+ "noDevice": false,
2476
+ "requires": null,
2477
+ "ui": null
2478
+ },
2459
2479
  {
2460
2480
  "name": "create_service_routing",
2461
2481
  "module": "service-routing",
@@ -7914,6 +7934,26 @@
7914
7934
  "requires": null,
7915
7935
  "ui": null
7916
7936
  },
7937
+ {
7938
+ "name": "list_ovpn_sessions",
7939
+ "module": "openvpn",
7940
+ "group": "VPN & Tunneling",
7941
+ "noDevice": false,
7942
+ "requires": null,
7943
+ "ui": {
7944
+ "resourceUri": "ui://mikrotik/records.html?v=2",
7945
+ "visibility": ["model", "app"],
7946
+ "automatic": true
7947
+ }
7948
+ },
7949
+ {
7950
+ "name": "disconnect_ovpn_session",
7951
+ "module": "openvpn",
7952
+ "group": "VPN & Tunneling",
7953
+ "noDevice": false,
7954
+ "requires": null,
7955
+ "ui": null
7956
+ },
7917
7957
  {
7918
7958
  "name": "get_ovpn_server",
7919
7959
  "module": "openvpn",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "5.20.0",
3
+ "version": "5.22.0",
4
4
  "generated": "by scripts/gen-schemas.ts — do not edit by hand",
5
- "toolCount": 956,
5
+ "toolCount": 960,
6
6
  "tools": [
7
7
  {
8
8
  "name": "create_client_check",
@@ -967,14 +967,14 @@
967
967
  },
968
968
  {
969
969
  "name": "service_routing_inventory",
970
- "title": "Discover Service Routing Exits",
970
+ "title": "Inspect Router Routing Configuration",
971
971
  "risk": "read",
972
972
  "annotations": {
973
973
  "readOnlyHint": true,
974
974
  "idempotentHint": true,
975
975
  "openWorldHint": false
976
976
  },
977
- "description": "Read enabled FIB tables and administrator-approved HTTPS target aliases. A table is not proof of a working path; HTTPS per-exit probes require a matching VRF.",
977
+ "description": "Read live IPv4/IPv6 routes, ordered mangle and routing rules, address lists, tables, VRFs and filter rules independently of saved MCP policies. Includes dynamic/disabled entries, per-section failures and observation timestamps; bounded reads, 20-second cache. Missing data is not zero. Also lists enabled FIB exits and approved HTTPS aliases. Table presence is not path health; HTTPS exit probes require a matching VRF. No router changes.",
978
978
  "inputSchema": {
979
979
  "$schema": "https://json-schema.org/draft/2020-12/schema",
980
980
  "type": "object",
@@ -982,6 +982,59 @@
982
982
  "additionalProperties": false
983
983
  }
984
984
  },
985
+ {
986
+ "name": "service_routing_address_page",
987
+ "title": "Read Routing Address List Page",
988
+ "risk": "read",
989
+ "annotations": {
990
+ "readOnlyHint": true,
991
+ "idempotentHint": true,
992
+ "openWorldHint": false
993
+ },
994
+ "description": "Read the next bounded page of this router's IPv4 or IPv6 address-list members. Use nextOffset from service_routing_inventory or the preceding page. At most 200 rows per request; live lists may change between pages. Read-only, no router changes.",
995
+ "inputSchema": {
996
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
997
+ "type": "object",
998
+ "properties": {
999
+ "family": {
1000
+ "type": "string",
1001
+ "enum": ["ipv4", "ipv6"]
1002
+ },
1003
+ "offset": {
1004
+ "default": 0,
1005
+ "type": "integer",
1006
+ "minimum": 0,
1007
+ "maximum": 1000000
1008
+ }
1009
+ },
1010
+ "required": ["family", "offset"],
1011
+ "additionalProperties": false
1012
+ }
1013
+ },
1014
+ {
1015
+ "name": "service_routing_traffic",
1016
+ "title": "Read Service Routing Traffic",
1017
+ "risk": "read",
1018
+ "annotations": {
1019
+ "readOnlyHint": true,
1020
+ "idempotentHint": true,
1021
+ "openWorldHint": false
1022
+ },
1023
+ "description": "Read the exact active MCP-owned routing mark's client-to-service byte and packet counters for one saved policy. Decimal strings preserve 64-bit totals. Four-second cache; missing, disabled or modified rules are unavailable, not zero. Excludes return/download traffic and does not prove delivery, DNS coverage or billing usage. No reset or router change.",
1024
+ "inputSchema": {
1025
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1026
+ "type": "object",
1027
+ "properties": {
1028
+ "id": {
1029
+ "type": "string",
1030
+ "format": "uuid",
1031
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
1032
+ }
1033
+ },
1034
+ "required": ["id"],
1035
+ "additionalProperties": false
1036
+ }
1037
+ },
985
1038
  {
986
1039
  "name": "create_service_routing",
987
1040
  "title": "Create Service Routing Draft",
@@ -990,7 +1043,7 @@
990
1043
  "destructiveHint": false,
991
1044
  "openWorldHint": false
992
1045
  },
993
- "description": "Save a single-family policy for one approved exact hostname and explicit client subnets. No router changes. Create separate IPv4/IPv6 policies. Shared CDN IPs can affect other services. Preview, then explicitly confirm apply; never infer authorization from a draft.",
1046
+ "description": "Save a single-family exact domain or *.example.com route for explicit client subnets. The wildcard excludes the apex and requires client DNS through this router, existing remote DNS, RouterOS 7.17+ and dnsLearningConfirmed. Wildcard FWD bypasses adlists for matching DNS queries. HTTPS target is optional for manual routing, required for health probes/failover; when domain is absent use the approved target's host (legacy). Shared CDN IPs can affect other services. No router change until preview and explicit apply. Never infer authorization from a draft.",
994
1047
  "inputSchema": {
995
1048
  "$schema": "https://json-schema.org/draft/2020-12/schema",
996
1049
  "type": "object",
@@ -1001,11 +1054,25 @@
1001
1054
  "maxLength": 80
1002
1055
  },
1003
1056
  "target": {
1057
+ "description": "Optional approved HTTPS probe alias; legacy drafts without domain route this alias's exact host",
1004
1058
  "type": "string",
1005
1059
  "minLength": 1,
1006
1060
  "maxLength": 64,
1007
- "pattern": "^[a-zA-Z0-9_.-]+$",
1008
- "description": "Approved HTTPS alias in serviceProbes.targets; its exact hostname is routed"
1061
+ "pattern": "^[a-zA-Z0-9_.-]+$"
1062
+ },
1063
+ "domain": {
1064
+ "description": "Exact domain or *.example.com (subdomains only, not the apex). Wildcards need client DNS through this router.",
1065
+ "type": "string",
1066
+ "maxLength": 253
1067
+ },
1068
+ "dnsLearningConfirmed": {
1069
+ "description": "For wildcard only: confirms clients use this router DNS, shared-IP scope and FWD adlist bypass are understood. Does not enable or intercept DNS.",
1070
+ "type": "boolean"
1071
+ },
1072
+ "precedence": {
1073
+ "description": "Explicitly allow this scoped policy before existing routing rules. Preview still binds their full configuration; FastTrack is never bypassed.",
1074
+ "type": "string",
1075
+ "enum": ["before-existing"]
1009
1076
  },
1010
1077
  "family": {
1011
1078
  "type": "string",
@@ -1057,7 +1124,6 @@
1057
1124
  },
1058
1125
  "required": [
1059
1126
  "name",
1060
- "target",
1061
1127
  "family",
1062
1128
  "sources",
1063
1129
  "tables",
@@ -1102,7 +1168,7 @@
1102
1168
  "idempotentHint": true,
1103
1169
  "openWorldHint": false
1104
1170
  },
1105
- "description": "Read router state and save a two-minute, state-bound preview for applying/switching or removing only owned rules. Reject FastTrack and foreign policy-routing conflicts. Does not create exits, NAT, DNS interception or change router configuration.",
1171
+ "description": "Read router state and save a two-minute state-bound preview for applying/switching or removing owned rules. Reject FastTrack, overlapping wildcard DNS and foreign routing conflicts unless before-existing precedence was explicitly selected. Wildcard plans add an owned DNS FWD learner, not DNS interception. Does not create exits, NAT or change the router until apply.",
1106
1172
  "inputSchema": {
1107
1173
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1108
1174
  "type": "object",
@@ -22398,6 +22464,53 @@
22398
22464
  "additionalProperties": false
22399
22465
  }
22400
22466
  },
22467
+ {
22468
+ "name": "list_ovpn_sessions",
22469
+ "title": "List Active OpenVPN Connections",
22470
+ "risk": "read",
22471
+ "annotations": {
22472
+ "readOnlyHint": true,
22473
+ "idempotentHint": true,
22474
+ "openWorldHint": false
22475
+ },
22476
+ "description": "Read currently connected OpenVPN users on an explicit router, including assigned IP, caller address, uptime, encoding and RADIUS status. Reads only /ppp active where service=ovpn; does not read secrets, historical sessions, or outbound clients. Returns structured JSON and short-lived disconnect tokens for individual sessions. A cached read is at most two seconds old; errors are not an empty list.",
22477
+ "inputSchema": {
22478
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
22479
+ "type": "object",
22480
+ "properties": {},
22481
+ "additionalProperties": false
22482
+ }
22483
+ },
22484
+ {
22485
+ "name": "disconnect_ovpn_session",
22486
+ "title": "Disconnect One OpenVPN Connection",
22487
+ "risk": "destructive",
22488
+ "annotations": {
22489
+ "destructiveHint": true,
22490
+ "idempotentHint": true,
22491
+ "openWorldHint": false
22492
+ },
22493
+ "description": "Disconnect exactly one observed OpenVPN connection after explicit operator approval. First list_ovpn_sessions on the same explicit router, then supply its fresh disconnectToken. Rechecks internal ID, session ID, username, addresses and uptime before removal, then verifies absence. Does not disable or delete the account; clients can reconnect and PPP on-down hooks may run. Can interrupt your own management tunnel. Unknown outcomes must be reconciled by reading again, never automatically retried. Not available during Safe Mode.",
22494
+ "inputSchema": {
22495
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
22496
+ "type": "object",
22497
+ "properties": {
22498
+ "token": {
22499
+ "type": "string",
22500
+ "format": "uuid",
22501
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
22502
+ "description": "Fresh disconnectToken from list_ovpn_sessions on this router; expires after 60 seconds and is single-use."
22503
+ },
22504
+ "confirm": {
22505
+ "type": "boolean",
22506
+ "const": true,
22507
+ "description": "Explicit operator approval to terminate this one live connection. The client can reconnect."
22508
+ }
22509
+ },
22510
+ "required": ["token", "confirm"],
22511
+ "additionalProperties": false
22512
+ }
22513
+ },
22401
22514
  {
22402
22515
  "name": "get_ovpn_server",
22403
22516
  "title": "Get OpenVPN Server Configuration",
@@ -9,11 +9,25 @@
9
9
  "maxLength": 80
10
10
  },
11
11
  "target": {
12
+ "description": "Optional approved HTTPS probe alias; legacy drafts without domain route this alias's exact host",
12
13
  "type": "string",
13
14
  "minLength": 1,
14
15
  "maxLength": 64,
15
- "pattern": "^[a-zA-Z0-9_.-]+$",
16
- "description": "Approved HTTPS alias in serviceProbes.targets; its exact hostname is routed"
16
+ "pattern": "^[a-zA-Z0-9_.-]+$"
17
+ },
18
+ "domain": {
19
+ "description": "Exact domain or *.example.com (subdomains only, not the apex). Wildcards need client DNS through this router.",
20
+ "type": "string",
21
+ "maxLength": 253
22
+ },
23
+ "dnsLearningConfirmed": {
24
+ "description": "For wildcard only: confirms clients use this router DNS, shared-IP scope and FWD adlist bypass are understood. Does not enable or intercept DNS.",
25
+ "type": "boolean"
26
+ },
27
+ "precedence": {
28
+ "description": "Explicitly allow this scoped policy before existing routing rules. Preview still binds their full configuration; FastTrack is never bypassed.",
29
+ "type": "string",
30
+ "enum": ["before-existing"]
17
31
  },
18
32
  "family": {
19
33
  "type": "string",
@@ -65,7 +79,6 @@
65
79
  },
66
80
  "required": [
67
81
  "name",
68
- "target",
69
82
  "family",
70
83
  "sources",
71
84
  "tables",
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "disconnect_ovpn_session",
4
+ "type": "object",
5
+ "properties": {
6
+ "token": {
7
+ "type": "string",
8
+ "format": "uuid",
9
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
10
+ "description": "Fresh disconnectToken from list_ovpn_sessions on this router; expires after 60 seconds and is single-use."
11
+ },
12
+ "confirm": {
13
+ "type": "boolean",
14
+ "const": true,
15
+ "description": "Explicit operator approval to terminate this one live connection. The client can reconnect."
16
+ }
17
+ },
18
+ "required": ["token", "confirm"],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "list_ovpn_sessions",
4
+ "type": "object",
5
+ "properties": {},
6
+ "additionalProperties": false
7
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "service_routing_address_page",
4
+ "type": "object",
5
+ "properties": {
6
+ "family": {
7
+ "type": "string",
8
+ "enum": ["ipv4", "ipv6"]
9
+ },
10
+ "offset": {
11
+ "default": 0,
12
+ "type": "integer",
13
+ "minimum": 0,
14
+ "maximum": 1000000
15
+ }
16
+ },
17
+ "required": ["family", "offset"],
18
+ "additionalProperties": false
19
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "service_routing_traffic",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "format": "uuid",
9
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
10
+ }
11
+ },
12
+ "required": ["id"],
13
+ "additionalProperties": false
14
+ }