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.
- package/README.md +1 -1
- package/dist/main.js +24 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
[](https://github.com/AliKarami/MikroMCP/actions/workflows/ci.yml)
|
|
14
14
|
[](https://github.com/AliKarami/MikroMCP/actions/workflows/release.yml)
|
|
15
|
-
[](package.json)
|
|
16
16
|
[](LICENSE)
|
|
17
17
|
[](package.json)
|
|
18
18
|
[](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.
|
|
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.
|
|
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
|
-
|
|
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
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
console.log(chalk2.
|
|
9518
|
-
|
|
9519
|
-
|
|
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:
|
|
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(
|
|
9572
|
-
console.log(chalk2.dim(" 2.
|
|
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.
|
|
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);
|