Skip to main content
Glama
martc03

cybersecurity-vuln-mcp

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

TableJSON Schema
NameRequiredDescriptionDefault
cveIdYesCVE 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 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"),
    },
  • 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));
        }
    });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool aggregates data from NVD, CISA KEV, EPSS, and MITRE ATT&CK, indicating a read-only operation. Missing details like rate limits or response format, but the description is still informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that efficiently lists the tool's capabilities without any extraneous words. It is front-loaded with the purpose 'Look up a CVE by ID' and then enumerates sources.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of aggregating multiple intelligence sources, the description covers the key outputs but doesn't detail return structure or potential pagination. Since output schema is absent, a slightly more detailed description of the return format would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with a clear description and pattern for the cveId parameter. The description does not add additional semantics beyond what the schema already states, so baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool looks up a CVE by ID and returns enriched intelligence from multiple sources (NVD, CISA KEV, EPSS, MITRE ATT&CK). It distinguishes from siblings like vuln_search or vuln_by_vendor by focusing on a single CVE identifier.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Look up a CVE by ID', providing clear context for when to use this tool. However, it does not explicitly mention when not to use it or contrast it with sibling tools, but the context is strong enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/martc03/gov-mcp-servers'

If you have feedback or need assistance with the MCP directory API, please join our Discord server