Skip to main content
Glama
martc03

cybersecurity-vuln-mcp

vuln_by_vendor

Search CVEs by vendor and product, cross-referenced with CISA Known Exploited Vulnerabilities for prioritized threat intelligence.

Instructions

Search CVEs for a specific vendor/product, cross-referenced with CISA KEV.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vendorYesVendor name (e.g., 'microsoft', 'apache')
productNoProduct name (e.g., 'windows', 'log4j')
limitNo

Implementation Reference

  • MCP tool registration and handler for "vuln_by_vendor". Accepts vendor (required), product (optional), and limit (optional) params. Calls getCvesByVendor() from NVD library and getKevByVendor() from KEV library in parallel, cross-references results to flag CVEs in KEV, and returns enriched vulnerability list with KEV status.
    mcpServer.tool(
      "vuln_by_vendor",
      "Search CVEs for a specific vendor or product using CPE matching. Cross-references with CISA KEV to flag actively exploited vulnerabilities for the vendor. Essential for vendor risk assessments.",
      {
        vendor: z.string().describe("Vendor name (e.g., 'microsoft', 'apache', 'google', 'cisco')"),
        product: z.string().optional().describe("Product name to narrow results (e.g., 'windows', 'log4j')"),
        limit: z.number().int().min(1).max(50).default(20),
        _gatewayToken: z.string().optional().describe("Internal gateway token"),
      },
      async ({ vendor, product, limit, _gatewayToken }) => {
        if (!_gatewayToken || _gatewayToken !== GATEWAY_SECRET) {
          await Actor.charge({ eventName: "tool-request" });
        }
    
        try {
          const [nvdResult, kevEntries] = await Promise.allSettled([
            getCvesByVendor({ vendor, product, limit }),
            getKevByVendor(vendor, 500),
          ]);
    
          const cves =
            nvdResult.status === "fulfilled"
              ? nvdResult.value.cves.map(formatCveSummary)
              : [];
    
          const kevSet = new Set(
            kevEntries.status === "fulfilled"
              ? kevEntries.value.map((e) => e.cveID)
              : [],
          );
    
          const enrichedCves = cves.map((c) => ({
            ...c,
            inKev: kevSet.has(c.id),
          }));
    
          const response = {
            vendor,
            product: product ?? null,
            totalResults: nvdResult.status === "fulfilled" ? nvdResult.value.totalResults : 0,
            returnedCount: enrichedCves.length,
            kevCount: enrichedCves.filter((c) => c.inKev).length,
            cves: enrichedCves,
            attribution: { nvd: ATTRIBUTION.nvd, kev: ATTRIBUTION.kev },
          };
    
          return {
            content: [{ type: "text" as const, text: JSON.stringify(response, null, 2) }],
            structuredContent: response,
            isError: false,
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [{ type: "text" as const, text: `Error searching vendor CVEs: ${msg}` }],
            isError: true,
          };
        }
      },
    );
  • Stdio-based MCP tool registration and handler for "vuln_by_vendor". Same logic as main.ts handler: queries NVD by vendor/product, cross-references with CISA KEV, and returns enriched CVEs with inKev flag.
    mcpServer.tool(
      "vuln_by_vendor",
      "Search CVEs for a specific vendor/product, cross-referenced with CISA KEV.",
      {
        vendor: z.string().describe("Vendor name (e.g., 'microsoft', 'apache')"),
        product: z.string().optional().describe("Product name (e.g., 'windows', 'log4j')"),
        limit: z.number().int().min(1).max(50).default(20),
      },
      async ({ vendor, product, limit }) => {
        try {
          const [nvdResult, kevEntries] = await Promise.allSettled([
            getCvesByVendor({ vendor, product, limit }),
            getKevByVendor(vendor, 500),
          ]);
    
          const cves = nvdResult.status === "fulfilled" ? nvdResult.value.cves.map(formatCveSummary) : [];
          const kevSet = new Set(kevEntries.status === "fulfilled" ? kevEntries.value.map((e) => e.cveID) : []);
          const enrichedCves = cves.map((c) => ({ ...c, inKev: kevSet.has(c.id) }));
    
          const response = {
            vendor, product: product ?? null,
            totalResults: nvdResult.status === "fulfilled" ? nvdResult.value.totalResults : 0,
            returnedCount: enrichedCves.length,
            kevCount: enrichedCves.filter((c) => c.inKev).length,
            cves: enrichedCves,
            attribution: { nvd: ATTRIBUTION.nvd, kev: ATTRIBUTION.kev },
          };
    
          return { content: [{ type: "text" as const, text: JSON.stringify(response, null, 2) }], isError: false };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text" as const, text: `Error: ${msg}` }], isError: true };
        }
      },
    );
  • The NvdVendorParams interface and getCvesByVendor() helper function. Builds a CPE virtualMatchString for NVD API search (cpe:2.3:*:vendor:product:*) and returns matching CVEs.
    export interface NvdVendorParams {
      vendor: string;
      product?: string;
      limit?: number;
    }
    
    export async function getCvesByVendor(opts: NvdVendorParams): Promise<{
      totalResults: number;
      cves: NvdCveItem[];
    }> {
      const params = new URLSearchParams();
    
      // NVD uses virtualMatchString for CPE-based vendor search
      let cpeMatch = `cpe:2.3:*:${opts.vendor.toLowerCase()}`;
      if (opts.product) {
        cpeMatch += `:${opts.product.toLowerCase()}`;
      }
      cpeMatch += `:*`;
      params.set("virtualMatchString", cpeMatch);
    
      const limit = Math.min(opts.limit ?? 20, 50);
      params.set("resultsPerPage", String(limit));
    
      const data = await nvdFetch(params);
    
      const cves = data.vulnerabilities.map((v) => v.cve);
      for (const cve of cves) {
        cveCache.set(cve.id, cve);
      }
    
      return { totalResults: data.totalResults, cves };
    }
  • The getKevByVendor() helper used by vuln_by_vendor. Loads the CISA KEV catalog and filters entries by vendorProject name (case-insensitive substring match), returning up to 'limit' entries.
    export async function getKevByVendor(
      vendor: string,
      limit: number,
    ): Promise<KevEntry[]> {
      const catalog = await loadCatalog();
      const vendorLower = vendor.toLowerCase();
    
      return catalog.vulnerabilities
        .filter((v) => v.vendorProject.toLowerCase().includes(vendorLower))
        .sort((a, b) => b.dateAdded.localeCompare(a.dateAdded))
        .slice(0, limit);
    }
  • Gateway Express route that exposes GET /api/v1/cyber/vendor/:vendor and delegates to the MCP tool 'vuln_by_vendor' on the cybersecurity-vuln-mcp server.
    // GET /api/v1/cyber/vendor/:vendor
    router.get("/vendor/:vendor", async (req: Request, res: Response) => {
        const start = Date.now();
        const tool = "vuln_by_vendor";
        try {
            const data = await callMcpTool({
                serverName: SERVER,
                toolName: tool,
                args: {
                    vendor: req.params.vendor,
                    ...(req.query.product && { product: String(req.query.product) }),
                    ...(req.query.limit && { limit: Number(req.query.limit) }),
                },
            });
            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));
        }
    });
Behavior2/5

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

With no annotations, the description carries full behavioral burden. It mentions cross-referencing with KEV but does not disclose side effects, rate limits, error handling, or whether results are limited to KEV entries.

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?

Single sentence, front-loaded with action and resource, no wasted words.

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

Completeness2/5

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

The description is too brief given 3 parameters and no output schema. Missing details on required fields, optional parameter purpose, return format, and cross-reference behavior.

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?

Schema coverage is 67% (vendor and product described, limit not). The description adds no extra meaning beyond the schema; limit parameter remains undocumented. Baseline 3 as schema covers most.

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 searches for CVEs by vendor/product and cross-references with CISA KEV, which distinguishes it from sibling tools like vuln_search or vuln_lookup_cve.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or excluded use cases. Sibling tools are listed but not referenced.

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