vuln_lookup_cve
Look up a CVE by ID to get NVD details, CVSS score, CISA KEV active exploitation status, EPSS probability score, and MITRE ATT&CK techniques.
Instructions
Look up a CVE by ID and get enriched intelligence: NVD details (CVSS score, description, references), CISA KEV active exploitation status, EPSS exploitation probability score, and MITRE ATT&CK techniques.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cveId | Yes | CVE identifier (e.g., CVE-2021-44228) |
Implementation Reference
- Primary MCP server handler for vuln_lookup_cve tool. Accepts a cveId (validated via regex) and optional _gatewayToken. Fetches NVD details via getCveById(), KEV status via lookupCve(), EPSS score via getEpssByCve() in parallel (allowing partial failures), enriches with MITRE ATT&CK techniques, and returns a JSON object containing CVE summary, CVSS scores, KEV status, EPSS score, attack techniques, data source status, and attribution.
mcpServer.tool( "vuln_lookup_cve", "Look up a CVE by ID and get enriched intelligence: NVD details (CVSS score, description, references), CISA KEV active exploitation status, EPSS exploitation probability score, and MITRE ATT&CK techniques — all in a single call. The go-to tool for assessing any vulnerability.", { cveId: z .string() .regex(/^CVE-\d{4}-\d{4,}$/i) .describe("CVE identifier (e.g., CVE-2021-44228)"), _gatewayToken: z.string().optional().describe("Internal gateway token"), }, async ({ cveId, _gatewayToken }) => { if (!_gatewayToken || _gatewayToken !== GATEWAY_SECRET) { await Actor.charge({ eventName: "tool-request" }); } const normalizedId = cveId.toUpperCase(); // Fetch NVD + KEV + EPSS in parallel — partial failures OK const [nvdResult, kevResult, epssResult] = await Promise.allSettled([ getCveById(normalizedId), lookupCve(normalizedId), getEpssByCve(normalizedId), ]); const nvd = nvdResult.status === "fulfilled" ? nvdResult.value : null; const kev = kevResult.status === "fulfilled" ? kevResult.value : null; const epss = epssResult.status === "fulfilled" ? epssResult.value : null; if (!nvd) { const nvdError = nvdResult.status === "rejected" ? String(nvdResult.reason) : ""; return { content: [ { type: "text" as const, text: `CVE ${normalizedId} not found in NVD.${nvdError ? ` Error: ${nvdError}` : ""}`, }, ], isError: true, }; } const attackTechniques = getAttackTechniques(normalizedId); const enriched = { ...formatCveSummary(nvd), kevStatus: formatKevStatus(kev), epss: formatEpss(epss), attackTechniques: attackTechniques.length > 0 ? attackTechniques : null, dataSources: { nvd: nvdResult.status === "fulfilled", kev: kevResult.status === "fulfilled", epss: epssResult.status === "fulfilled", attack: attackTechniques.length > 0, }, attribution: ATTRIBUTION, }; return { content: [ { type: "text" as const, text: JSON.stringify(enriched, null, 2), }, ], structuredContent: enriched, isError: false, }; }, ); - Stdio-based MCP server handler for vuln_lookup_cve (simpler variant without gateway token auth). Same logic: validates cveId with regex, fetches NVD/KEV/EPSS in parallel via Promise.allSettled, and returns enriched JSON with CVE summary, kevStatus, epss, attackTechniques, dataSources, and attribution.
mcpServer.tool( "vuln_lookup_cve", "Look up a CVE by ID and get enriched intelligence: NVD details (CVSS score, description, references), CISA KEV active exploitation status, EPSS exploitation probability score, and MITRE ATT&CK techniques.", { cveId: z .string() .regex(/^CVE-\d{4}-\d{4,}$/i) .describe("CVE identifier (e.g., CVE-2021-44228)"), }, async ({ cveId }) => { const normalizedId = cveId.toUpperCase(); const [nvdResult, kevResult, epssResult] = await Promise.allSettled([ getCveById(normalizedId), lookupCve(normalizedId), getEpssByCve(normalizedId), ]); const nvd = nvdResult.status === "fulfilled" ? nvdResult.value : null; const kev = kevResult.status === "fulfilled" ? kevResult.value : null; const epss = epssResult.status === "fulfilled" ? epssResult.value : null; if (!nvd) { const nvdError = nvdResult.status === "rejected" ? String(nvdResult.reason) : ""; return { content: [ { type: "text" as const, text: `CVE ${normalizedId} not found in NVD.${nvdError ? ` Error: ${nvdError}` : ""}`, }, ], isError: true, }; } const attackTechniques = getAttackTechniques(normalizedId); const enriched = { ...formatCveSummary(nvd), kevStatus: formatKevStatus(kev), epss: formatEpss(epss), attackTechniques: attackTechniques.length > 0 ? attackTechniques : null, dataSources: { nvd: nvdResult.status === "fulfilled", kev: kevResult.status === "fulfilled", epss: epssResult.status === "fulfilled", attack: attackTechniques.length > 0, }, attribution: ATTRIBUTION, }; return { content: [{ type: "text" as const, text: JSON.stringify(enriched, null, 2) }], isError: false, }; }, ); - gateway/src/main.ts:152-163 (registration)Gateway registration defining the cyber domain routes. Maps GET /cve/:cveId to the vuln_lookup_cve tool under the base path /api/v1/cyber.
cyber: { basePath: "/api/v1/cyber", endpoints: [ { method: "GET", path: "/cve/:cveId", tool: "vuln_lookup_cve" }, { method: "GET", path: "/search", tool: "vuln_search" }, { method: "GET", path: "/kev/latest", tool: "vuln_kev_latest" }, { method: "GET", path: "/kev/due-soon", tool: "vuln_kev_due_soon" }, { method: "GET", path: "/epss/top", tool: "vuln_epss_top" }, { method: "GET", path: "/trending", tool: "vuln_trending" }, { method: "GET", path: "/vendor/:vendor", tool: "vuln_by_vendor" }, ], }, - Input schema for vuln_lookup_cve using Zod. Defines cveId as a string matching /^CVE-\d{4}-\d{4,}$/i (case-insensitive CVE format), and an optional _gatewayToken string for internal gateway authentication.
{ cveId: z .string() .regex(/^CVE-\d{4}-\d{4,}$/i) .describe("CVE identifier (e.g., CVE-2021-44228)"), _gatewayToken: z.string().optional().describe("Internal gateway token"), }, - gateway/src/routes/cyber.ts:8-25 (helper)Express route handler in the gateway that proxies requests to the vuln_lookup_cve MCP tool. Extracts cveId from URL params and calls callMcpTool to invoke the tool on the cybersecurity-vuln-mcp server.
// GET /api/v1/cyber/cve/:cveId router.get("/cve/:cveId", async (req: Request, res: Response) => { const start = Date.now(); const tool = "vuln_lookup_cve"; try { const data = await callMcpTool({ serverName: SERVER, toolName: tool, args: { cveId: req.params.cveId, }, }); res.json(successResponse(data, tool, Date.now() - start, SERVER)); } catch (error) { const msg = error instanceof Error ? error.message : String(error); res.status(502).json(errorResponse(msg, tool, Date.now() - start, SERVER)); } });