@chkp/documentation-mcp 1.4.9 → 1.4.10

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/index.js CHANGED
@@ -533,6 +533,70 @@ var SettingsManager = class _SettingsManager {
533
533
  };
534
534
  SettingsManager.globalDebugState = void 0;
535
535
 
536
+ // ../mcp-utils/dist/telemetry.js
537
+ import machineIdPkg from "node-machine-id";
538
+ import { createHash } from "crypto";
539
+ var { machineIdSync } = machineIdPkg;
540
+ var machineId = null;
541
+ var hashedMachineId = null;
542
+ var transportType = "stdio";
543
+ function setTransportType(type) {
544
+ transportType = type;
545
+ }
546
+ function isTelemetryDisabled() {
547
+ return process.env.TELEMETRY_DISABLED === "true" || process.env.TELEMETRY_DISABLED === "1";
548
+ }
549
+ function getTelemetryUrl() {
550
+ return process.env.TELEMETRY_URL || "https://metrics.security.ai.checkpoint.com/api/v1/metrics/collect";
551
+ }
552
+ function hashString(input) {
553
+ return createHash("sha256").update(input).digest("hex");
554
+ }
555
+ function getMachineId() {
556
+ if (!machineId) {
557
+ try {
558
+ machineId = machineIdSync();
559
+ } catch (error) {
560
+ console.warn("Failed to get machine ID for telemetry:", error);
561
+ machineId = "unknown";
562
+ }
563
+ }
564
+ return machineId;
565
+ }
566
+ function getHashedMachineId() {
567
+ if (!hashedMachineId) {
568
+ hashedMachineId = hashString(getMachineId());
569
+ }
570
+ return hashedMachineId;
571
+ }
572
+ function calculateChecksum(mcpName, toolName, machineId2, clientVersion) {
573
+ const data = mcpName + machineId2.slice(0, 16) + toolName + clientVersion;
574
+ return hashString(data);
575
+ }
576
+ async function trackToolCall(mcpName, toolName, clientVersion, extra) {
577
+ if (isTelemetryDisabled()) {
578
+ return;
579
+ }
580
+ try {
581
+ const machineId2 = getHashedMachineId();
582
+ const checksum = calculateChecksum(mcpName, toolName, machineId2, clientVersion);
583
+ fetch(getTelemetryUrl(), {
584
+ method: "POST",
585
+ headers: { "Content-Type": "application/json" },
586
+ body: JSON.stringify({
587
+ mcp_name: mcpName,
588
+ tool_name: toolName,
589
+ machine_id: machineId2,
590
+ client_version: clientVersion,
591
+ transport_type: transportType,
592
+ checksum
593
+ })
594
+ }).catch(() => {
595
+ });
596
+ } catch (error) {
597
+ }
598
+ }
599
+
536
600
  // ../mcp-utils/dist/launcher.js
537
601
  async function launchMCPServer(configPath, serverModule2) {
538
602
  const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
@@ -576,11 +640,13 @@ async function launchMCPServer(configPath, serverModule2) {
576
640
  console.error("[launchMCPServer] Applying tool policy before connecting");
577
641
  serverModule2.server.applyToolPolicy();
578
642
  }
579
- const transportType = (options.transport || process.env.MCP_TRANSPORT_TYPE || "stdio").toLowerCase() === "http" ? "http" : "stdio";
643
+ const transportType2 = (options.transport || process.env.MCP_TRANSPORT_TYPE || "stdio").toLowerCase() === "http" ? "http" : "stdio";
580
644
  const transportPort = options.transportPort ? parseInt(options.transportPort, 10) : process.env.MCP_TRANSPORT_PORT ? parseInt(process.env.MCP_TRANSPORT_PORT, 10) : 3e3;
581
- if (transportType === "http") {
645
+ if (transportType2 === "http") {
646
+ setTransportType("http");
582
647
  await launchHTTPServer(config, serverModule2, transportPort);
583
648
  } else {
649
+ setTransportType("stdio");
584
650
  const transport = new StdioServerTransport();
585
651
  const defaultSessionId = "default";
586
652
  const sessionMetadata = {
@@ -1352,65 +1418,6 @@ function createServerModule(server2, Settings2, pkg2, apiManagerClass, toolPolic
1352
1418
  // ../mcp-utils/dist/index.js
1353
1419
  init_ui_dialog();
1354
1420
 
1355
- // ../mcp-utils/dist/telemetry.js
1356
- import machineIdPkg from "node-machine-id";
1357
- import { createHash } from "crypto";
1358
- var { machineIdSync } = machineIdPkg;
1359
- var machineId = null;
1360
- var hashedMachineId = null;
1361
- function isTelemetryDisabled() {
1362
- return process.env.TELEMETRY_DISABLED === "true" || process.env.TELEMETRY_DISABLED === "1";
1363
- }
1364
- function getTelemetryUrl() {
1365
- return process.env.TELEMETRY_URL || "https://metrics.security.ai.checkpoint.com/api/v1/metrics/collect";
1366
- }
1367
- function hashString(input) {
1368
- return createHash("sha256").update(input).digest("hex");
1369
- }
1370
- function getMachineId() {
1371
- if (!machineId) {
1372
- try {
1373
- machineId = machineIdSync();
1374
- } catch (error) {
1375
- console.warn("Failed to get machine ID for telemetry:", error);
1376
- machineId = "unknown";
1377
- }
1378
- }
1379
- return machineId;
1380
- }
1381
- function getHashedMachineId() {
1382
- if (!hashedMachineId) {
1383
- hashedMachineId = hashString(getMachineId());
1384
- }
1385
- return hashedMachineId;
1386
- }
1387
- function calculateChecksum(mcpName, toolName, machineId2, clientVersion) {
1388
- const data = mcpName + machineId2.slice(0, 16) + toolName + clientVersion;
1389
- return hashString(data);
1390
- }
1391
- async function trackToolCall(mcpName, toolName, clientVersion, extra) {
1392
- if (isTelemetryDisabled()) {
1393
- return;
1394
- }
1395
- try {
1396
- const machineId2 = getHashedMachineId();
1397
- const checksum = calculateChecksum(mcpName, toolName, machineId2, clientVersion);
1398
- fetch(getTelemetryUrl(), {
1399
- method: "POST",
1400
- headers: { "Content-Type": "application/json" },
1401
- body: JSON.stringify({
1402
- mcp_name: mcpName,
1403
- tool_name: toolName,
1404
- machine_id: machineId2,
1405
- client_version: clientVersion,
1406
- checksum
1407
- })
1408
- }).catch(() => {
1409
- });
1410
- } catch (error) {
1411
- }
1412
- }
1413
-
1414
1421
  // ../mcp-utils/dist/mcp-server.js
1415
1422
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1416
1423
  var CPMcpServer = class extends McpServer {
@@ -2061,7 +2068,7 @@ server.tool(
2061
2068
  - cloudguard: CloudGuard - Comprehensive cloud security and compliance platform
2062
2069
  - cloudguardnetwork: CloudGuard Network - Cloud network security solutions
2063
2070
  - cloudnetworksecurity: CloudGuard Network Security - Advanced cloud network protection
2064
- - appsec: CloudGuard WAF - Web Application Firewall and application security
2071
+ - appsec: Check Point WAF - Web Application Firewall and application security
2065
2072
 
2066
2073
  Endpoint & Device Security:
2067
2074
  - mobile: Harmony Mobile - Mobile device security and threat protection
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chkp/documentation-mcp",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Check Point Documentation Tool Service - API integration with Check Point Documentation Tool",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chkp/documentation-mcp",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Check Point Documentation Tool Service - API integration with Check Point Documentation Tool",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chkp/documentation-mcp",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Check Point Documentation Tool Service - API integration with Check Point Documentation Tool",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",