@usex/mikrotik-mcp 3.11.0 → 3.14.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/dist/cli.js +21 -13
- package/dist/index.js +21 -13
- package/dist/ui/observability.html +3 -3
- package/package.json +1 -1
- package/prompts/safe-change-workflow.md +47 -0
package/dist/cli.js
CHANGED
|
@@ -3686,7 +3686,7 @@ var changePlanTools = [
|
|
|
3686
3686
|
name: "plan_changes",
|
|
3687
3687
|
title: "Plan RouterOS Changes (Dry-Run Preview)",
|
|
3688
3688
|
annotations: READ,
|
|
3689
|
-
description: "Parses a set of intended RouterOS CLI commands locally \u2014 without contacting the device \u2014 " + "and returns a risk-scored, lock-out-aware execution plan. Classifies each command as " + "ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would " + "drop input-chain traffic or remove the management IP, and reorders steps into the safest " + "sequence (additive changes before destructive ones). Use this to understand what will " + "happen before committing; to execute the plan use apply_plan. Provide commands as an " + "array via `commands`, as a newline-delimited string via `script`, or both \u2014 they are " + "merged. Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
3689
|
+
description: "Parses a set of intended RouterOS CLI commands locally \u2014 without contacting the device \u2014 " + "and returns a risk-scored, lock-out-aware execution plan. Classifies each command as " + "ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would " + "drop input-chain traffic or remove the management IP, and reorders steps into the safest " + "sequence (additive changes before destructive ones). Use this to understand what will " + "happen before committing; to execute the plan use apply_plan. Provide commands as an " + "array via `commands`, as a newline-delimited string via `script`, or both \u2014 they are " + "merged. Before planning a change, FIRST call capture_config_snapshot to take a restore " + "point \u2014 it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db) with " + "zero footprint on the device's disk (no file is written to the router). " + "Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
3690
3690
|
inputSchema: {
|
|
3691
3691
|
commands: z10.array(z10.string()).optional().describe("Intended RouterOS CLI commands."),
|
|
3692
3692
|
script: z10.string().optional().describe("Newline-delimited commands (alternative to `commands`).")
|
|
@@ -3706,7 +3706,7 @@ var changePlanTools = [
|
|
|
3706
3706
|
name: "apply_plan",
|
|
3707
3707
|
title: "Apply RouterOS Change Plan in Safe Mode",
|
|
3708
3708
|
annotations: DANGEROUS,
|
|
3709
|
-
description: "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over " + "an interactive SSH shell) and reports the exact unified diff of what changed, computed " + "from `/export terse` snapshots captured before and after execution. With confirm=false " + "(default) it applies all steps, captures the diff, then rolls everything back \u2014 a true " + "dry-run that shows precisely what would change without persisting anything. With " + "confirm=true it commits permanently, but ONLY after verifying the device still responds " + "to `/system identity print` \u2014 a change that would lock you out auto-reverts instead of " + "sticking. Steps execute in the same safe order that plan_changes computes (additive before " + "destructive); if any step returns a RouterOS error the entire plan rolls back immediately. " + "Safe Mode requires SSH \u2014 not available on MAC-Telnet devices. For a no-device preview " + "use plan_changes instead. Returns the plan summary, per-step execution log, unified diff,
|
|
3709
|
+
description: "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over " + "an interactive SSH shell) and reports the exact unified diff of what changed, computed " + "from `/export terse` snapshots captured before and after execution. With confirm=false " + "(default) it applies all steps, captures the diff, then rolls everything back \u2014 a true " + "dry-run that shows precisely what would change without persisting anything. With " + "confirm=true it commits permanently, but ONLY after verifying the device still responds " + "to `/system identity print` \u2014 a change that would lock you out auto-reverts instead of " + "sticking. Steps execute in the same safe order that plan_changes computes (additive before " + "destructive); if any step returns a RouterOS error the entire plan rolls back immediately. " + "Safe Mode requires SSH \u2014 not available on MAC-Telnet devices. For a no-device preview " + "use plan_changes instead. ALWAYS call capture_config_snapshot BEFORE this tool to record " + "a restore point \u2014 it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db), " + "adding no load to the device's disk and leaving nothing to remove on the router; after the " + "change, diff_config_snapshots (from=latest, to=live) confirms what changed. Returns the " + "plan summary, per-step execution log, unified diff, and commit/rollback outcome.",
|
|
3710
3710
|
inputSchema: {
|
|
3711
3711
|
commands: z10.array(z10.string()).optional(),
|
|
3712
3712
|
script: z10.string().optional(),
|
|
@@ -12722,7 +12722,7 @@ var openvpnTools = [
|
|
|
12722
12722
|
name: "get_ovpn_server",
|
|
12723
12723
|
title: "Get OpenVPN Server Configuration",
|
|
12724
12724
|
annotations: READ,
|
|
12725
|
-
description: "
|
|
12725
|
+
description: "`get_ovpn_server` \u2014 READ / get / show / inspect the OpenVPN (OVPN) server settings and status" + " (`/interface ovpn-server server print`) \u2014 the singleton inbound-server instance: whether it is" + " enabled/running, certificate, auth/cipher algorithms, port, protocol, netmask, mode, max_mtu," + " default_profile, require_client_certificate. Use set_ovpn_server to modify these settings. For" + " outbound OVPN tunnels to a remote server use list_ovpn_clients or get_ovpn_client. For other VPN" + " tunnel types use create_l2tp_client, create_pptp_client, or create_sstp_client. Returns the full" + " server parameter block or a not-found message.",
|
|
12726
12726
|
async handler(_a, ctx) {
|
|
12727
12727
|
ctx.info("Getting OpenVPN server configuration");
|
|
12728
12728
|
const result = await executeMikrotikCommand("/interface ovpn-server server print", ctx);
|
|
@@ -12806,7 +12806,7 @@ ${redactSecrets(details)}` : "OpenVPN client creation completed but unable to ve
|
|
|
12806
12806
|
name: "list_ovpn_clients",
|
|
12807
12807
|
title: "List OpenVPN Client Interfaces",
|
|
12808
12808
|
annotations: READ,
|
|
12809
|
-
description: "
|
|
12809
|
+
description: "`list_ovpn_clients` \u2014 READ / list / show / inspect / enumerate all OpenVPN (OVPN) client" + " interfaces (`/interface ovpn-client print`) and whether each tunnel is running/connected," + " optionally filtered by partial interface name (name_filter). Returns each client's name," + " running status, remote server (connect-to), port, mode and user. Use this to read existing OVPN" + " uplinks and their status before calling get_ovpn_client, enable_ovpn_client," + " disable_ovpn_client, or remove_ovpn_client. For inbound server settings use get_ovpn_server." + " For L2TP, PPTP, or SSTP tunnels use the respective tools." + " Returns a redacted table of all matching OVPN client interfaces.",
|
|
12810
12810
|
inputSchema: {
|
|
12811
12811
|
name_filter: z67.string().optional().describe("Partial name match")
|
|
12812
12812
|
},
|
|
@@ -12825,7 +12825,7 @@ ${redactSecrets(result)}`;
|
|
|
12825
12825
|
name: "get_ovpn_client",
|
|
12826
12826
|
title: "Get OpenVPN Client Interface Detail",
|
|
12827
12827
|
annotations: READ,
|
|
12828
|
-
description: "
|
|
12828
|
+
description: "`get_ovpn_client` \u2014 READ / get / show / inspect one OpenVPN (OVPN) client interface's full" + " detail and running status by name (`/interface ovpn-client print detail where name=...`):" + " running/connected state, remote server (connect-to), port, mode, user, profile, certificate," + " cipher and auth. Use list_ovpn_clients first to enumerate available interface names. For the" + " inbound OVPN server settings use get_ovpn_server. Returns the full interface detail with" + " secrets redacted, or a not-found message if the name does not exist.",
|
|
12829
12829
|
inputSchema: { name: z67.string() },
|
|
12830
12830
|
async handler(a, ctx) {
|
|
12831
12831
|
ctx.info(`Getting OpenVPN client details: name=${a.name}`);
|
|
@@ -23304,7 +23304,7 @@ function registerPrompts(server) {
|
|
|
23304
23304
|
// package.json
|
|
23305
23305
|
var package_default = {
|
|
23306
23306
|
name: "@usex/mikrotik-mcp",
|
|
23307
|
-
version: "3.
|
|
23307
|
+
version: "3.14.0",
|
|
23308
23308
|
description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
|
|
23309
23309
|
keywords: [
|
|
23310
23310
|
"ai",
|
|
@@ -23456,7 +23456,20 @@ Safety model \u2014 tools are annotated by risk:
|
|
|
23456
23456
|
Before a batch of risky changes, consider enable_safe_mode: RouterOS then holds
|
|
23457
23457
|
every change in memory and auto-reverts if the session drops, so a mistake that
|
|
23458
23458
|
locks you out is undone automatically. commit_safe_mode persists; rollback
|
|
23459
|
-
discards. Prefer specific filters on list_* tools to keep output small
|
|
23459
|
+
discards. Prefer specific filters on list_* tools to keep output small.
|
|
23460
|
+
|
|
23461
|
+
Change workflow \u2014 ALWAYS take a restore point before a plan. Before calling
|
|
23462
|
+
plan_changes or apply_plan (or any batch of write/destructive tools), first call
|
|
23463
|
+
capture_config_snapshot to record the current configuration. These snapshots are
|
|
23464
|
+
captured with \`/export\` (a read-only print \u2014 it does NOT create a file on the
|
|
23465
|
+
router) and persisted to the MCP host's local database (~/.mikrotik-mcp/
|
|
23466
|
+
snapshots.db), so they add ZERO load to the MikroTik device's disk and leave
|
|
23467
|
+
nothing to clean up on the device. They survive device reboots/resets. After a
|
|
23468
|
+
change, use diff_config_snapshots (from=latest, to=live) to confirm exactly what
|
|
23469
|
+
changed, and if something is wrong, get_config_snapshot returns the prior
|
|
23470
|
+
\`/export\` text to restore from. Do NOT use create_backup/create_export for this
|
|
23471
|
+
pre-change restore point \u2014 those write files to the device's flash; prefer the
|
|
23472
|
+
local snapshot to keep the device's disk clean.`;
|
|
23460
23473
|
var MULTI_DEVICE_INSTRUCTIONS = `
|
|
23461
23474
|
|
|
23462
23475
|
Multiple devices are configured: {{names}} (default: {{default}}). Every tool
|
|
@@ -23483,12 +23496,7 @@ function createServer(opts = {}) {
|
|
|
23483
23496
|
}
|
|
23484
23497
|
]
|
|
23485
23498
|
}, {
|
|
23486
|
-
capabilities: {
|
|
23487
|
-
tools: { listChanged: true },
|
|
23488
|
-
prompts: { listChanged: true },
|
|
23489
|
-
resources: { listChanged: true },
|
|
23490
|
-
logging: {}
|
|
23491
|
-
},
|
|
23499
|
+
capabilities: {},
|
|
23492
23500
|
instructions
|
|
23493
23501
|
});
|
|
23494
23502
|
const sendLog = opts.sendLog ?? ((level, message) => {
|
package/dist/index.js
CHANGED
|
@@ -3698,7 +3698,7 @@ var changePlanTools = [
|
|
|
3698
3698
|
name: "plan_changes",
|
|
3699
3699
|
title: "Plan RouterOS Changes (Dry-Run Preview)",
|
|
3700
3700
|
annotations: READ,
|
|
3701
|
-
description: "Parses a set of intended RouterOS CLI commands locally \u2014 without contacting the device \u2014 " + "and returns a risk-scored, lock-out-aware execution plan. Classifies each command as " + "ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would " + "drop input-chain traffic or remove the management IP, and reorders steps into the safest " + "sequence (additive changes before destructive ones). Use this to understand what will " + "happen before committing; to execute the plan use apply_plan. Provide commands as an " + "array via `commands`, as a newline-delimited string via `script`, or both \u2014 they are " + "merged. Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
3701
|
+
description: "Parses a set of intended RouterOS CLI commands locally \u2014 without contacting the device \u2014 " + "and returns a risk-scored, lock-out-aware execution plan. Classifies each command as " + "ADD/MODIFY/REMOVE/OTHER, calculates an overall risk score, emits warnings when commands would " + "drop input-chain traffic or remove the management IP, and reorders steps into the safest " + "sequence (additive changes before destructive ones). Use this to understand what will " + "happen before committing; to execute the plan use apply_plan. Provide commands as an " + "array via `commands`, as a newline-delimited string via `script`, or both \u2014 they are " + "merged. Before planning a change, FIRST call capture_config_snapshot to take a restore " + "point \u2014 it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db) with " + "zero footprint on the device's disk (no file is written to the router). " + "Returns a human-readable plan text and a structured plan object with per-step details.",
|
|
3702
3702
|
inputSchema: {
|
|
3703
3703
|
commands: z11.array(z11.string()).optional().describe("Intended RouterOS CLI commands."),
|
|
3704
3704
|
script: z11.string().optional().describe("Newline-delimited commands (alternative to `commands`).")
|
|
@@ -3718,7 +3718,7 @@ var changePlanTools = [
|
|
|
3718
3718
|
name: "apply_plan",
|
|
3719
3719
|
title: "Apply RouterOS Change Plan in Safe Mode",
|
|
3720
3720
|
annotations: DANGEROUS,
|
|
3721
|
-
description: "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over " + "an interactive SSH shell) and reports the exact unified diff of what changed, computed " + "from `/export terse` snapshots captured before and after execution. With confirm=false " + "(default) it applies all steps, captures the diff, then rolls everything back \u2014 a true " + "dry-run that shows precisely what would change without persisting anything. With " + "confirm=true it commits permanently, but ONLY after verifying the device still responds " + "to `/system identity print` \u2014 a change that would lock you out auto-reverts instead of " + "sticking. Steps execute in the same safe order that plan_changes computes (additive before " + "destructive); if any step returns a RouterOS error the entire plan rolls back immediately. " + "Safe Mode requires SSH \u2014 not available on MAC-Telnet devices. For a no-device preview " + "use plan_changes instead. Returns the plan summary, per-step execution log, unified diff,
|
|
3721
|
+
description: "Executes intended RouterOS commands inside RouterOS Safe Mode (activated by Ctrl+X over " + "an interactive SSH shell) and reports the exact unified diff of what changed, computed " + "from `/export terse` snapshots captured before and after execution. With confirm=false " + "(default) it applies all steps, captures the diff, then rolls everything back \u2014 a true " + "dry-run that shows precisely what would change without persisting anything. With " + "confirm=true it commits permanently, but ONLY after verifying the device still responds " + "to `/system identity print` \u2014 a change that would lock you out auto-reverts instead of " + "sticking. Steps execute in the same safe order that plan_changes computes (additive before " + "destructive); if any step returns a RouterOS error the entire plan rolls back immediately. " + "Safe Mode requires SSH \u2014 not available on MAC-Telnet devices. For a no-device preview " + "use plan_changes instead. ALWAYS call capture_config_snapshot BEFORE this tool to record " + "a restore point \u2014 it stores a local `/export` on the MCP host (~/.mikrotik-mcp/snapshots.db), " + "adding no load to the device's disk and leaving nothing to remove on the router; after the " + "change, diff_config_snapshots (from=latest, to=live) confirms what changed. Returns the " + "plan summary, per-step execution log, unified diff, and commit/rollback outcome.",
|
|
3722
3722
|
inputSchema: {
|
|
3723
3723
|
commands: z11.array(z11.string()).optional(),
|
|
3724
3724
|
script: z11.string().optional(),
|
|
@@ -12734,7 +12734,7 @@ var openvpnTools = [
|
|
|
12734
12734
|
name: "get_ovpn_server",
|
|
12735
12735
|
title: "Get OpenVPN Server Configuration",
|
|
12736
12736
|
annotations: READ,
|
|
12737
|
-
description: "
|
|
12737
|
+
description: "`get_ovpn_server` \u2014 READ / get / show / inspect the OpenVPN (OVPN) server settings and status" + " (`/interface ovpn-server server print`) \u2014 the singleton inbound-server instance: whether it is" + " enabled/running, certificate, auth/cipher algorithms, port, protocol, netmask, mode, max_mtu," + " default_profile, require_client_certificate. Use set_ovpn_server to modify these settings. For" + " outbound OVPN tunnels to a remote server use list_ovpn_clients or get_ovpn_client. For other VPN" + " tunnel types use create_l2tp_client, create_pptp_client, or create_sstp_client. Returns the full" + " server parameter block or a not-found message.",
|
|
12738
12738
|
async handler(_a, ctx) {
|
|
12739
12739
|
ctx.info("Getting OpenVPN server configuration");
|
|
12740
12740
|
const result = await executeMikrotikCommand("/interface ovpn-server server print", ctx);
|
|
@@ -12818,7 +12818,7 @@ ${redactSecrets(details)}` : "OpenVPN client creation completed but unable to ve
|
|
|
12818
12818
|
name: "list_ovpn_clients",
|
|
12819
12819
|
title: "List OpenVPN Client Interfaces",
|
|
12820
12820
|
annotations: READ,
|
|
12821
|
-
description: "
|
|
12821
|
+
description: "`list_ovpn_clients` \u2014 READ / list / show / inspect / enumerate all OpenVPN (OVPN) client" + " interfaces (`/interface ovpn-client print`) and whether each tunnel is running/connected," + " optionally filtered by partial interface name (name_filter). Returns each client's name," + " running status, remote server (connect-to), port, mode and user. Use this to read existing OVPN" + " uplinks and their status before calling get_ovpn_client, enable_ovpn_client," + " disable_ovpn_client, or remove_ovpn_client. For inbound server settings use get_ovpn_server." + " For L2TP, PPTP, or SSTP tunnels use the respective tools." + " Returns a redacted table of all matching OVPN client interfaces.",
|
|
12822
12822
|
inputSchema: {
|
|
12823
12823
|
name_filter: z68.string().optional().describe("Partial name match")
|
|
12824
12824
|
},
|
|
@@ -12837,7 +12837,7 @@ ${redactSecrets(result)}`;
|
|
|
12837
12837
|
name: "get_ovpn_client",
|
|
12838
12838
|
title: "Get OpenVPN Client Interface Detail",
|
|
12839
12839
|
annotations: READ,
|
|
12840
|
-
description: "
|
|
12840
|
+
description: "`get_ovpn_client` \u2014 READ / get / show / inspect one OpenVPN (OVPN) client interface's full" + " detail and running status by name (`/interface ovpn-client print detail where name=...`):" + " running/connected state, remote server (connect-to), port, mode, user, profile, certificate," + " cipher and auth. Use list_ovpn_clients first to enumerate available interface names. For the" + " inbound OVPN server settings use get_ovpn_server. Returns the full interface detail with" + " secrets redacted, or a not-found message if the name does not exist.",
|
|
12841
12841
|
inputSchema: { name: z68.string() },
|
|
12842
12842
|
async handler(a, ctx) {
|
|
12843
12843
|
ctx.info(`Getting OpenVPN client details: name=${a.name}`);
|
|
@@ -21707,7 +21707,7 @@ function selectToolModules(filter = {}, catalog = moduleCatalog) {
|
|
|
21707
21707
|
// package.json
|
|
21708
21708
|
var package_default = {
|
|
21709
21709
|
name: "@usex/mikrotik-mcp",
|
|
21710
|
-
version: "3.
|
|
21710
|
+
version: "3.14.0",
|
|
21711
21711
|
description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
|
|
21712
21712
|
keywords: [
|
|
21713
21713
|
"ai",
|
|
@@ -21859,7 +21859,20 @@ Safety model \u2014 tools are annotated by risk:
|
|
|
21859
21859
|
Before a batch of risky changes, consider enable_safe_mode: RouterOS then holds
|
|
21860
21860
|
every change in memory and auto-reverts if the session drops, so a mistake that
|
|
21861
21861
|
locks you out is undone automatically. commit_safe_mode persists; rollback
|
|
21862
|
-
discards. Prefer specific filters on list_* tools to keep output small
|
|
21862
|
+
discards. Prefer specific filters on list_* tools to keep output small.
|
|
21863
|
+
|
|
21864
|
+
Change workflow \u2014 ALWAYS take a restore point before a plan. Before calling
|
|
21865
|
+
plan_changes or apply_plan (or any batch of write/destructive tools), first call
|
|
21866
|
+
capture_config_snapshot to record the current configuration. These snapshots are
|
|
21867
|
+
captured with \`/export\` (a read-only print \u2014 it does NOT create a file on the
|
|
21868
|
+
router) and persisted to the MCP host's local database (~/.mikrotik-mcp/
|
|
21869
|
+
snapshots.db), so they add ZERO load to the MikroTik device's disk and leave
|
|
21870
|
+
nothing to clean up on the device. They survive device reboots/resets. After a
|
|
21871
|
+
change, use diff_config_snapshots (from=latest, to=live) to confirm exactly what
|
|
21872
|
+
changed, and if something is wrong, get_config_snapshot returns the prior
|
|
21873
|
+
\`/export\` text to restore from. Do NOT use create_backup/create_export for this
|
|
21874
|
+
pre-change restore point \u2014 those write files to the device's flash; prefer the
|
|
21875
|
+
local snapshot to keep the device's disk clean.`;
|
|
21863
21876
|
var MULTI_DEVICE_INSTRUCTIONS = `
|
|
21864
21877
|
|
|
21865
21878
|
Multiple devices are configured: {{names}} (default: {{default}}). Every tool
|
|
@@ -21886,12 +21899,7 @@ function createServer(opts = {}) {
|
|
|
21886
21899
|
}
|
|
21887
21900
|
]
|
|
21888
21901
|
}, {
|
|
21889
|
-
capabilities: {
|
|
21890
|
-
tools: { listChanged: true },
|
|
21891
|
-
prompts: { listChanged: true },
|
|
21892
|
-
resources: { listChanged: true },
|
|
21893
|
-
logging: {}
|
|
21894
|
-
},
|
|
21902
|
+
capabilities: {},
|
|
21895
21903
|
instructions
|
|
21896
21904
|
});
|
|
21897
21905
|
const sendLog = opts.sendLog ?? ((level, message) => {
|