Skip to main content
Glama
NVD/NIST MCP server

NVD/NIST MCP server

by d4ngkh04w

NIST NVD MCP server

MCP server exposing the NVD APIs (CVE search, history, CPE dictionary, CPE match criteria) over stdio, with a local SQLite + JSON disk cache so repeated lookups do not hit the upstream API.

Requirements

  • Node.js >= 22.5 (uses the built-in node:sqlite module)

  • A free NVD API key is recommended

Related MCP server: Vulnerability Registry MCP Server

Register with an MCP client

npm install && npm run build
{
  "mcpServers": {
    "nist-nvd": {
      "command": "node",
      "args": ["/absolute/path/to/dist/main.js"],
      "env": { "NVD_API_KEY": "your-key" }
    }
  }
}

The server speaks JSON-RPC on stdin/stdout; every log line goes to stderr.

Tools

Tool

Purpose

nvd_get_cve

Full record for one CVE

nvd_get_cve_summary

Compact summary of one CVE

nvd_get_cves

Batch summaries (up to 100 IDs)

nvd_search_cves

Search CVEs by keyword, IDs, CPE, CWE, CVSS, KEV, dates

nvd_get_recent_cves

Newest CVEs by publication date

nvd_get_modified_cves

Newest CVEs by last-modified date

nvd_get_cve_history

Change history of one CVE

nvd_search_cpes

Search the CPE Dictionary

nvd_get_cpe

One CPE Dictionary entry

nvd_search_cpe_matches

Search CPE Match Criteria

All tools are read-only. Use fields to narrow payloads, and pageSize/cursor to paginate lists.

Example

Call nvd_get_cve_summary with:

{ "cveId": "CVE-2021-44228" }

Returns a compact CVE summary and cache metadata. See usage for batch, search, pagination and CPE examples.

Defaults and limits

  • Fresh cache hits avoid NVD; outage fallback is marked by meta.stale and meta.warnings.

  • Upstream requests are serialized, 6 seconds apart by default. Tool deadline: 120 seconds.

  • Modified feeds are bounded to 10,000 CVEs and a roughly 4 MB snapshot; narrow large queries.

  • Unknown inputs and oversized output return errors; use smaller pages or fewer fields.

Configuration is optional: copy .env.example to .env or set environment variables in your MCP client. See operations for details and troubleshooting.

Docker

docker build -t nist-nvd-mcp-server .
docker run -i --rm -e NVD_API_KEY=your-key -v nvd-data:/data nist-nvd-mcp-server

Use -i (not -t) so stdin stays open. The container runs as a non-root user and shuts down cleanly on docker stop.

Development

npm run typecheck   # tsc --noEmit
npm run lint        # eslint
npm test            # vitest (unit + integration + contract); runs build first
npm run build       # emit dist/
npm run dev         # tsx src/main.ts, no build step

Tests never touch the real NVD API - they use a mock server, a temp SQLite DB, and a temp cache dir. GitHub Actions runs the same checks on Node.js 22 and 24.

Documentation

License

MIT - this project is not affiliated with or endorsed by NIST/NVD.

Available Tools

10 tools
nvd_get_cpeGet a CPE nameA
Read-onlyIdempotent

Return one entry of the NVD Official CPE Dictionary. Provide exactly one of cpeNameId (preferred, exact) or cpeName. cpeName is resolved by upstream pattern search over at most 3 pages; if the exact name is not in that window the tool returns CPE_NOT_FOUND with the scanned/total counts and suggests nvd_search_cpes. That search ignores the deprecation filter, so deprecated entries resolve too. Entries are cached for 7 days.

Inputs: cpeName, cpeNameId. Returns: data, meta

nvd_get_cveGet CVE detailsA
Read-onlyIdempotent

Return the full NVD record for one CVE: description, all CVSS metrics, CWEs, configurations, references and CISA KEV status. Use nvd_get_cve_summary for the essentials, nvd_get_cves for a batch. Cached for 24 hours; on an NVD outage the stale copy is returned with a warning in meta.warnings.

Inputs: cveId (required), includeRaw, includeReferences, includeConfigurations. Returns: data, meta

nvd_get_cve_historyGet CVE change historyA
Read-onlyIdempotent

Return the change history of one CVE: "New CVE Received", "Initial Analysis", "CVE Modified", "Rejected" and similar events, with their field-level changes and timestamps. Filter by eventName or changeBetween (maximum 120 days). Cached for 1 hour; paginate with the opaque cursor.

Inputs: cveId (required), cursor, pageSize, eventName, +1 more. Returns: meta, items, pagination

nvd_get_cvesGet multiple CVE summariesA
Read-onlyIdempotent

Return summaries for up to 100 CVE identifiers in one call. Identifiers are uppercased and de-duplicated; only missing or stale ones are fetched, in one batch. Reports foundIds, missingIds and meta.requested/found/missing; use nvd_get_cve for a full record.

Inputs: cveIds (required). Returns: meta, items, foundIds, missingIds

nvd_get_cve_summaryGet CVE summaryA
Read-onlyIdempotent

Return a compact view of one CVE: id, timestamps, status, English summary, primary CVSS score, CWEs, affected products, KEV flag and reference count. Configurations, references and the raw payload are omitted - use nvd_get_cve for those. Derived from the cached record, so it shares the same 24 hour freshness window.

Inputs: cveId (required). Returns: data, meta

nvd_get_modified_cvesGet recently modified CVEsA
Read-onlyIdempotent

Return CVEs ordered by last-modified date, newest first (ordering "last_modified_desc"). Defaults to the last 7 days: use days or an explicit start+end window (mutually exclusive, maximum 120 days). All filters are sent to NVD, so totalResults is the exact upstream total. Cached for 5 minutes; paginate by passing pagination.nextCursor back as cursor with the same filters and pageSize - the resolved window travels inside the cursor, so a relative days window stays stable across pages.

Inputs: end, cvss, days, start, +7 more. Returns: meta, items, pagination

nvd_get_recent_cvesGet recently published CVEsA
Read-onlyIdempotent

Return CVEs ordered by publication date, newest first (ordering "published_desc"). Defaults to the last 7 days: use days or an explicit start+end window (mutually exclusive, maximum 120 days). Cached for 5 minutes; paginate by passing pagination.nextCursor back as cursor with the same filters and pageSize - the resolved window travels inside the cursor, so a relative days window stays stable across pages.

Inputs: end, cvss, days, start, +6 more. Returns: meta, items, pagination

nvd_search_cpe_matchesSearch CPE Match CriteriaA
Read-onlyIdempotent

Search CPE Match Criteria, which link CVEs to CPE names and version ranges. At least one filter is required: cveId, matchCriteriaId, matchStringSearch or lastModified (maximum 120 days). matchStringSearch must be a complete CPE match string such as cpe:2.3:a:vendor:product::::::::; upstream rejects partial keywords and version ranges. Cached for 24 hours; paginate with the opaque cursor.

Inputs: cveId, cursor, pageSize, lastModified, +2 more. Returns: meta, items, pagination

nvd_search_cpesSearch CPE namesA
Read-onlyIdempotent

Search the NVD Official CPE Dictionary by keyword, match string, criteria UUID, or last-modified window. At least one filter is required; date windows are limited to 120 days. Deprecated CPEs are filtered locally unless includeDeprecated is true. totalResults is the upstream NVD count before local filtering, so it may be greater than returned items or even > 0 with an empty items array when matching entries are filtered out. Results are cached for 24 hours and use opaque cursor pagination; reuse nextCursor with the same filters and pageSize.

Inputs: cursor, keyword, pageSize, lastModified, +4 more. Returns: meta, items, pagination

nvd_search_cvesSearch CVEsA
Read-onlyIdempotent

Search CVE records with the NVD 2.0 filters: keyword, CVE IDs, CPE name or match string, CWE, source identifier, vuln statuses, published/last-modified windows, KEV window, CVSS metrics and CERT flags. Rules: keywordExactMatch requires keyword; isVulnerable requires cpeName; cpeName and virtualMatchString are mutually exclusive; date windows are limited to 120 days. NVD evaluates every filter, so totalResults is the exact upstream total. Cached for 15 minutes; paginate by passing pagination.nextCursor back as cursor with the same filters and pageSize.

Inputs: kev, cvss, cweId, cursor, +15 more. Returns: meta, items, pagination

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tool names and descriptions clearly delineate resource+action, but nvd_get_recent_cves and nvd_get_modified_cves are nearly identical except for ordering, and nvd_get_cve, nvd_get_cve_summary, and nvd_get_cves all target CVE records with overlapping semantics. The descriptions do distinguish scope and detail level, but an agent could easily misselect between the full, summary, and batch variants without careful reading.

    Naming Consistency5/5

    Every tool follows a consistent nvd_ verb_noun pattern (get, search, and entity names like cve, cves, cpe). Variants like nvd_get_cve_summary and nvd_get_cve_history extend the base name predictably. No mixed conventions or inconsistent casing.

    Tool Count5/5

    Ten tools is well within the sweet spot for a domain-specific API wrapper. Each tool maps to a distinct NVD endpoint or use case (single record, batch, search, history, CPE dictionary, CPE matches), so the surface feels scoped rather than padded.

    Completeness4/5

    The surface covers CVE retrieval (single, batch, summary, search, history, recent, modified) and CPE lookup (search, get, matches), which is core NVD functionality. Missing operations like CVE creation or modification don't apply since NVD is read-only, but there is no tool for bulk CPE dictionary listing or NVD API status, which could be minor gaps for some workflows.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server that provides tools to search, filter, and retrieve CVE data from the NVD API, including by ID, keyword, severity, and recency.
      4
      223 PyPI
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables querying and analyzing a legacy, file-based vulnerability registry via MCP tools for CVE lookup, search, vendor navigation, and aggregate statistics.
      5
      ISC
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables querying the CVE-Search API to browse vendors and products, retrieve vulnerabilities by vendor/product or CVE ID, fetch the latest CVEs with CAPEC/CWE/CPE details, and check database update status via MCP tools.
      -