mikromcp 1.13.1 → 1.13.2

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/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  [![CI](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml)
14
14
  [![Release](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml/badge.svg)](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml)
15
- [![Version](https://img.shields.io/badge/version-v1.13.1-2DD4BF)](package.json)
15
+ [![Version](https://img.shields.io/badge/version-v1.13.2-2DD4BF)](package.json)
16
16
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
17
17
  [![Node.js >= 22](https://img.shields.io/badge/node-%3E%3D22-339933)](package.json)
18
18
  [![RouterOS 7.x](https://img.shields.io/badge/RouterOS-7.x-293239)](https://help.mikrotik.com/docs/display/ROS/REST+API)
package/dist/main.js CHANGED
@@ -15860,7 +15860,7 @@ var ConnectionPool = class {
15860
15860
  };
15861
15861
 
15862
15862
  // src/version.ts
15863
- var VERSION = "1.13.1";
15863
+ var VERSION = "1.13.2";
15864
15864
 
15865
15865
  // src/mcp/server.ts
15866
15866
  var SERVER_INSTRUCTIONS = [
@@ -16338,7 +16338,7 @@ import { existsSync as existsSync3, readFileSync as readFileSync7 } from "fs";
16338
16338
  import { homedir as homedir2 } from "os";
16339
16339
  import * as net from "net";
16340
16340
  import chalk from "chalk";
16341
- var localVersion = "1.13.1";
16341
+ var localVersion = "1.13.2";
16342
16342
  var results = [];
16343
16343
  function ok(msg) {
16344
16344
  console.log(chalk.green("\u2705 ") + msg);
@@ -16467,7 +16467,52 @@ function checkDefaultRouter(defaultRouter, routers) {
16467
16467
  );
16468
16468
  }
16469
16469
  }
16470
+ async function checkSwosDevice(router) {
16471
+ console.log();
16472
+ console.log(chalk.bold(`Switch: ${router.id} (${router.host}, SwOS)`));
16473
+ let client;
16474
+ try {
16475
+ const creds = getCredentials(router);
16476
+ client = new SwosClient(router.host, router.port, creds);
16477
+ } catch (err) {
16478
+ const msg = err instanceof MikroMCPError ? err.message : String(err);
16479
+ indentFail(`Credentials error: ${msg}`);
16480
+ results.push({ passed: false, warning: false });
16481
+ return;
16482
+ }
16483
+ const startMs = Date.now();
16484
+ try {
16485
+ const sys = await client.get("sys.b");
16486
+ const latencyMs = Date.now() - startMs;
16487
+ const details = [
16488
+ typeof sys.identity === "string" && sys.identity ? `identity ${sys.identity}` : void 0,
16489
+ typeof sys.model === "string" && sys.model ? sys.model : void 0,
16490
+ typeof sys.version === "string" && sys.version ? `SwOS ${sys.version}` : void 0,
16491
+ `${latencyMs}ms`
16492
+ ].filter((d) => d !== void 0);
16493
+ indentOk(`SwOS API reachable (${details.join(", ")})`);
16494
+ results.push({ passed: true, warning: false });
16495
+ } catch (err) {
16496
+ const latencyMs = Date.now() - startMs;
16497
+ if (err instanceof HttpError && err.statusCode === 401) {
16498
+ indentFail(
16499
+ `SwOS API authentication failed (HTTP 401 after ${latencyMs}ms) \u2014 check the switch username/password`
16500
+ );
16501
+ } else {
16502
+ indentFail(
16503
+ `SwOS API not reachable after ${latencyMs}ms \u2014 ${err instanceof Error ? err.message : String(err)}`
16504
+ );
16505
+ }
16506
+ results.push({ passed: false, warning: false });
16507
+ } finally {
16508
+ client.close();
16509
+ }
16510
+ }
16470
16511
  async function checkRouter(router) {
16512
+ if (router.deviceType === "swos") {
16513
+ await checkSwosDevice(router);
16514
+ return;
16515
+ }
16471
16516
  console.log();
16472
16517
  console.log(chalk.bold(`Router: ${router.id} (${router.host})`));
16473
16518
  let client;
@@ -17083,7 +17128,7 @@ async function runInit() {
17083
17128
  }
17084
17129
 
17085
17130
  // src/cli/index.ts
17086
- var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.13.1");
17131
+ var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.13.2");
17087
17132
  program.command("serve", { isDefault: true }).description("Start the MCP server (default)").action(runServe);
17088
17133
  program.command("doctor").description("Check config, connectivity, and permissions").action(runDoctor);
17089
17134
  program.command("init").description("Interactive setup wizard").action(runInit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mikromcp",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "mcpName": "io.github.AliKarami/mikromcp",
5
5
  "description": "Production-grade MCP server for MikroTik RouterOS",
6
6
  "type": "module",