@chkp/documentation-mcp 1.4.3 → 1.4.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.
- package/README.md +34 -0
- package/dist/index.js +29 -7
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/package.json.bak +1 -1
package/README.md
CHANGED
|
@@ -196,6 +196,40 @@ Add the configuration as Claude Desktop App.
|
|
|
196
196
|
|
|
197
197
|
---
|
|
198
198
|
|
|
199
|
+
## HTTP Transport
|
|
200
|
+
|
|
201
|
+
By default, this server uses **stdio** transport, which is the standard mode for MCP clients like Claude Desktop and Cursor. For hosted or multi-user deployments, an **HTTP transport** (MCP Streamable HTTP) is also available.
|
|
202
|
+
|
|
203
|
+
> **Security notice before you continue:** The HTTP server has no built-in authentication and no TLS. Any client that can reach the port can establish a session, and credentials travel in cleartext. Only use HTTP transport behind an authenticated reverse proxy (nginx, Caddy, a cloud load balancer) that terminates TLS and enforces authentication. If you are running the server on the same machine as your MCP client, use the default stdio transport — it has none of these concerns.
|
|
204
|
+
|
|
205
|
+
### Starting the server in HTTP mode
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
MCP_TRANSPORT_TYPE=http MCP_TRANSPORT_PORT=3000 npx @chkp/documentation-mcp
|
|
209
|
+
# or
|
|
210
|
+
npx @chkp/documentation-mcp --transport http --transport-port 3000
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The server exposes:
|
|
214
|
+
- `POST/GET/DELETE /mcp` — MCP protocol endpoint
|
|
215
|
+
- `GET /health` — server status (active session count, version)
|
|
216
|
+
|
|
217
|
+
### Connecting an MCP client
|
|
218
|
+
|
|
219
|
+
Point your MCP client at `http://<host>:3000/mcp`. Example for Claude Desktop (`claude_desktop_config.json`):
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"mcpServers": {
|
|
224
|
+
"checkpoint-documentation-tool": {
|
|
225
|
+
"url": "http://localhost:3000/mcp"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
199
233
|
## Development
|
|
200
234
|
|
|
201
235
|
### Prerequisites
|
package/dist/index.js
CHANGED
|
@@ -1560,7 +1560,7 @@ var Settings = class _Settings {
|
|
|
1560
1560
|
return "STG";
|
|
1561
1561
|
return void 0;
|
|
1562
1562
|
}
|
|
1563
|
-
constructor({ apiKey = process.env.API_KEY, username = process.env.USERNAME, password = process.env.PASSWORD, s1cUrl = process.env.S1C_URL, managementHost = process.env.MANAGEMENT_HOST, managementPort = process.env.MANAGEMENT_PORT || "443", cloudInfraToken = process.env.CLOUD_INFRA_TOKEN, cloudConnected = process.env.CLOUD_CONNECTED === "true", clientId = process.env.CLIENT_ID, secretKey = process.env.SECRET_KEY, region = process.env.REGION || "EU", devPort = process.env.DEV_PORT || "8006", gatewayUrl } = {}) {
|
|
1563
|
+
constructor({ apiKey = process.env.API_KEY, username = process.env.USERNAME, password = process.env.PASSWORD, s1cUrl = process.env.S1C_URL, managementHost = process.env.MANAGEMENT_HOST, managementPort = process.env.MANAGEMENT_PORT || "443", cloudInfraToken = process.env.CLOUD_INFRA_TOKEN, cloudConnected = process.env.CLOUD_CONNECTED === "true", sid, clientId = process.env.CLIENT_ID, secretKey = process.env.SECRET_KEY, region = process.env.REGION || "EU", devPort = process.env.DEV_PORT || "8006", gatewayUrl } = {}) {
|
|
1564
1564
|
this.region = "EU";
|
|
1565
1565
|
this.devPort = "8006";
|
|
1566
1566
|
this.gatewayUrl = "";
|
|
@@ -1588,6 +1588,7 @@ var Settings = class _Settings {
|
|
|
1588
1588
|
this.managementPort = managementPort;
|
|
1589
1589
|
this.cloudInfraToken = cloudInfraToken;
|
|
1590
1590
|
this.cloudConnected = cloudConnected;
|
|
1591
|
+
this.sid = sid;
|
|
1591
1592
|
this.clientId = clientId;
|
|
1592
1593
|
this.secretKey = secretKey;
|
|
1593
1594
|
this.region = this.normalizeRegion(region) || "EU";
|
|
@@ -1661,6 +1662,7 @@ var Settings = class _Settings {
|
|
|
1661
1662
|
const verbose = SettingsManager.globalDebugState;
|
|
1662
1663
|
if (verbose) {
|
|
1663
1664
|
console.error("[Settings] Verbose: Validating settings...");
|
|
1665
|
+
console.error("[Settings] Verbose: sid:", this.sid ? "***" : "(empty)");
|
|
1664
1666
|
console.error("[Settings] Verbose: s1cUrl:", this.s1cUrl || "(empty)");
|
|
1665
1667
|
console.error("[Settings] Verbose: managementHost:", this.managementHost || "(empty)");
|
|
1666
1668
|
console.error("[Settings] Verbose: apiKey:", this.apiKey ? "***" : "(empty)");
|
|
@@ -1668,17 +1670,35 @@ var Settings = class _Settings {
|
|
|
1668
1670
|
console.error("[Settings] Verbose: username:", this.username ? "***" : "(empty)");
|
|
1669
1671
|
console.error("[Settings] Verbose: password:", this.password ? "***" : "(empty)");
|
|
1670
1672
|
}
|
|
1671
|
-
if (!nullOrEmpty(this.
|
|
1673
|
+
if (!nullOrEmpty(this.sid)) {
|
|
1672
1674
|
if (verbose) {
|
|
1673
|
-
console.error("[Settings] Verbose:
|
|
1675
|
+
console.error("[Settings] Verbose: Pre-authenticated SID provided, skipping credential validation");
|
|
1676
|
+
}
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
if (!nullOrEmpty(this.s1cUrl) && nullOrEmpty(this.apiKey) && nullOrEmpty(this.cloudInfraToken)) {
|
|
1680
|
+
if (process.env.MCP_TRANSPORT_TYPE?.toLowerCase() === "http") {
|
|
1681
|
+
if (verbose) {
|
|
1682
|
+
console.error("[Settings] Verbose: S1C URL provided without credentials, but HTTP transport mode allows per-request auth via headers");
|
|
1683
|
+
}
|
|
1684
|
+
} else {
|
|
1685
|
+
if (verbose) {
|
|
1686
|
+
console.error("[Settings] Verbose: Validation FAILED - S1C URL provided but no API key or CI token");
|
|
1687
|
+
}
|
|
1688
|
+
throw new Error("API key or CI Token is required for S1C (via --api-key or API_KEY env var)");
|
|
1674
1689
|
}
|
|
1675
|
-
throw new Error("API key or CI Token is required for S1C (via --api-key or API_KEY env var)");
|
|
1676
1690
|
}
|
|
1677
1691
|
if (!nullOrEmpty(this.managementHost) && nullOrEmpty(this.apiKey) && (nullOrEmpty(this.username) || nullOrEmpty(this.password))) {
|
|
1678
|
-
if (
|
|
1679
|
-
|
|
1692
|
+
if (process.env.MCP_TRANSPORT_TYPE?.toLowerCase() === "http") {
|
|
1693
|
+
if (verbose) {
|
|
1694
|
+
console.error("[Settings] Verbose: Management host provided without credentials, but HTTP transport mode allows per-request auth via headers");
|
|
1695
|
+
}
|
|
1696
|
+
} else {
|
|
1697
|
+
if (verbose) {
|
|
1698
|
+
console.error("[Settings] Verbose: Validation FAILED - Management host provided but no API key or credentials");
|
|
1699
|
+
}
|
|
1700
|
+
throw new Error("Either API key or username/password are required for on-prem management (via CLI args or env vars)");
|
|
1680
1701
|
}
|
|
1681
|
-
throw new Error("Either API key or username/password are required for on-prem management (via CLI args or env vars)");
|
|
1682
1702
|
}
|
|
1683
1703
|
if (nullOrEmpty(this.s1cUrl) && nullOrEmpty(this.managementHost)) {
|
|
1684
1704
|
if (verbose) {
|
|
@@ -1747,6 +1767,7 @@ var Settings = class _Settings {
|
|
|
1747
1767
|
managementPort: getHeaderValue(headers, "MANAGEMENT-PORT"),
|
|
1748
1768
|
cloudInfraToken: getHeaderValue(headers, "CLOUD-INFRA-TOKEN"),
|
|
1749
1769
|
cloudConnected: getHeaderValue(headers, "CLOUD-CONNECTED"),
|
|
1770
|
+
sid: getHeaderValue(headers, "X-chkp-sid"),
|
|
1750
1771
|
clientId: getHeaderValue(headers, "CLIENT-ID"),
|
|
1751
1772
|
secretKey: getHeaderValue(headers, "SECRET-KEY"),
|
|
1752
1773
|
region: getHeaderValue(headers, "REGION"),
|
|
@@ -1780,6 +1801,7 @@ var Settings = class _Settings {
|
|
|
1780
1801
|
managementPort: extractedValues.managementPort,
|
|
1781
1802
|
cloudInfraToken: extractedValues.cloudInfraToken,
|
|
1782
1803
|
cloudConnected: extractedValues.cloudConnected === "true",
|
|
1804
|
+
sid: extractedValues.sid,
|
|
1783
1805
|
clientId: extractedValues.clientId,
|
|
1784
1806
|
secretKey: extractedValues.secretKey,
|
|
1785
1807
|
region: extractedValues.region?.toUpperCase(),
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
package/package.json.bak
CHANGED