mikromcp 1.0.5 → 1.0.6

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/main.js +24 -24
  3. package/package.json +1 -1
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.0.5-EA580C)](package.json)
15
+ [![Version](https://img.shields.io/badge/version-v1.0.6-EA580C)](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
@@ -8614,7 +8614,7 @@ function createServerFactory(config, identityRegistry) {
8614
8614
  const makeServer = () => {
8615
8615
  const server = new McpServer({
8616
8616
  name: "mikromcp",
8617
- version: "1.0.5"
8617
+ version: "1.0.6"
8618
8618
  });
8619
8619
  registerAllTools(server, registry, pool, circuitBreakers, config, identityRegistry);
8620
8620
  return server;
@@ -8937,7 +8937,7 @@ import { existsSync as existsSync3, readFileSync as readFileSync6 } from "fs";
8937
8937
  import { homedir as homedir3 } from "os";
8938
8938
  import * as net from "net";
8939
8939
  import chalk from "chalk";
8940
- var localVersion = "1.0.5";
8940
+ var localVersion = "1.0.6";
8941
8941
  var results = [];
8942
8942
  function ok(msg) {
8943
8943
  console.log(chalk.green("\u2705 ") + msg);
@@ -9464,14 +9464,8 @@ function writeDotEnv(data) {
9464
9464
  "# \u2500\u2500 RBAC (optional, for stdio with identity enforcement) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
9465
9465
  "# MIKROMCP_STDIO_IDENTITY="
9466
9466
  ];
9467
- const content = lines.join("\n") + "\n";
9468
9467
  mkdirSync3(data.configDir, { recursive: true });
9469
- if (existsSync4(data.envPath)) {
9470
- const existing = readFileSync7(data.envPath, "utf-8");
9471
- writeFileSync2(data.envPath, existing.endsWith("\n") ? existing + "\n" + content : existing + "\n\n" + content);
9472
- } else {
9473
- writeFileSync2(data.envPath, content);
9474
- }
9468
+ writeFileSync2(data.envPath, lines.join("\n") + "\n");
9475
9469
  }
9476
9470
  function registerClaudeDesktop() {
9477
9471
  const configPath = findClaudeDesktopConfig();
@@ -9505,21 +9499,28 @@ function registerClaudeDesktop() {
9505
9499
  }
9506
9500
  async function runInit() {
9507
9501
  console.log(chalk2.bold.cyan("\n\u{1F527} MikroMCP \u2014 Interactive Setup Wizard\n"));
9508
- const routerInfo = await collectRouterInfo();
9509
- const identityInfo = await collectIdentityInfo();
9510
9502
  const configDir = mikromcpDir2();
9511
9503
  const envPath = join4(configDir, ".env");
9512
- const transport2 = await collectTransport();
9513
- const writeEnv = await collectEnvPreference();
9514
- let writeRouters = true;
9515
- const routersYamlPath = join4(configDir, "routers.yaml");
9516
- if (existsSync4(routersYamlPath)) {
9517
- console.log(chalk2.bold("\n\u2500\u2500 Config files \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
9518
- writeRouters = await confirm({
9519
- message: "routers.yaml already exists. Add this router to it?",
9504
+ const existingFiles = [".env", "routers.yaml", "identities.yaml"].filter(
9505
+ (f) => existsSync4(join4(configDir, f))
9506
+ );
9507
+ if (existingFiles.length > 0) {
9508
+ console.log(chalk2.yellow(` \u26A0 Found existing files in ${configDir}:`));
9509
+ for (const f of existingFiles) console.log(chalk2.yellow(` ${f}`));
9510
+ console.log();
9511
+ const proceed = await confirm({
9512
+ message: "Continue? (existing files will be overwritten or merged)",
9520
9513
  default: true
9521
9514
  });
9515
+ if (!proceed) {
9516
+ console.log(chalk2.dim(" Aborted."));
9517
+ return;
9518
+ }
9522
9519
  }
9520
+ const routerInfo = await collectRouterInfo();
9521
+ const identityInfo = await collectIdentityInfo();
9522
+ const transport2 = await collectTransport();
9523
+ const writeEnv = await collectEnvPreference();
9523
9524
  const registerDesktop = await collectClaudeDesktopPreference();
9524
9525
  const data = {
9525
9526
  ...routerInfo,
@@ -9528,7 +9529,7 @@ async function runInit() {
9528
9529
  envPath,
9529
9530
  configDir,
9530
9531
  writeEnv,
9531
- writeRoutersYaml: writeRouters,
9532
+ writeRoutersYaml: true,
9532
9533
  writeIdentitiesYaml: identityInfo.createIdentity,
9533
9534
  registerClaudeDesktop: registerDesktop
9534
9535
  };
@@ -9568,14 +9569,13 @@ async function runInit() {
9568
9569
  );
9569
9570
  }
9570
9571
  console.log(chalk2.bold("\nNext steps:"));
9571
- console.log(chalk2.dim(` 1. Fill in router credentials in ${data.envPath}`));
9572
- console.log(chalk2.dim(" 2. Run: mikromcp doctor"));
9573
- console.log(chalk2.dim(" 3. Restart Claude Desktop to load the MCP server"));
9572
+ console.log(chalk2.dim(" 1. Run: mikromcp doctor"));
9573
+ console.log(chalk2.dim(" 2. Restart Claude Desktop to load the MCP server"));
9574
9574
  console.log();
9575
9575
  }
9576
9576
 
9577
9577
  // src/cli/index.ts
9578
- var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.0.5");
9578
+ var program = new Command().name("mikromcp").description("MikroTik RouterOS MCP server").version("1.0.6");
9579
9579
  program.command("serve", { isDefault: true }).description("Start the MCP server (default)").action(runServe);
9580
9580
  program.command("doctor").description("Check config, connectivity, and permissions").action(runDoctor);
9581
9581
  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.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Production-grade MCP server for MikroTik RouterOS",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",