@pipeworx/mcp-cisa-kev 0.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/LICENSE +21 -0
- package/README.md +55 -0
- package/package.json +20 -0
- package/server.json +18 -0
- package/src/index.ts +94 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pipeworx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# mcp-cisa-kev
|
|
2
|
+
|
|
3
|
+
CISA Known Exploited Vulnerabilities catalog
|
|
4
|
+
|
|
5
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"cisa-kev": {
|
|
20
|
+
"url": "https://gateway.pipeworx.io/cisa-kev/mcp"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or connect to the full Pipeworx gateway for access to all 250+ data sources:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"pipeworx": {
|
|
32
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Using with ask_pipeworx
|
|
39
|
+
|
|
40
|
+
Instead of calling tools directly, you can ask questions in plain English:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
ask_pipeworx({ question: "your question about Cisa Kev data" })
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
47
|
+
|
|
48
|
+
## More
|
|
49
|
+
|
|
50
|
+
- [All tools and guides](https://github.com/pipeworx-io/examples)
|
|
51
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-cisa-kev",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CISA Known Exploited Vulnerabilities catalog",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "cisa-kev"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pipeworx-io/mcp-cisa-kev"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc --noEmit"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.7.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/cisa-kev",
|
|
4
|
+
"title": "Cisa Kev",
|
|
5
|
+
"description": "CISA Known Exploited Vulnerabilities catalog",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/cisa-kev",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-cisa-kev",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/cisa-kev/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
interface McpToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface McpToolExport {
|
|
12
|
+
tools: McpToolDefinition[];
|
|
13
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
14
|
+
meter?: { credits: number };
|
|
15
|
+
cost?: Record<string, unknown>;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* CISA KEV MCP.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const URL = 'https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json';
|
|
25
|
+
const UA = 'pipeworx-mcp-cisa-kev/1.0 (+https://pipeworx.io)';
|
|
26
|
+
const TTL_MS = 60 * 60 * 1000;
|
|
27
|
+
|
|
28
|
+
type Entry = {
|
|
29
|
+
cveID: string;
|
|
30
|
+
vendorProject: string;
|
|
31
|
+
product: string;
|
|
32
|
+
vulnerabilityName: string;
|
|
33
|
+
dateAdded: string;
|
|
34
|
+
shortDescription: string;
|
|
35
|
+
requiredAction: string;
|
|
36
|
+
dueDate: string;
|
|
37
|
+
knownRansomwareCampaignUse?: string;
|
|
38
|
+
notes?: string;
|
|
39
|
+
cwes?: string[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
let CACHE: { at: number; catalog: { title?: string; catalogVersion?: string; dateReleased?: string; count?: number; vulnerabilities: Entry[] } } | null = null;
|
|
43
|
+
|
|
44
|
+
const tools: McpToolExport['tools'] = [
|
|
45
|
+
{ name: 'catalog', description: 'Full KEV catalog (metadata + entries).', inputSchema: { type: 'object', properties: {} } },
|
|
46
|
+
{ name: 'entry', description: 'Single KEV entry by CVE id.', inputSchema: { type: 'object', properties: { cve_id: { type: 'string' } }, required: ['cve_id'] } },
|
|
47
|
+
{ name: 'vendors', description: 'Distinct vendors with entries.', inputSchema: { type: 'object', properties: {} } },
|
|
48
|
+
{ name: 'recent', description: 'Entries added in the last N days.', inputSchema: { type: 'object', properties: { days: { type: 'number', description: '1-365 (default 30)' } } } },
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
|
|
52
|
+
const data = await load();
|
|
53
|
+
switch (name) {
|
|
54
|
+
case 'catalog':
|
|
55
|
+
return data;
|
|
56
|
+
case 'entry': {
|
|
57
|
+
const cve = reqStr(args, 'cve_id', '"CVE-2022-22965"');
|
|
58
|
+
const hit = data.vulnerabilities.find((e) => e.cveID === cve);
|
|
59
|
+
return hit ?? null;
|
|
60
|
+
}
|
|
61
|
+
case 'vendors': {
|
|
62
|
+
const counts: Record<string, number> = {};
|
|
63
|
+
for (const e of data.vulnerabilities) counts[e.vendorProject] = (counts[e.vendorProject] ?? 0) + 1;
|
|
64
|
+
const list = Object.entries(counts).map(([vendor, count]) => ({ vendor, count })).sort((a, b) => b.count - a.count);
|
|
65
|
+
return { total_vendors: list.length, vendors: list };
|
|
66
|
+
}
|
|
67
|
+
case 'recent': {
|
|
68
|
+
const days = Math.min(365, Math.max(1, (args.days as number) ?? 30));
|
|
69
|
+
const cutoff = Date.now() - days * 86400_000;
|
|
70
|
+
const filtered = data.vulnerabilities.filter((e) => Date.parse(e.dateAdded) >= cutoff);
|
|
71
|
+
return { days, count: filtered.length, results: filtered };
|
|
72
|
+
}
|
|
73
|
+
default:
|
|
74
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function load() {
|
|
79
|
+
const now = Date.now();
|
|
80
|
+
if (CACHE && now - CACHE.at < TTL_MS) return CACHE.catalog;
|
|
81
|
+
const res = await fetch(URL, { headers: { Accept: 'application/json', 'User-Agent': UA } });
|
|
82
|
+
if (!res.ok) throw new Error(`CISA KEV: ${res.status}`);
|
|
83
|
+
const catalog = (await res.json()) as { vulnerabilities: Entry[] };
|
|
84
|
+
CACHE = { at: now, catalog };
|
|
85
|
+
return catalog;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function reqStr(args: Record<string, unknown>, key: string, example: string): string {
|
|
89
|
+
const v = args[key];
|
|
90
|
+
if (typeof v !== 'string' || !v.trim()) throw new Error(`Required argument "${key}" is missing. Pass a string like ${example}.`);
|
|
91
|
+
return v;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|