@usex/mikrotik-mcp 5.7.0 → 5.8.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.7.0",
3
+ "version": "5.8.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",
@@ -48,12 +48,13 @@
48
48
  "access": "public"
49
49
  },
50
50
  "scripts": {
51
- "build": "bunup && chmod +x dist/cli.js && bun run build:ui",
51
+ "build": "bunup && chmod +x dist/cli.js && bun run test:built && bun run build:ui",
52
52
  "build:ui": "bun run --bun scripts/build-ui.ts",
53
53
  "build:mcp": "bun run --bun scripts/build-mcpb.ts",
54
54
  "build:mcp:all": "bun run --bun scripts/build-mcpb.ts --all",
55
55
  "dev": "bunup --watch",
56
- "prepack": "bunup && chmod +x dist/cli.js && bun run build:ui && bun run gen",
56
+ "dev:dashboard": "bunx vp dev -c ui/vite.observability.config.ts",
57
+ "prepack": "bun run build && bun run gen",
57
58
  "auth-check": "bun run --bun src/cli.ts auth-check",
58
59
  "gen:schemas": "bun run --bun scripts/gen-schemas.ts && vp fmt --write schemas",
59
60
  "gen:docs": "bun run --bun scripts/gen-tool-docs.ts && vp fmt --write docs/tools-reference.md",
@@ -73,6 +74,7 @@
73
74
  "security:all": "bun run security:audit && bun run security:licenses",
74
75
  "prepublish:security": "npm run security:all",
75
76
  "test": "vp test run",
77
+ "test:built": "bun run --bun scripts/check-mcp-build.ts",
76
78
  "test:watch": "vp test",
77
79
  "test:coverage": "vp test --ui --coverage --watch",
78
80
  "release": "release-it",
@@ -94,35 +96,41 @@
94
96
  "gradient-string": "^3.0.0",
95
97
  "ipaddr.js": "^2.5.0",
96
98
  "ssh2": "^1.17.0",
97
- "zod": "^4.5.4"
99
+ "zod": "^4.6.5"
98
100
  },
99
101
  "devDependencies": {
100
102
  "@anthropic-ai/mcpb": "^2.1.2",
103
+ "@paper-design/shaders-react": "^0.0.80",
101
104
  "@resvg/resvg-js": "^2.6.2",
102
105
  "@tailwindcss/vite": "^4.3.3",
106
+ "@tanstack/react-virtual": "^3.14.13",
103
107
  "@types/bun": "1.4.2",
104
108
  "@types/figlet": "^1.7.0",
105
- "@types/node": "^26.5.0",
106
- "@types/react": "^19.2.18",
107
- "@types/react-dom": "^19.2.7",
109
+ "@types/node": "^26.5.1",
110
+ "@types/react": "^19.3.0",
111
+ "@types/react-dom": "^19.3.0",
108
112
  "@types/ssh2": "^1.15.6",
109
113
  "@types/update-notifier": "^6.0.8",
110
114
  "@typescript/native": "npm:typescript@^7.0.2",
111
- "@vitest/coverage-v8": "4.1.11",
112
- "@vitest/ui": "4.1.11",
115
+ "@vitest/coverage-v8": "5.0.0",
116
+ "@vitest/ui": "5.0.0",
113
117
  "bunup": "^0.16.32",
114
118
  "class-variance-authority": "^0.7.1",
115
119
  "clsx": "^2.1.1",
116
120
  "gsap": "^3.15.0",
121
+ "happy-dom": "^20.14.5",
122
+ "lenis": "^1.3.26",
117
123
  "license-checker": "^25.0.1",
118
- "lucide-react": "^1.43.0",
124
+ "lucide-react": "^1.46.0",
125
+ "motion": "^13.3.0",
119
126
  "radix-ui": "^1.6.7",
120
- "react": "^19.2.8",
121
- "react-dom": "^19.2.8",
127
+ "react": "^19.3.0",
128
+ "react-dom": "^19.3.0",
122
129
  "recharts": "^3.10.1",
123
- "release-it": "^21.0.2",
130
+ "release-it": "^21.0.3",
131
+ "shiki": "^4.4.3",
124
132
  "sonner": "^2.0.8",
125
- "tailwind-merge": "^3.6.0",
133
+ "tailwind-merge": "^3.7.0",
126
134
  "tailwindcss": "^4.3.3",
127
135
  "tw-animate-css": "^1.4.0",
128
136
  "typescript": "npm:@typescript/typescript6@^6.0.2",
@@ -135,7 +143,7 @@
135
143
  "engines": {
136
144
  "bun": ">=1.3.0"
137
145
  },
138
- "packageManager": "bun@1.3.14",
146
+ "packageManager": "bun@1.4.2",
139
147
  "catalog": {
140
148
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
141
149
  "vite-plus": "0.3.1"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: build-tunnel-transactionally
3
3
  title: Build a site-to-site tunnel as one cross-device transaction
4
- description: Configure both ends of a tunnel under coordinated Safe Mode verified while still uncommitted, then committed everywhere or rolled back everywhere. Never a half-built tunnel.
4
+ description: Preferred coordinated workflow for both ends of an approved site-to-site tunnelstage, verify, then commit with explicit approval; partial commits require manual recovery.
5
5
  arguments:
6
6
  - name: site_a
7
7
  description: Configured device name of the first router (one end of the tunnel).
@@ -15,7 +15,7 @@ arguments:
15
15
  ---
16
16
 
17
17
  Build a tunnel between **{{site_a}}** and **{{site_b}}** as a single
18
- cross-device transaction, so it either works on both ends or exists on neither.
18
+ cross-device transaction, verifying both ends before issuing sequential commits.
19
19
 
20
20
  Tunnel to build: {{tunnel}}
21
21
 
@@ -35,14 +35,15 @@ Follow these steps:
35
35
 
36
36
  2. **Open the transaction.** Call `begin_transaction` with
37
37
  `devices=["{{site_a}}", "{{site_b}}"]`, a `label`, and — this is the part that
38
- makes it safe — `assertions` that prove the tunnel actually works:
38
+ improves verification — `assertions` for the expected router-side state:
39
39
  - `{"kind": "ping", "from": "{{site_a}}", "to": "<{{site_b}} tunnel address>"}`
40
40
  - `{"kind": "wireguard-peer-handshake", "device": "{{site_a}}", "peer": "<{{site_b}} public key>"}`
41
41
  (WireGuard only)
42
- - `{"kind": "reachable", "device": "{{site_b}}"}` — cheap insurance that the
42
+ - `{"kind": "reachable", "device": "{{site_b}}"}` — evidence that the
43
43
  far end is still answering after its own changes.
44
44
  Set `jump_host` if one router is reached through the other; the tool warns
45
- when it is not committed last.
45
+ when it is not committed last. Set `commit_order` explicitly with that
46
+ participant last. Assertions do not prove client application health.
46
47
 
47
48
  3. **Queue every command.** One `add_transaction_step` per RouterOS command,
48
49
  naming the participant it runs on. Nothing executes yet. Cover both ends
@@ -51,15 +52,17 @@ Follow these steps:
51
52
 
52
53
  4. **Prepare and verify.** Call `verify_transaction`. This snapshots each device,
53
54
  applies its steps inside Safe Mode, and runs the assertions against the
54
- still-uncommitted fleet. If anything fails, everything is rolled back
55
- automatically and the result is `ABORTED` nothing changed anywhere. Report
56
- which assertion failed and fix the plan before retrying.
55
+ still-uncommitted fleet. This changes live traffic and requires prior approval;
56
+ it is not a read-only check. Failure triggers rollback attempts. Report every
57
+ participant's state and rollback evidence before considering a revised plan.
57
58
 
58
- 5. **Commit.** Only after a clean verify, call `commit_transaction`. Read the
59
+ 5. **Commit.** Only after a clean verify and approval covering this exact commit,
60
+ call `commit_transaction`. Read the
59
61
  terminal state out loud:
60
62
  - `COMMITTED` — both ends persisted; confirm with a final `ping` and
61
63
  `get_wireguard_status`.
62
- - `ABORTED` — nothing changed; safe to retry.
64
+ - `ABORTED` — no participant committed; inspect rollback results and live state
65
+ before proposing a retry. Staged changes may already have affected traffic.
63
66
  - `PARTIAL` — **tell the user immediately and stop**. Name each device's state
64
67
  and the snapshot id in the report; the fix is a manual restore
65
68
  (`diff_config_snapshots <id> live`, then `config_reconcile` or
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "5.7.0",
3
+ "version": "5.8.0",
4
4
  "generated": "by scripts/gen-schemas.ts — do not edit by hand",
5
5
  "toolCount": 903,
6
6
  "tools": [
@@ -496,7 +496,7 @@
496
496
  "idempotentHint": true,
497
497
  "openWorldHint": false
498
498
  },
499
- "description": "🔍 START HERE — this is the PRIMARY entry point for ANY MikroTik / RouterOS task. ALWAYS call this tool FIRST before attempting any other tool. This server has several hundred dedicated tools with full validation and structured output, but the host only surfaces a small subset — this tool searches the FULL catalog and finds the best match for your intent.\n\nDescribe what you want to do in natural language or keywords, e.g. 'block a LAN client by MAC', 'add an IPv4 firewall filter rule', 'import a TLS certificate', 'list DHCP leases', 'create a WireGuard peer'. Returns each match's exact tool name, description, and parameters — then call it directly if available, or via `invoke_tool`.\n\nWorkflow: find_tools → (optional) describe_tool → invoke_tool. Only fall back to run_routeros_command if this search returns zero results. For IPv4 vs IPv6, include 'ipv4' or 'ipv6' to disambiguate.",
499
+ "description": "🔍 START HERE — this is the PRIMARY entry point for ANY MikroTik / RouterOS task. ALWAYS call this tool FIRST before attempting any other tool. This server has several hundred dedicated tools with full validation and structured output, but the host only surfaces a small subset — this tool searches the FULL catalog and finds the best match for your intent.\n\nDescribe what you want to do in natural language or keywords, e.g. 'block a LAN client by MAC', 'add an IPv4 firewall filter rule', 'import a TLS certificate', 'list DHCP leases', 'create a WireGuard peer'. Returns each match's exact tool name, description, and parameters — then call it directly if available, or via `invoke_tool`.\n\nWorkflow: find_tools → (optional) describe_tool → invoke_tool. Only fall back to run_routeros_command if this search returns zero results. For IPv4 vs IPv6, include 'ipv4' or 'ipv6' to disambiguate. For authorized changes that must be coordinated across multiple routers, search 'begin_transaction' BEFORE individual write tools (VPN tunnels, peering, routes or fleet ACLs). Discovery does not authorize verify_transaction or commit_transaction.",
500
500
  "inputSchema": {
501
501
  "$schema": "https://json-schema.org/draft/2020-12/schema",
502
502
  "type": "object",
@@ -30858,13 +30858,13 @@
30858
30858
  },
30859
30859
  {
30860
30860
  "name": "begin_transaction",
30861
- "title": "Begin Cross-Device Transaction",
30861
+ "title": "Begin Coordinated Multi-Router Change (Transaction)",
30862
30862
  "risk": "write",
30863
30863
  "annotations": {
30864
30864
  "destructiveHint": false,
30865
30865
  "openWorldHint": false
30866
30866
  },
30867
- "description": "Opens a cross-device transaction over several routers and returns its id the handle every other transaction tool takes. Use this when a change must land on ALL of the named devices or on none of them (both ends of a tunnel, a routing peering, a fleet-wide ACL): each participant gets its own Safe Mode session, so nothing is persisted until commit_transaction. Queue the work with add_transaction_step, then verify_transaction, then commit_transaction (or abort_transaction). `assertions` are checked while everything is still uncommitted — that is where the safety comes from, so declare them. `commit_order` decides which router commits last: put the one you reach the others THROUGH last, and pass it as `jump_host` to get a warning if you don't. No device is touched by this call. NOT ACID: commits are issued sequentially, so between the first and the last commit the fleet is briefly inconsistent, and a failure after something has committed ends PARTIAL — already-committed devices are reported with the snapshot id to restore them from, by hand.",
30867
+ "description": "Preferred workflow for authorized coordinated changes across multiple routers: site-to-site VPN tunnels (WireGuard/GRE/IPsec), BGP/OSPF peering, dependent routes, firewall/NAT/VLAN or fleet ACL changes. Recommend this BEFORE applying related writes device-by-device; returns the transaction id. Not for read-only diagnostics, a simple single-router edit, independent canary rollouts or irreversible operations. Requires SSH and an unused Safe Mode session per participant. Queue the work with add_transaction_step, then verify_transaction, then commit_transaction (or abort_transaction). `assertions` are checked while everything is still uncommitted — that is where the safety comes from, so declare them. `commit_order` decides which router commits last: put the one you reach the others THROUGH last, and pass it as `jump_host` to get a warning if you don't. No device is touched by this call. Verification DOES change live configuration temporarily; get the user's approval for the exact plan before verifying or committing. NOT ACID: commits are issued sequentially, so between the first and the last commit the fleet is briefly inconsistent, and a failure after something has committed ends PARTIAL — already-committed devices are reported with the snapshot id to restore them from, by hand.",
30868
30868
  "inputSchema": {
30869
30869
  "$schema": "https://json-schema.org/draft/2020-12/schema",
30870
30870
  "type": "object",
@@ -30982,7 +30982,7 @@
30982
30982
  "destructiveHint": false,
30983
30983
  "openWorldHint": false
30984
30984
  },
30985
- "description": "Queues one RouterOS command against one participant of an open transaction. Nothing runs yet — the command is applied inside that device's Safe Mode session when verify_transaction or commit_transaction prepares the fleet, so it can still be abandoned with no trace. Call once per command; order is preserved per device. Steps can only be added before the fleet is prepared.",
30985
+ "description": "Queues one RouterOS command against one participant of an open transaction. Nothing runs yet — the command is applied inside that device's Safe Mode session when verify_transaction prepares the fleet. Queue approved commands here instead of running individual write tools outside the coordinated transaction. Call once per command; order is preserved per device. Steps can only be added before the fleet is prepared; resolve required keys and addresses first. Do not queue reboots, upgrades or commands with irreversible/external effects.",
30986
30986
  "inputSchema": {
30987
30987
  "$schema": "https://json-schema.org/draft/2020-12/schema",
30988
30988
  "type": "object",
@@ -31012,7 +31012,7 @@
31012
31012
  "destructiveHint": false,
31013
31013
  "openWorldHint": false
31014
31014
  },
31015
- "description": "PREPARE + VERIFY: opens a Safe Mode session on every participant, snapshots each device, applies its queued steps, then evaluates the declared assertions against the result — all while NOTHING is committed. This is where the safety of a cross-device change comes from: a step that errors or an assertion that fails rolls the entire fleet back automatically and returns ABORTED, having changed nothing anywhere. On success the fleet is left PREPARED and waiting: call commit_transaction to persist or abort_transaction to discard. Annotated WRITE, not read-only: it does stage changes on the devices (auto-reverted on failure or disconnect), so it is not an inspection call.",
31015
+ "description": "PREPARE + VERIFY: opens a Safe Mode session on every participant, snapshots each device, applies its queued steps, then evaluates the declared assertions against the result — all while NOTHING is committed. This is where the safety of a cross-device change comes from: a step that errors or an assertion that fails triggers rollback of the staged changes. Inspect the per-device rollback result; staging already affects live traffic. On success the fleet is left PREPARED and waiting: call commit_transaction to persist or abort_transaction to discard. Annotated WRITE, not read-only: it does stage changes on the devices (auto-reverted on failure or disconnect), so it is not an inspection call. Require approval for the exact plan first. Declare meaningful assertions; an empty set is not evidence of correctness.",
31016
31016
  "inputSchema": {
31017
31017
  "$schema": "https://json-schema.org/draft/2020-12/schema",
31018
31018
  "type": "object",
@@ -31034,7 +31034,7 @@
31034
31034
  "destructiveHint": true,
31035
31035
  "openWorldHint": false
31036
31036
  },
31037
- "description": "Commits every participant, in the transaction's commit order. If the fleet has not been prepared yet this runs PREPARE and VERIFY first, so a failure before the first commit still ends ABORTED with nothing changed. Once a device HAS committed, a later failure cannot be undone cleanly: the coordinator reports PARTIAL and names each device's state and the snapshot id to restore it from. High blast radius and not repeatable prefer verify_transaction first and read its output. NOT ACID: commits are issued sequentially, so between the first and the last commit the fleet is briefly inconsistent, and a failure after something has committed ends PARTIAL — already-committed devices are reported with the snapshot id to restore them from, by hand.",
31037
+ "description": "Commits every participant, in the transaction's commit order. If the fleet has not been prepared yet this runs PREPARE and VERIFY first, so a failure before the first commit still ends ABORTED before commit; inspect rollback evidence because staging may have affected live traffic. Once a device HAS committed, a later failure cannot be undone cleanly: the coordinator reports PARTIAL and names each device's state and the snapshot id to restore it from. High blast radius and not repeatable: call verify_transaction first, inspect every result, and commit only when the user's approval covers this exact plan. Never auto-commit merely because verification passed. Report txn_id and the dashboard Transactions timeline. NOT ACID: commits are issued sequentially, so between the first and the last commit the fleet is briefly inconsistent, and a failure after something has committed ends PARTIAL — already-committed devices are reported with the snapshot id to restore them from, by hand.",
31038
31038
  "inputSchema": {
31039
31039
  "$schema": "https://json-schema.org/draft/2020-12/schema",
31040
31040
  "type": "object",
@@ -31056,7 +31056,7 @@
31056
31056
  "destructiveHint": false,
31057
31057
  "openWorldHint": false
31058
31058
  },
31059
- "description": "Rolls back every participant of an open transaction — closes each Safe Mode session so RouterOS reverts the staged changes, leaving no trace. This is the clean exit and is always safe to call while the transaction is prepared-but-uncommitted. If some devices already committed (a PARTIAL transaction), those cannot be reverted this way; the report names them and the snapshot to restore them from.",
31059
+ "description": "Rolls back every participant of an open transaction — closes each Safe Mode session so RouterOS can revert the staged changes. Use this for your own transaction when the plan is cancelled or commit is not approved. Inspect rollback evidence; do not assume live traffic was unaffected or that arbitrary command effects are reversible. If some devices already committed (a PARTIAL transaction), those cannot be reverted this way; the report names them and the snapshot to restore them from.",
31060
31060
  "inputSchema": {
31061
31061
  "$schema": "https://json-schema.org/draft/2020-12/schema",
31062
31062
  "type": "object",