@chkp/documentation-mcp 0.1.7 → 1.1.0
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/CHANGELOG.md +12 -0
- package/README.md +12 -4
- package/dist/index.js +171 -15
- package/dist/package.json +4 -3
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @chkp/documentation-mcp
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3870c17: Updated implementation and features, Updated configuration, Modified 3 file(s) (synced from internal repository)
|
|
8
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2c71da0: Updated configuration, Modified 2 file(s) (synced from internal repository)
|
|
14
|
+
|
|
3
15
|
## 0.1.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ This server accesses Check Point documentation resources and may have rate limit
|
|
|
40
40
|
|
|
41
41
|
## Configuration Options
|
|
42
42
|
|
|
43
|
+
> **📊 Anonymous Usage Statistics:** Check Point collects anonymous usage statistics to help improve this MCP server. To opt out, set `TELEMETRY_DISABLED=true` or use `--no-telemetry` flag.
|
|
44
|
+
|
|
43
45
|
This server supports configuration via command-line arguments or environment variables:
|
|
44
46
|
|
|
45
47
|
### API Configuration
|
|
@@ -85,8 +87,8 @@ Download and install the latest version of [Node.js](https://nodejs.org/en/downl
|
|
|
85
87
|
You can check your installed version by running:
|
|
86
88
|
|
|
87
89
|
```bash
|
|
88
|
-
node -v # Should print "
|
|
89
|
-
nvm current # Should print "
|
|
90
|
+
node -v # Should print "v20" or higher
|
|
91
|
+
nvm current # Should print "v20" or higher
|
|
90
92
|
```
|
|
91
93
|
|
|
92
94
|
### Supported Clients
|
|
@@ -195,7 +197,7 @@ Add the configuration as Claude Desktop App.
|
|
|
195
197
|
|
|
196
198
|
### Prerequisites
|
|
197
199
|
|
|
198
|
-
- Node.js
|
|
200
|
+
- Node.js 20+
|
|
199
201
|
- npm 10+
|
|
200
202
|
|
|
201
203
|
### Setup
|
|
@@ -226,4 +228,10 @@ node FULL_PATH_TO_SERVER/packages/copilot/dist/index.js --client-id "YOUR_CLIENT
|
|
|
226
228
|
|
|
227
229
|
1. **Authentication keys and credentials are never shared with the model.** They are used only by the MCP server to authenticate with your Check Point management system.
|
|
228
230
|
2. **Only use client implementations you trust.** Malicious or untrusted clients could misuse your credentials or access data improperly.
|
|
229
|
-
3. **Management data is exposed to the model.** Ensure that you only use models and providers that comply with your organization
|
|
231
|
+
3. **Management data is exposed to the model.** Ensure that you only use models and providers that comply with your organization's policies for handling sensitive data and PII.
|
|
232
|
+
|
|
233
|
+
## 📊 Telemetry and Privacy
|
|
234
|
+
|
|
235
|
+
**Anonymous Usage Statistics:** Check Point collects anonymous usage statistics to improve this MCP server. Only tool usage patterns and anonymous identifiers are collected—no credentials, policies, or sensitive data.
|
|
236
|
+
|
|
237
|
+
**Opt-Out:** Set `TELEMETRY_DISABLED=true` environment variable or use the `--no-telemetry` flag to disable telemetry collection.
|
package/dist/index.js
CHANGED
|
@@ -362,7 +362,6 @@ var init_ui_dialog = __esm({
|
|
|
362
362
|
|
|
363
363
|
// src/index.ts
|
|
364
364
|
import { z } from "zod";
|
|
365
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
366
365
|
|
|
367
366
|
// ../mcp-utils/dist/launcher.js
|
|
368
367
|
import { Command } from "commander";
|
|
@@ -393,12 +392,26 @@ async function launchMCPServer(configPath, serverModule2) {
|
|
|
393
392
|
program.option("--transport-port <number>", "Port for network transports (e.g., HTTP)", transportPortDefault);
|
|
394
393
|
const debugDefault = process.env.DEBUG === "true" || false;
|
|
395
394
|
program.option("--debug", "Enable debug mode", debugDefault);
|
|
395
|
+
const telemetryEnabledDefault = process.env.TELEMETRY_DISABLED === "true" ? false : true;
|
|
396
|
+
program.option("--no-telemetry", "Disable anonymous usage telemetry", telemetryEnabledDefault);
|
|
397
|
+
const telemetryUrlDefault = process.env.TELEMETRY_URL || "https://metrics.security.ai.checkpoint.com/api/v1/metrics/collect";
|
|
398
|
+
program.option("--telemetry-url <url>", "URL for telemetry server", telemetryUrlDefault);
|
|
396
399
|
program.parse(process.argv);
|
|
397
400
|
const options = program.opts();
|
|
401
|
+
if (options.telemetry === false) {
|
|
402
|
+
process.env.TELEMETRY_DISABLED = "true";
|
|
403
|
+
}
|
|
404
|
+
if (options.telemetryUrl) {
|
|
405
|
+
process.env.TELEMETRY_URL = options.telemetryUrl;
|
|
406
|
+
}
|
|
398
407
|
if (!serverModule2.settingsManager) {
|
|
399
408
|
throw new Error("ServerModule must have a settingsManager. Create it with createServerModule.");
|
|
400
409
|
}
|
|
401
410
|
const settings = serverModule2.settingsManager.createFromArgs(options);
|
|
411
|
+
if (typeof serverModule2.server.applyToolPolicy === "function") {
|
|
412
|
+
console.error("[launchMCPServer] Applying tool policy before connecting");
|
|
413
|
+
serverModule2.server.applyToolPolicy();
|
|
414
|
+
}
|
|
402
415
|
const transportType = (options.transport || process.env.MCP_TRANSPORT_TYPE || "stdio").toLowerCase() === "http" ? "http" : "stdio";
|
|
403
416
|
const transportPort = options.transportPort ? parseInt(options.transportPort, 10) : process.env.MCP_TRANSPORT_PORT ? parseInt(process.env.MCP_TRANSPORT_PORT, 10) : 3e3;
|
|
404
417
|
if (transportType === "http") {
|
|
@@ -1126,27 +1139,178 @@ function createApiRunner(serverModule2) {
|
|
|
1126
1139
|
return await apiManager.callApi(method, uri, data, domain);
|
|
1127
1140
|
};
|
|
1128
1141
|
}
|
|
1129
|
-
function createServerModule(server2, Settings2, pkg2, apiManagerClass) {
|
|
1142
|
+
function createServerModule(server2, Settings2, pkg2, apiManagerClass, toolPolicyCallback) {
|
|
1130
1143
|
const settingsManager = new SettingsManager(Settings2);
|
|
1131
1144
|
const apiManagerFactory = new APIManagerFactory(apiManagerClass, settingsManager);
|
|
1132
1145
|
const sessionManager = new SessionManager();
|
|
1146
|
+
if (toolPolicyCallback && typeof server2.setToolPolicy === "function") {
|
|
1147
|
+
console.error("[createServerModule] Setting tool policy callback on server");
|
|
1148
|
+
server2.setToolPolicy(toolPolicyCallback);
|
|
1149
|
+
}
|
|
1133
1150
|
return {
|
|
1134
1151
|
server: server2,
|
|
1135
1152
|
Settings: Settings2,
|
|
1136
1153
|
settingsManager,
|
|
1137
1154
|
apiManagerFactory,
|
|
1138
1155
|
sessionManager,
|
|
1139
|
-
pkg: pkg2
|
|
1156
|
+
pkg: pkg2,
|
|
1157
|
+
toolPolicyCallback
|
|
1140
1158
|
};
|
|
1141
1159
|
}
|
|
1142
1160
|
|
|
1143
1161
|
// ../mcp-utils/dist/index.js
|
|
1144
1162
|
init_ui_dialog();
|
|
1145
1163
|
|
|
1146
|
-
//
|
|
1164
|
+
// ../mcp-utils/dist/telemetry.js
|
|
1165
|
+
import machineIdPkg from "node-machine-id";
|
|
1166
|
+
import { createHash } from "crypto";
|
|
1167
|
+
var { machineIdSync } = machineIdPkg;
|
|
1168
|
+
var machineId = null;
|
|
1169
|
+
var hashedMachineId = null;
|
|
1170
|
+
function isTelemetryDisabled() {
|
|
1171
|
+
return process.env.TELEMETRY_DISABLED === "true" || process.env.TELEMETRY_DISABLED === "1";
|
|
1172
|
+
}
|
|
1173
|
+
function getTelemetryUrl() {
|
|
1174
|
+
return process.env.TELEMETRY_URL || "https://metrics.security.ai.checkpoint.com/api/v1/metrics/collect";
|
|
1175
|
+
}
|
|
1176
|
+
function hashString(input) {
|
|
1177
|
+
return createHash("sha256").update(input).digest("hex");
|
|
1178
|
+
}
|
|
1179
|
+
function getMachineId() {
|
|
1180
|
+
if (!machineId) {
|
|
1181
|
+
try {
|
|
1182
|
+
machineId = machineIdSync();
|
|
1183
|
+
} catch (error) {
|
|
1184
|
+
console.warn("Failed to get machine ID for telemetry:", error);
|
|
1185
|
+
machineId = "unknown";
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
return machineId;
|
|
1189
|
+
}
|
|
1190
|
+
function getHashedMachineId() {
|
|
1191
|
+
if (!hashedMachineId) {
|
|
1192
|
+
hashedMachineId = hashString(getMachineId());
|
|
1193
|
+
}
|
|
1194
|
+
return hashedMachineId;
|
|
1195
|
+
}
|
|
1196
|
+
function calculateChecksum(mcpName, toolName, machineId2, clientVersion) {
|
|
1197
|
+
const data = mcpName + machineId2.slice(0, 16) + toolName + clientVersion;
|
|
1198
|
+
return hashString(data);
|
|
1199
|
+
}
|
|
1200
|
+
async function trackToolCall(mcpName, toolName, clientVersion, extra) {
|
|
1201
|
+
if (isTelemetryDisabled()) {
|
|
1202
|
+
return;
|
|
1203
|
+
}
|
|
1204
|
+
try {
|
|
1205
|
+
const machineId2 = getHashedMachineId();
|
|
1206
|
+
const checksum = calculateChecksum(mcpName, toolName, machineId2, clientVersion);
|
|
1207
|
+
fetch(getTelemetryUrl(), {
|
|
1208
|
+
method: "POST",
|
|
1209
|
+
headers: { "Content-Type": "application/json" },
|
|
1210
|
+
body: JSON.stringify({
|
|
1211
|
+
mcp_name: mcpName,
|
|
1212
|
+
tool_name: toolName,
|
|
1213
|
+
machine_id: machineId2,
|
|
1214
|
+
client_version: clientVersion,
|
|
1215
|
+
checksum
|
|
1216
|
+
})
|
|
1217
|
+
}).catch(() => {
|
|
1218
|
+
});
|
|
1219
|
+
} catch (error) {
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
// ../mcp-utils/dist/mcp-server.js
|
|
1224
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
1225
|
+
var CPMcpServer = class extends McpServer {
|
|
1226
|
+
constructor(serverInfo, options) {
|
|
1227
|
+
super(serverInfo, options);
|
|
1228
|
+
this.mcpName = serverInfo.name;
|
|
1229
|
+
this.mcpVersion = serverInfo.version || "0.0.0";
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Set a tool policy callback to filter which tools are available
|
|
1233
|
+
* This should be called after all tools are registered but before connecting
|
|
1234
|
+
* @param callback Function that returns true if a tool should be enabled
|
|
1235
|
+
*/
|
|
1236
|
+
setToolPolicy(callback) {
|
|
1237
|
+
console.error("[CPMcpServer] Setting tool policy callback");
|
|
1238
|
+
this.toolPolicyCallback = callback;
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Apply the tool policy by checking all registered tools
|
|
1242
|
+
* This should be called after all tools are registered but before connecting
|
|
1243
|
+
*/
|
|
1244
|
+
applyToolPolicy() {
|
|
1245
|
+
if (!this.toolPolicyCallback) {
|
|
1246
|
+
console.error("[CPMcpServer] No tool policy callback set, allowing all tools");
|
|
1247
|
+
return;
|
|
1248
|
+
}
|
|
1249
|
+
console.error("[CPMcpServer] Applying tool policy");
|
|
1250
|
+
const registeredTools = this._registeredTools;
|
|
1251
|
+
if (!registeredTools || typeof registeredTools !== "object") {
|
|
1252
|
+
console.error("[CPMcpServer] No tools registered yet");
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
const toolNames = Object.keys(registeredTools);
|
|
1256
|
+
console.error(`[CPMcpServer] Found ${toolNames.length} registered tools:`, toolNames);
|
|
1257
|
+
let enabledCount = 0;
|
|
1258
|
+
let disabledCount = 0;
|
|
1259
|
+
for (const [toolName, tool] of Object.entries(registeredTools)) {
|
|
1260
|
+
const isAllowed = this.toolPolicyCallback(toolName);
|
|
1261
|
+
if (!isAllowed) {
|
|
1262
|
+
console.error(`[CPMcpServer] Tool '${toolName}' is NOT allowed by policy - disabling`);
|
|
1263
|
+
if (typeof tool.disable === "function") {
|
|
1264
|
+
tool.disable();
|
|
1265
|
+
disabledCount++;
|
|
1266
|
+
}
|
|
1267
|
+
} else {
|
|
1268
|
+
console.error(`[CPMcpServer] Tool '${toolName}' is allowed by policy`);
|
|
1269
|
+
enabledCount++;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
console.error(`[CPMcpServer] Policy applied: ${enabledCount}/${toolNames.length} tools enabled, ${disabledCount} disabled`);
|
|
1273
|
+
}
|
|
1274
|
+
// Override the tool method to wrap callbacks with telemetry
|
|
1275
|
+
tool(...args) {
|
|
1276
|
+
const callback = args[args.length - 1];
|
|
1277
|
+
if (typeof callback === "function") {
|
|
1278
|
+
const toolName = args[0];
|
|
1279
|
+
const wrappedCallback = async (...callbackArgs) => {
|
|
1280
|
+
const extra = callbackArgs[1];
|
|
1281
|
+
trackToolCall(this.mcpName, toolName, this.mcpVersion, extra).catch(() => {
|
|
1282
|
+
});
|
|
1283
|
+
return callback(...callbackArgs);
|
|
1284
|
+
};
|
|
1285
|
+
args[args.length - 1] = wrappedCallback;
|
|
1286
|
+
}
|
|
1287
|
+
return super.tool(...args);
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
// ../mcp-utils/dist/package-utils.js
|
|
1147
1292
|
import { readFileSync } from "fs";
|
|
1148
1293
|
import { join as join2, dirname } from "path";
|
|
1149
1294
|
import { fileURLToPath } from "url";
|
|
1295
|
+
function readPackageJson(importMetaUrl) {
|
|
1296
|
+
const pkg2 = JSON.parse(readFileSync(join2(dirname(fileURLToPath(importMetaUrl)), "../package.json"), "utf-8"));
|
|
1297
|
+
process.env.CP_MCP_MAIN_PKG = `${pkg2.name} v${pkg2.version}`;
|
|
1298
|
+
return pkg2;
|
|
1299
|
+
}
|
|
1300
|
+
function createMcpServer(importMetaUrl, serverInfo, options) {
|
|
1301
|
+
const pkg2 = readPackageJson(importMetaUrl);
|
|
1302
|
+
const fullServerInfo = {
|
|
1303
|
+
...serverInfo,
|
|
1304
|
+
name: serverInfo.name || pkg2.name,
|
|
1305
|
+
version: serverInfo.version || pkg2.version
|
|
1306
|
+
};
|
|
1307
|
+
const server2 = new CPMcpServer(fullServerInfo, options);
|
|
1308
|
+
return { server: server2, pkg: pkg2 };
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
// src/index.ts
|
|
1312
|
+
import { join as join3, dirname as dirname2 } from "path";
|
|
1313
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
1150
1314
|
|
|
1151
1315
|
// src/documentation-api-manager.ts
|
|
1152
1316
|
import axios3 from "axios";
|
|
@@ -1428,17 +1592,9 @@ var DocumentationToolSettings = class _DocumentationToolSettings extends Setting
|
|
|
1428
1592
|
};
|
|
1429
1593
|
|
|
1430
1594
|
// src/index.ts
|
|
1431
|
-
var pkg =
|
|
1432
|
-
readFileSync(
|
|
1433
|
-
join2(dirname(fileURLToPath(import.meta.url)), "../package.json"),
|
|
1434
|
-
"utf-8"
|
|
1435
|
-
)
|
|
1436
|
-
);
|
|
1437
|
-
process.env.CP_MCP_MAIN_PKG = `${pkg.name} v${pkg.version}`;
|
|
1438
|
-
var server = new McpServer({
|
|
1595
|
+
var { server, pkg } = createMcpServer(import.meta.url, {
|
|
1439
1596
|
name: "checkpoint-documentation",
|
|
1440
|
-
description: "Comprehensive Check Point documentation assistant providing instant access to product information, technical specifications, configuration guidance, and feature documentation across the entire Check Point security portfolio."
|
|
1441
|
-
version: "1.0.0"
|
|
1597
|
+
description: "Comprehensive Check Point documentation assistant providing instant access to product information, technical specifications, configuration guidance, and feature documentation across the entire Check Point security portfolio."
|
|
1442
1598
|
});
|
|
1443
1599
|
var serverModule = createServerModule(
|
|
1444
1600
|
server,
|
|
@@ -1544,7 +1700,7 @@ server.tool(
|
|
|
1544
1700
|
);
|
|
1545
1701
|
var main = async () => {
|
|
1546
1702
|
await launchMCPServer(
|
|
1547
|
-
|
|
1703
|
+
join3(dirname2(fileURLToPath2(import.meta.url)), "server-config.json"),
|
|
1548
1704
|
serverModule
|
|
1549
1705
|
);
|
|
1550
1706
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chkp/documentation-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
18
|
+
"node": ">=20.0.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clean": "rimraf dist",
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.11.1",
|
|
30
30
|
"axios": "^1.12.1",
|
|
31
31
|
"commander": "^13.1.0",
|
|
32
|
+
"node-machine-id": "^1.1.12",
|
|
32
33
|
"zod": "^3.22.4"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@chkp/mcp-utils": "*",
|
|
36
37
|
"@chkp/quantum-infra": "*",
|
|
37
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^20.0.0",
|
|
38
39
|
"dotenv": "^17.2.2",
|
|
39
40
|
"tsx": "^4.20.5",
|
|
40
41
|
"typescript": "^5.0.4"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chkp/documentation-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
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",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
18
|
+
"node": ">=20.0.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"clean": "rimraf dist",
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
30
30
|
"commander": "^13.1.0",
|
|
31
31
|
"axios": "^1.12.1",
|
|
32
|
+
"node-machine-id": "^1.1.12",
|
|
32
33
|
"zod": "^3.24.4"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@chkp/mcp-utils": "*",
|
|
36
37
|
"@chkp/quantum-infra": "*",
|
|
37
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^20.0.0",
|
|
38
39
|
"dotenv": "^17.2.2",
|
|
39
40
|
"tsx": "^4.20.5",
|
|
40
41
|
"typescript": "^5.0.4"
|