@certscore/mcp 0.2.4 → 0.2.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 +49 -14
- package/dist/certscore-mcp.mjs +12638 -2328
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +34 -0
- package/dist/tools.d.ts +6 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -0
- package/package.json +12 -11
- package/server.json +7 -21
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqCD,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,mBAAwB,aAwNzE"}
|
package/dist/server.js
CHANGED
|
@@ -3,6 +3,7 @@ import { certScoreMcpToolContracts } from "@certscore/api-contracts";
|
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
import { CERTSCORE_MCP_VERSION } from "./version.js";
|
|
5
5
|
import { boundEvidencePacket, exportFindings, limitPreConsentRows, normalizeDetail, normalizeFormat, paginateFindingList, scanIdFromStatus, toToolError, toToolResult } from "./tools.js";
|
|
6
|
+
let createScanDeprecationWarningPrinted = false;
|
|
6
7
|
function toolContract(name) {
|
|
7
8
|
const contract = certScoreMcpToolContracts.find((candidate) => candidate.name === name);
|
|
8
9
|
if (!contract) {
|
|
@@ -27,6 +28,39 @@ export function createCertScoreMcpServer(options = {}) {
|
|
|
27
28
|
version: CERTSCORE_MCP_VERSION
|
|
28
29
|
});
|
|
29
30
|
const registerTool = server.registerTool.bind(server);
|
|
31
|
+
async function createPulseScanTool(input) {
|
|
32
|
+
const result = await client.submitScan(input.url, {
|
|
33
|
+
detail: normalizeDetail(input.detail),
|
|
34
|
+
format: normalizeFormat(input.format),
|
|
35
|
+
freshness: input.freshness ?? "latest",
|
|
36
|
+
scanFrom: input.scanFrom
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
type: "certscore_mcp_scan_created",
|
|
40
|
+
status: result.status,
|
|
41
|
+
jobId: result.jobId ?? null,
|
|
42
|
+
scanId: result.scanId ?? result.scan_id ?? null,
|
|
43
|
+
completed: result.completed ?? false,
|
|
44
|
+
statusUrl: result.statusUrl ?? result.nextCheckUrl ?? null,
|
|
45
|
+
resultUrl: result.resultUrl ?? null,
|
|
46
|
+
reportUrl: result.reportUrl ?? null,
|
|
47
|
+
pulse: result.pulse ?? null,
|
|
48
|
+
resultDisposition: result.resultDisposition ?? result.pulse?.resultDisposition ?? null,
|
|
49
|
+
noGo: result.noGo ?? result.pulse?.noGo ?? null
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
registerTool("create_scan", toolContract("create_scan"), async (input) => {
|
|
53
|
+
try {
|
|
54
|
+
if (!createScanDeprecationWarningPrinted) {
|
|
55
|
+
createScanDeprecationWarningPrinted = true;
|
|
56
|
+
console.error("[certscore-mcp] create_scan is deprecated and will be removed in 0.2.0. Use scan_site.");
|
|
57
|
+
}
|
|
58
|
+
return toToolResult(await createPulseScanTool(input));
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
return toToolError(error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
30
64
|
registerTool("scan_site", toolContract("scan_site"), async (input) => {
|
|
31
65
|
try {
|
|
32
66
|
return toToolResult(await client.scans.create(input.url, {
|
package/dist/tools.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export declare function exportFindings(report: PulseResult): {
|
|
|
14
14
|
scanId: string | null;
|
|
15
15
|
domain: string | null;
|
|
16
16
|
summary: import("packages/certscore-sdk/dist/types.js").PulseSummary | null;
|
|
17
|
+
resultDisposition: "no_go" | null;
|
|
18
|
+
noGo: import("@certscore/sdk").ScanNoGoResult | null;
|
|
17
19
|
findings: {
|
|
18
20
|
id: string;
|
|
19
21
|
label: string | null;
|
|
@@ -53,6 +55,8 @@ export declare function explainFinding(report: PulseResult, findingId: string):
|
|
|
53
55
|
reviewLenses?: undefined;
|
|
54
56
|
anchorUrl?: undefined;
|
|
55
57
|
nextStep?: undefined;
|
|
58
|
+
resultDisposition?: undefined;
|
|
59
|
+
noGo?: undefined;
|
|
56
60
|
caveats?: undefined;
|
|
57
61
|
} | {
|
|
58
62
|
type: string;
|
|
@@ -69,6 +73,8 @@ export declare function explainFinding(report: PulseResult, findingId: string):
|
|
|
69
73
|
reviewLenses: string[];
|
|
70
74
|
anchorUrl: string | null;
|
|
71
75
|
nextStep: string | null;
|
|
76
|
+
resultDisposition: "no_go" | null;
|
|
77
|
+
noGo: import("@certscore/sdk").ScanNoGoResult | null;
|
|
72
78
|
caveats: string[];
|
|
73
79
|
disclaimer: string | null;
|
|
74
80
|
message?: undefined;
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAg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AM,EAAE,OAAO,CAAC,CA0C9H;AA6ID,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAE5E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,iBAEjD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,iBAGlD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,EAAE,CAQpE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;EAsBjD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnE,OAAO,EAAE,CAAC,EACV,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAChD,CAAC,CAoBH;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnE,OAAO,EAAE,CAAC,EACV,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GACjC,CAAC,CAiBH;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCpE"}
|
package/dist/tools.js
CHANGED
|
@@ -241,6 +241,8 @@ export function exportFindings(report) {
|
|
|
241
241
|
scanId: scanIdFromPulse(report),
|
|
242
242
|
domain: report.domain ?? report.request?.domain ?? null,
|
|
243
243
|
summary: report.summary ?? null,
|
|
244
|
+
resultDisposition: report.resultDisposition ?? null,
|
|
245
|
+
noGo: report.noGo ?? null,
|
|
244
246
|
findings: findingsFromReport(report).map((finding) => ({
|
|
245
247
|
id: finding.id,
|
|
246
248
|
label: finding.label ?? null,
|
|
@@ -323,6 +325,8 @@ export function explainFinding(report, findingId) {
|
|
|
323
325
|
reviewLenses: finding.reviewLenses ?? [],
|
|
324
326
|
anchorUrl: finding.anchorUrl ?? finding.evidence?.fullEvidenceUrl ?? null,
|
|
325
327
|
nextStep: finding.nextStep ?? null,
|
|
328
|
+
resultDisposition: report.resultDisposition ?? null,
|
|
329
|
+
noGo: report.noGo ?? null,
|
|
326
330
|
caveats: report.coverage?.limitations ?? [],
|
|
327
331
|
disclaimer: report.disclaimer ?? null
|
|
328
332
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certscore/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"mcpName": "ai.certscore/mcp",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "MCP server for CertScore public website risk-signal workflows.",
|
|
@@ -46,6 +46,14 @@
|
|
|
46
46
|
"url": "https://certscore.ai/contact",
|
|
47
47
|
"email": "support@certscore.ai"
|
|
48
48
|
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --banner:js='#!/usr/bin/env node' --outfile=dist/certscore-mcp.mjs",
|
|
51
|
+
"bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --banner:js='#!/usr/bin/env node' --outfile=dist/certscore-mcp.mjs",
|
|
52
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
53
|
+
"test": "node --import tsx --test src/*.test.ts",
|
|
54
|
+
"prepack": "pnpm run build",
|
|
55
|
+
"clean": "rm -rf dist"
|
|
56
|
+
},
|
|
49
57
|
"keywords": [
|
|
50
58
|
"certscore",
|
|
51
59
|
"pulse",
|
|
@@ -59,14 +67,7 @@
|
|
|
59
67
|
"zod": "^3.25.76"
|
|
60
68
|
},
|
|
61
69
|
"devDependencies": {
|
|
62
|
-
"@certscore/api-contracts": "
|
|
63
|
-
"@certscore/sdk": "
|
|
64
|
-
},
|
|
65
|
-
"scripts": {
|
|
66
|
-
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --banner:js='#!/usr/bin/env node' --outfile=dist/certscore-mcp.mjs",
|
|
67
|
-
"bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --banner:js='#!/usr/bin/env node' --outfile=dist/certscore-mcp.mjs",
|
|
68
|
-
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
69
|
-
"test": "node --import tsx --test src/*.test.ts",
|
|
70
|
-
"clean": "rm -rf dist"
|
|
70
|
+
"@certscore/api-contracts": "workspace:*",
|
|
71
|
+
"@certscore/sdk": "workspace:*"
|
|
71
72
|
}
|
|
72
|
-
}
|
|
73
|
+
}
|
package/server.json
CHANGED
|
@@ -1,37 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
|
3
3
|
"name": "ai.certscore/mcp",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"description": "MCP server for CertScore public website risk-signal workflows.",
|
|
5
|
+
"status": "active",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "https://github.com/ergoveritas1-alt/certscore.ai",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.6",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
15
|
"identifier": "@certscore/mcp",
|
|
15
|
-
"version": "0.2.
|
|
16
|
+
"version": "0.2.6",
|
|
16
17
|
"transport": {
|
|
17
18
|
"type": "stdio"
|
|
18
19
|
},
|
|
19
|
-
"
|
|
20
|
-
{
|
|
21
|
-
"name": "CERTSCORE_API_KEY",
|
|
22
|
-
"description": "CertScore API key with scan:read, scan:create, and mcp scopes.",
|
|
23
|
-
"isRequired": true,
|
|
24
|
-
"format": "string",
|
|
25
|
-
"isSecret": true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "CERTSCORE_BASE_URL",
|
|
29
|
-
"description": "Optional CertScore API base URL. Defaults to https://certscore.ai.",
|
|
30
|
-
"isRequired": false,
|
|
31
|
-
"format": "string",
|
|
32
|
-
"isSecret": false
|
|
33
|
-
}
|
|
34
|
-
]
|
|
20
|
+
"runtimeHint": "node"
|
|
35
21
|
}
|
|
36
22
|
]
|
|
37
23
|
}
|