@usex/mikrotik-mcp 3.44.0 → 3.46.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
@@ -1131,9 +1131,187 @@ function computeStats(events, opts) {
1131
1131
  windowMs: span
1132
1132
  };
1133
1133
  }
1134
+ // package.json
1135
+ var package_default = {
1136
+ name: "@usex/mikrotik-mcp",
1137
+ version: "3.46.0",
1138
+ description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
1139
+ keywords: [
1140
+ "ai",
1141
+ "bun",
1142
+ "claude",
1143
+ "mcp",
1144
+ "mikrotik",
1145
+ "mikrotik mcp"
1146
+ ],
1147
+ homepage: "https://mikrotik-mcp.usestrict.dev",
1148
+ bugs: {
1149
+ url: "https://github.com/ali-master/mikrotik-mcp/issues"
1150
+ },
1151
+ license: "MIT",
1152
+ author: {
1153
+ name: "Ali Torki",
1154
+ email: "ali_4286@live.com",
1155
+ url: "https://github.com/ali-master"
1156
+ },
1157
+ repository: {
1158
+ type: "git",
1159
+ url: "https://github.com/ali-master/mikrotik-mcp.git"
1160
+ },
1161
+ bin: {
1162
+ "mikrotik-mcp": "dist/cli.js"
1163
+ },
1164
+ files: [
1165
+ "dist",
1166
+ "prompts",
1167
+ "schemas"
1168
+ ],
1169
+ type: "module",
1170
+ main: "dist/index.js",
1171
+ module: "dist/index.js",
1172
+ types: "dist/index.d.ts",
1173
+ exports: {
1174
+ ".": {
1175
+ types: "./dist/index.d.ts",
1176
+ import: "./dist/index.js"
1177
+ }
1178
+ },
1179
+ publishConfig: {
1180
+ access: "public"
1181
+ },
1182
+ scripts: {
1183
+ build: "bunup && chmod +x dist/cli.js && bun run build:ui",
1184
+ "build:ui": "bun run scripts/build-ui.ts",
1185
+ dev: "bunup --watch",
1186
+ prepack: "bunup && chmod +x dist/cli.js && bun run build:ui",
1187
+ "auth-check": "bun run src/cli.ts auth-check",
1188
+ "gen:schemas": "bun run scripts/gen-schemas.ts",
1189
+ "gen:docs": "bun run scripts/gen-tool-docs.ts",
1190
+ gen: "bun run gen:schemas && bun run gen:docs",
1191
+ start: "bun run src/cli.ts serve",
1192
+ discover: "bun run scripts/discover-macs.ts",
1193
+ inspect: "bunx @modelcontextprotocol/inspector bun run src/cli.ts serve",
1194
+ "inspect:built": "bun run build && bunx @modelcontextprotocol/inspector bun dist/cli.js serve",
1195
+ "inspect:config": "bunx @modelcontextprotocol/inspector --config mcp-inspector.config.json --server mikrotik",
1196
+ "inspect:cli": "bunx @modelcontextprotocol/inspector --cli bun run src/cli.ts serve --method tools/list",
1197
+ "inspect:config:local": "bunx @modelcontextprotocol/inspector --config /var/open-source/mikrotik-mcp/mcp-inspector.config.local.json --server mikrotik",
1198
+ test: "vp test run",
1199
+ "test:watch": "vp test",
1200
+ release: "release-it",
1201
+ "test:types": "tsc --noEmit",
1202
+ check: "vp check",
1203
+ lint: "vp lint",
1204
+ "lint:fix": "vp lint --fix",
1205
+ format: "vp fmt --check",
1206
+ "format:fix": "vp fmt --write",
1207
+ prepare: "vp config"
1208
+ },
1209
+ dependencies: {
1210
+ "@modelcontextprotocol/ext-apps": "^1.7.4",
1211
+ "@modelcontextprotocol/sdk": "^1.29.0",
1212
+ "@tikoci/centrs": "^0.1.0",
1213
+ "ipaddr.js": "^2.4.0",
1214
+ ssh2: "^1.17.0",
1215
+ zod: "^4.4.3"
1216
+ },
1217
+ devDependencies: {
1218
+ "@resvg/resvg-js": "^2.6.2",
1219
+ "@tailwindcss/vite": "^4.3.2",
1220
+ "@types/bun": "latest",
1221
+ "@types/node": "^26.0.1",
1222
+ "@types/react": "^19.2.17",
1223
+ "@types/react-dom": "^19.2.3",
1224
+ "@types/ssh2": "^1.15.5",
1225
+ "@types/update-notifier": "^6.0.8",
1226
+ bunup: "^0.16.32",
1227
+ "class-variance-authority": "^0.7.1",
1228
+ clsx: "^2.1.1",
1229
+ gsap: "^3.15.0",
1230
+ prettier: "^3.9.4",
1231
+ react: "^19.2.7",
1232
+ "react-dom": "^19.2.7",
1233
+ recharts: "^3.9.0",
1234
+ "release-it": "^20.2.1",
1235
+ "tailwind-merge": "^3.6.0",
1236
+ tailwindcss: "^4.3.2",
1237
+ vite: "npm:@voidzero-dev/vite-plus-core@latest",
1238
+ "vite-plus": "latest"
1239
+ },
1240
+ peerDependencies: {
1241
+ typescript: "^6.0.3"
1242
+ },
1243
+ overrides: {
1244
+ vite: "npm:@voidzero-dev/vite-plus-core@latest",
1245
+ vitest: "4.1.9"
1246
+ },
1247
+ engines: {
1248
+ bun: ">=1.3.0"
1249
+ },
1250
+ packageManager: "bun@1.3.14",
1251
+ changelog: {
1252
+ labels: {
1253
+ feature: "Features",
1254
+ bug: "Bug fixes",
1255
+ enhancement: "Enhancements",
1256
+ docs: "Docs",
1257
+ dependencies: "Dependencies",
1258
+ "type: code style": "Code style tweaks",
1259
+ "status: blocked": "Breaking changes",
1260
+ "breaking change": "Breaking changes"
1261
+ }
1262
+ },
1263
+ logo: "https://raw.githubusercontent.com/ali-master/mikrotik-mcp/master/assets/logo.svg",
1264
+ logoIcon: "https://raw.githubusercontent.com/ali-master/mikrotik-mcp/master/assets/logo-icon.svg"
1265
+ };
1266
+
1267
+ // src/version.ts
1268
+ var VERSION = package_default.version;
1269
+ var WEBSITE_URL = package_default.homepage;
1270
+ var LOGO_URL = package_default.logoIcon;
1271
+ var SERVER_TITLE = package_default.name;
1272
+ var SERVER_DESCRIPTION = package_default.description;
1273
+ var SERVER_NAME = "mcp-mikrotik";
1134
1274
 
1135
1275
  // src/observability/dashboard.ts
1136
1276
  var SERVER_TAG2 = "mikrotik-mcp";
1277
+ var releaseCache = null;
1278
+ var RELEASE_CACHE_TTL = 15 * 60 * 1000;
1279
+ function compareVersions(a, b) {
1280
+ const pa = a.replace(/^v/, "").split(".").map(Number);
1281
+ const pb = b.replace(/^v/, "").split(".").map(Number);
1282
+ for (let i = 0;i < Math.max(pa.length, pb.length); i++) {
1283
+ const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
1284
+ if (diff !== 0)
1285
+ return diff;
1286
+ }
1287
+ return 0;
1288
+ }
1289
+ async function fetchLatestRelease() {
1290
+ if (releaseCache && Date.now() - releaseCache.fetchedAt < RELEASE_CACHE_TTL) {
1291
+ return releaseCache.data;
1292
+ }
1293
+ const res = await fetch("https://api.github.com/repos/ali-master/mikrotik-mcp/releases/latest", {
1294
+ headers: {
1295
+ accept: "application/vnd.github+json",
1296
+ "user-agent": "mikrotik-mcp-dashboard"
1297
+ }
1298
+ });
1299
+ if (!res.ok)
1300
+ throw new Error(`GitHub API ${res.status}`);
1301
+ const gh = await res.json();
1302
+ const latestVersion = gh.tag_name.replace(/^v/, "");
1303
+ const data = {
1304
+ version: latestVersion,
1305
+ name: gh.name || `v${latestVersion}`,
1306
+ body: gh.body || "",
1307
+ publishedAt: gh.published_at,
1308
+ url: gh.html_url,
1309
+ isNewer: compareVersions(latestVersion, VERSION) > 0,
1310
+ currentVersion: VERSION
1311
+ };
1312
+ releaseCache = { data, fetchedAt: Date.now() };
1313
+ return data;
1314
+ }
1137
1315
  var JSON_HEADERS = { "content-type": "application/json; charset=utf-8" };
1138
1316
  function json(body, status = 200) {
1139
1317
  return new Response(JSON.stringify(body), { status, headers: JSON_HEADERS });
@@ -2049,10 +2227,18 @@ async function runDashboard(cfg, transportLabel) {
2049
2227
  headers: { "content-type": "text/html; charset=utf-8" }
2050
2228
  });
2051
2229
  }
2230
+ if (url.pathname === "/api/releases/latest") {
2231
+ try {
2232
+ return json(await fetchLatestRelease());
2233
+ } catch (e) {
2234
+ return json({ error: e instanceof Error ? e.message : "fetch failed" }, 502);
2235
+ }
2236
+ }
2052
2237
  if (url.pathname === "/api/meta") {
2053
2238
  const f = facets(db);
2054
2239
  return json({
2055
2240
  ...f,
2241
+ version: VERSION,
2056
2242
  risks: ["READ", "WRITE", "WRITE_IDEMPOTENT", "DESTRUCTIVE", "DANGEROUS"],
2057
2243
  total: db.total(),
2058
2244
  liveClients: subscriberCount(),
@@ -2284,146 +2470,6 @@ function registerPrompts(server) {
2284
2470
  }
2285
2471
  return count;
2286
2472
  }
2287
- // package.json
2288
- var package_default = {
2289
- name: "@usex/mikrotik-mcp",
2290
- version: "3.44.0",
2291
- description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
2292
- keywords: [
2293
- "ai",
2294
- "bun",
2295
- "claude",
2296
- "mcp",
2297
- "mikrotik",
2298
- "mikrotik mcp"
2299
- ],
2300
- homepage: "https://mikrotik-mcp.usestrict.dev",
2301
- bugs: {
2302
- url: "https://github.com/ali-master/mikrotik-mcp/issues"
2303
- },
2304
- license: "MIT",
2305
- author: {
2306
- name: "Ali Torki",
2307
- email: "ali_4286@live.com",
2308
- url: "https://github.com/ali-master"
2309
- },
2310
- repository: {
2311
- type: "git",
2312
- url: "https://github.com/ali-master/mikrotik-mcp.git"
2313
- },
2314
- bin: {
2315
- "mikrotik-mcp": "dist/cli.js"
2316
- },
2317
- files: [
2318
- "dist",
2319
- "prompts",
2320
- "schemas"
2321
- ],
2322
- type: "module",
2323
- main: "dist/index.js",
2324
- module: "dist/index.js",
2325
- types: "dist/index.d.ts",
2326
- exports: {
2327
- ".": {
2328
- types: "./dist/index.d.ts",
2329
- import: "./dist/index.js"
2330
- }
2331
- },
2332
- publishConfig: {
2333
- access: "public"
2334
- },
2335
- scripts: {
2336
- build: "bunup && chmod +x dist/cli.js && bun run build:ui",
2337
- "build:ui": "bun run scripts/build-ui.ts",
2338
- dev: "bunup --watch",
2339
- prepack: "bunup && chmod +x dist/cli.js && bun run build:ui",
2340
- "auth-check": "bun run src/cli.ts auth-check",
2341
- "gen:schemas": "bun run scripts/gen-schemas.ts",
2342
- "gen:docs": "bun run scripts/gen-tool-docs.ts",
2343
- gen: "bun run gen:schemas && bun run gen:docs",
2344
- start: "bun run src/cli.ts serve",
2345
- discover: "bun run scripts/discover-macs.ts",
2346
- inspect: "bunx @modelcontextprotocol/inspector bun run src/cli.ts serve",
2347
- "inspect:built": "bun run build && bunx @modelcontextprotocol/inspector bun dist/cli.js serve",
2348
- "inspect:config": "bunx @modelcontextprotocol/inspector --config mcp-inspector.config.json --server mikrotik",
2349
- "inspect:cli": "bunx @modelcontextprotocol/inspector --cli bun run src/cli.ts serve --method tools/list",
2350
- "inspect:config:local": "bunx @modelcontextprotocol/inspector --config /var/open-source/mikrotik-mcp/mcp-inspector.config.local.json --server mikrotik",
2351
- test: "vp test run",
2352
- "test:watch": "vp test",
2353
- release: "release-it",
2354
- "test:types": "tsc --noEmit",
2355
- check: "vp check",
2356
- lint: "vp lint",
2357
- "lint:fix": "vp lint --fix",
2358
- format: "vp fmt --check",
2359
- "format:fix": "vp fmt --write",
2360
- prepare: "vp config"
2361
- },
2362
- dependencies: {
2363
- "@modelcontextprotocol/ext-apps": "^1.7.4",
2364
- "@modelcontextprotocol/sdk": "^1.29.0",
2365
- "@tikoci/centrs": "^0.1.0",
2366
- "ipaddr.js": "^2.4.0",
2367
- ssh2: "^1.17.0",
2368
- zod: "^4.4.3"
2369
- },
2370
- devDependencies: {
2371
- "@resvg/resvg-js": "^2.6.2",
2372
- "@tailwindcss/vite": "^4.3.2",
2373
- "@types/bun": "latest",
2374
- "@types/node": "^26.0.1",
2375
- "@types/react": "^19.2.17",
2376
- "@types/react-dom": "^19.2.3",
2377
- "@types/ssh2": "^1.15.5",
2378
- "@types/update-notifier": "^6.0.8",
2379
- bunup: "^0.16.32",
2380
- "class-variance-authority": "^0.7.1",
2381
- clsx: "^2.1.1",
2382
- gsap: "^3.15.0",
2383
- prettier: "^3.9.4",
2384
- react: "^19.2.7",
2385
- "react-dom": "^19.2.7",
2386
- recharts: "^3.9.0",
2387
- "release-it": "^20.2.1",
2388
- "tailwind-merge": "^3.6.0",
2389
- tailwindcss: "^4.3.2",
2390
- vite: "npm:@voidzero-dev/vite-plus-core@latest",
2391
- "vite-plus": "latest"
2392
- },
2393
- peerDependencies: {
2394
- typescript: "^6.0.3"
2395
- },
2396
- overrides: {
2397
- vite: "npm:@voidzero-dev/vite-plus-core@latest",
2398
- vitest: "4.1.9"
2399
- },
2400
- engines: {
2401
- bun: ">=1.3.0"
2402
- },
2403
- packageManager: "bun@1.3.14",
2404
- changelog: {
2405
- labels: {
2406
- feature: "Features",
2407
- bug: "Bug fixes",
2408
- enhancement: "Enhancements",
2409
- docs: "Docs",
2410
- dependencies: "Dependencies",
2411
- "type: code style": "Code style tweaks",
2412
- "status: blocked": "Breaking changes",
2413
- "breaking change": "Breaking changes"
2414
- }
2415
- },
2416
- logo: "https://raw.githubusercontent.com/ali-master/mikrotik-mcp/master/assets/logo.svg",
2417
- logoIcon: "https://raw.githubusercontent.com/ali-master/mikrotik-mcp/master/assets/logo-icon.svg"
2418
- };
2419
-
2420
- // src/version.ts
2421
- var VERSION = package_default.version;
2422
- var WEBSITE_URL = package_default.homepage;
2423
- var LOGO_URL = package_default.logoIcon;
2424
- var SERVER_TITLE = package_default.name;
2425
- var SERVER_DESCRIPTION = package_default.description;
2426
- var SERVER_NAME = "mcp-mikrotik";
2427
2473
 
2428
2474
  // src/server.ts
2429
2475
  var INSTRUCTIONS = `MikroTik RouterOS management over SSH.
package/dist/index.js CHANGED
@@ -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.44.0",
134
+ version: "3.46.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",