it-tools-mcp 5.2.4 → 5.2.5
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import * as crypto from "crypto";
|
|
2
3
|
export function registerMacAddressGenerate(server) {
|
|
3
4
|
server.registerTool("generate_mac_address", {
|
|
4
5
|
description: "Generate random MAC address",
|
|
@@ -29,9 +30,13 @@ export function registerMacAddressGenerate(server) {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
// Generate remaining parts
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
if (macParts.length < 6) {
|
|
34
|
+
const neededBytes = 6 - macParts.length;
|
|
35
|
+
const randomBytes = crypto.randomBytes(neededBytes);
|
|
36
|
+
for (let i = 0; i < neededBytes; i++) {
|
|
37
|
+
const randomByte = randomBytes[i].toString(16).padStart(2, '0').toUpperCase();
|
|
38
|
+
macParts.push(randomByte);
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
41
|
// Ensure first octet indicates locally administered unicast
|
|
37
42
|
if (!prefix) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "it-tools-mcp",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5",
|
|
4
4
|
"description": "Full MCP 2025-06-18 compliant server with 121+ IT tools, logging, ping, progress tracking, cancellation, and sampling utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|