@usex/mikrotik-mcp 3.49.0 → 3.50.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 CHANGED
@@ -89,7 +89,7 @@ import {
89
89
  toggleAaaEntity,
90
90
  updateAaaEntity,
91
91
  writeBackup
92
- } from "./shared/cli-rcs47w19.js";
92
+ } from "./shared/cli-z6dyvbeb.js";
93
93
 
94
94
  // src/cli.ts
95
95
  import { existsSync as existsSync2 } from "fs";
@@ -1143,7 +1143,7 @@ function computeStats(events, opts) {
1143
1143
  // package.json
1144
1144
  var package_default = {
1145
1145
  name: "@usex/mikrotik-mcp",
1146
- version: "3.49.0",
1146
+ version: "3.50.0",
1147
1147
  description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
1148
1148
  keywords: [
1149
1149
  "ai",
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  resolveDeviceName,
22
22
  selectToolModules,
23
23
  setConfig
24
- } from "./shared/library-esjkmrg2.js";
24
+ } from "./shared/library-bpa5fz2e.js";
25
25
  // src/server.ts
26
26
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
27
27
  import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -131,7 +131,7 @@ function registerPrompts(server) {
131
131
  // package.json
132
132
  var package_default = {
133
133
  name: "@usex/mikrotik-mcp",
134
- version: "3.49.0",
134
+ version: "3.50.0",
135
135
  description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
136
136
  keywords: [
137
137
  "ai",
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./cli-rcs47w19.js";
7
+ } from "./cli-z6dyvbeb.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
@@ -6321,7 +6321,7 @@ var cache = null;
6321
6321
  async function gateway() {
6322
6322
  if (cache)
6323
6323
  return cache;
6324
- const { moduleCatalog } = await import("./cli-frtfsqcq.js");
6324
+ const { moduleCatalog } = await import("./cli-p080cnxa.js");
6325
6325
  const forIndex = [];
6326
6326
  const byName = new Map;
6327
6327
  for (const mod of moduleCatalog) {
@@ -25018,6 +25018,30 @@ For legacy systems:
25018
25018
 
25019
25019
  ${details}`;
25020
25020
  }
25021
+ }),
25022
+ defineTool({
25023
+ name: "list_wifi_countries",
25024
+ title: "List Wi-Fi Regulatory Countries",
25025
+ annotations: READ,
25026
+ description: "Lists all available regulatory country codes for wireless configuration " + "(`<auto-detected path> country print`). Each entry shows the country name/code and the " + "regulatory constraints it implies (allowed frequencies, max TX power, DFS rules, etc.). " + "Use this to discover valid values before setting a country on a wireless interface.",
25027
+ inputSchema: {
25028
+ search: z116.string().optional().describe("Optional search string to filter countries by name or code.")
25029
+ },
25030
+ async handler(a, ctx) {
25031
+ ctx.info("Listing Wi-Fi regulatory countries");
25032
+ const interfaceType = await detectWirelessInterfaceType(ctx);
25033
+ if (!interfaceType)
25034
+ return "Error: No wireless interface support detected on this device.";
25035
+ const cmd = a.search ? `${interfaceType} country print where name~${quoteValue(a.search)}` : `${interfaceType} country print`;
25036
+ const result = await executeMikrotikCommand(cmd, ctx);
25037
+ if (looksLikeError(result))
25038
+ return `Failed to list Wi-Fi countries: ${result}`;
25039
+ if (isEmpty(result))
25040
+ return `No countries found${a.search ? ` matching "${a.search}".` : "."}`;
25041
+ return `WI-FI REGULATORY COUNTRIES:
25042
+
25043
+ ${result}`;
25044
+ }
25021
25045
  })
25022
25046
  ];
25023
25047
 
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules,
5
5
  moduleCatalog,
6
6
  selectToolModules
7
- } from "./library-esjkmrg2.js";
7
+ } from "./library-bpa5fz2e.js";
8
8
  export {
9
9
  selectToolModules,
10
10
  moduleCatalog,
@@ -6262,7 +6262,7 @@ var cache = null;
6262
6262
  async function gateway() {
6263
6263
  if (cache)
6264
6264
  return cache;
6265
- const { moduleCatalog } = await import("./library-xvsabg24.js");
6265
+ const { moduleCatalog } = await import("./library-5yx3nvtf.js");
6266
6266
  const forIndex = [];
6267
6267
  const byName = new Map;
6268
6268
  for (const mod of moduleCatalog) {
@@ -24959,6 +24959,30 @@ For legacy systems:
24959
24959
 
24960
24960
  ${details}`;
24961
24961
  }
24962
+ }),
24963
+ defineTool({
24964
+ name: "list_wifi_countries",
24965
+ title: "List Wi-Fi Regulatory Countries",
24966
+ annotations: READ,
24967
+ description: "Lists all available regulatory country codes for wireless configuration " + "(`<auto-detected path> country print`). Each entry shows the country name/code and the " + "regulatory constraints it implies (allowed frequencies, max TX power, DFS rules, etc.). " + "Use this to discover valid values before setting a country on a wireless interface.",
24968
+ inputSchema: {
24969
+ search: z116.string().optional().describe("Optional search string to filter countries by name or code.")
24970
+ },
24971
+ async handler(a, ctx) {
24972
+ ctx.info("Listing Wi-Fi regulatory countries");
24973
+ const interfaceType = await detectWirelessInterfaceType(ctx);
24974
+ if (!interfaceType)
24975
+ return "Error: No wireless interface support detected on this device.";
24976
+ const cmd = a.search ? `${interfaceType} country print where name~${quoteValue(a.search)}` : `${interfaceType} country print`;
24977
+ const result = await executeMikrotikCommand(cmd, ctx);
24978
+ if (looksLikeError(result))
24979
+ return `Failed to list Wi-Fi countries: ${result}`;
24980
+ if (isEmpty(result))
24981
+ return `No countries found${a.search ? ` matching "${a.search}".` : "."}`;
24982
+ return `WI-FI REGULATORY COUNTRIES:
24983
+
24984
+ ${result}`;
24985
+ }
24962
24986
  })
24963
24987
  ];
24964
24988
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usex/mikrotik-mcp",
3
- "version": "3.49.0",
3
+ "version": "3.50.0",
4
4
  "description": "MCP server for MikroTik RouterOS — 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
5
5
  "keywords": [
6
6
  "ai",
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 767 tools: `name`, `risk`, `title`, `description`, and input JSON Schema. |
10
+ | `tool-catalog.json` | Every one of the 768 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,8 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "3.42.0",
3
+ "version": "3.49.0",
4
4
  "generated": "by scripts/gen-schemas.ts — do not edit by hand",
5
- "toolCount": 767,
5
+ "toolCount": 768,
6
6
  "tools": [
7
7
  {
8
8
  "name": "find_tools",
@@ -13,7 +13,7 @@
13
13
  "idempotentHint": true,
14
14
  "openWorldHint": false
15
15
  },
16
- "description": "Search the FULL MikroTik tool catalog by intent and get back the tools that best match use this FIRST whenever you can't immediately see the specific tool you need among the listed tools (the host only surfaces a subset of the several-hundred-tool catalog). Describe the task 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, what it does, and its parameter names — then call it directly if it's already available, or run it via `invoke_tool`. For IPv4 vs IPv6, say which: 'ipv4'/'ipv6' disambiguates the result.",
16
+ "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.",
17
17
  "inputSchema": {
18
18
  "$schema": "https://json-schema.org/draft/2020-12/schema",
19
19
  "type": "object",
@@ -97,7 +97,7 @@
97
97
  "destructiveHint": false,
98
98
  "openWorldHint": false
99
99
  },
100
- "description": "Execute ANY single RouterOS / MikroTik CLI command on the device and return its console output the universal primitive to read or change anything when no dedicated tool fits, for uncommon or bulk operations, or simply when you can't quickly find the specific tool among the catalog. Pass the command EXACTLY as typed in the RouterOS terminal, e.g. `/system identity set name=Router1`, `/ip dns set servers=1.1.1.1,8.8.8.8 allow-remote-requests=yes`, `/ip address print`, `/ip firewall filter print`, `/interface print`, `/ip service print`, `/system resource print`. Works for reads (`… print`) and writes (`… set` / `add` / `remove`). Runs one command per call call again with a `… print` to verify a change. Prefer a dedicated tool when you know its name (better validation and structured output); use this whenever discovery is the bottleneck. WARNING: the command is run as-is and is NOT validated — it can be destructive (e.g. `/system reset-configuration`, removing the management address), so review it before running. For a stored multi-command script use add_script then run_script.",
100
+ "description": "⚠️ LAST RESORT do NOT call this tool directly. ALWAYS call `find_tools` first to locate the dedicated tool for your task, then run it via `invoke_tool`. Dedicated tools provide schema validation, structured output, and accurate risk annotations that this raw command lacks. Only use this tool when `find_tools` returned zero results for your query AND you are certain no dedicated tool exists.\n\nWhen you do use it: pass one RouterOS CLI command exactly as typed in the terminal. The command is executed as-is with NO validation — it can be destructive, so review carefully. Runs one command per call; call again with `… print` to verify a change. For multi-command scripts use add_script + run_script instead.",
101
101
  "inputSchema": {
102
102
  "$schema": "https://json-schema.org/draft/2020-12/schema",
103
103
  "type": "object",
@@ -1720,6 +1720,28 @@
1720
1720
  "additionalProperties": false
1721
1721
  }
1722
1722
  },
1723
+ {
1724
+ "name": "list_wifi_countries",
1725
+ "title": "List Wi-Fi Regulatory Countries",
1726
+ "risk": "read",
1727
+ "annotations": {
1728
+ "readOnlyHint": true,
1729
+ "idempotentHint": true,
1730
+ "openWorldHint": false
1731
+ },
1732
+ "description": "Lists all available regulatory country codes for wireless configuration (`<auto-detected path> country print`). Each entry shows the country name/code and the regulatory constraints it implies (allowed frequencies, max TX power, DFS rules, etc.). Use this to discover valid values before setting a country on a wireless interface.",
1733
+ "inputSchema": {
1734
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1735
+ "type": "object",
1736
+ "properties": {
1737
+ "search": {
1738
+ "description": "Optional search string to filter countries by name or code.",
1739
+ "type": "string"
1740
+ }
1741
+ },
1742
+ "additionalProperties": false
1743
+ }
1744
+ },
1723
1745
  {
1724
1746
  "name": "tune_wifi_channel",
1725
1747
  "title": "Survey & Tune Wi-Fi Channel",
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "list_wifi_countries",
4
+ "type": "object",
5
+ "properties": {
6
+ "search": {
7
+ "description": "Optional search string to filter countries by name or code.",
8
+ "type": "string"
9
+ }
10
+ },
11
+ "additionalProperties": false
12
+ }