Nist Nvd Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.4.0更新於 Oct 26, 2026

Search and audit NIST NVD CVEs by keyword, severity, CWE, CISA KEV status, and CPE.

已驗證Streamable HTTP可網頁執行資料庫安全與監控

概覽

AI 產生的概覽

以唯讀方式存取 NIST 國家漏洞資料庫:搜尋 CVE、解析 CPE 產品名稱、稽核產品漏洞並追蹤 CVE 修訂歷程。

可以做什麼
  • 依關鍵字、嚴重等級、CWE、日期範圍或 CISA KEV 狀態搜尋 CVE,支援分頁與簡要摘要
  • 依 ID 批次取得完整 CVE 記錄,含 CVSS 評分、CWE、CPE 設定、KEV 欄位與參考連結
  • 依產品關鍵字或部分比對字串搜尋 CPE 字典,解析正確的產品識別碼
  • 以精確 CPE 名稱或帶版本範圍的虛擬比對字串稽核某產品版本受影響的所有 CVE
  • 查詢單一 CVE 的變更歷程:評分修訂、狀態轉換、參考新增與設定更新
  • 以穩定的資源 URI 讀取單筆 CVE 記錄,方便注入上下文
適用情境
適合漏洞研判、相依套件與產品安全審查,以及追蹤某 CVE 的評分或狀態是否變動。適合需要權威 NVD 資料而非一般網頁搜尋的助理。
執行需求
可使用公開託管的 Streamable HTTP 端點(免安裝),或透過 npx/bunx/Docker 在本機執行;本機執行需 Bun v1.4.0+ 或 Node.js v24+。NVD API 金鑰為選用,但可將速率上限從每 30 秒 5 次提高到 50 次,透過 NVD_API_KEY 設定。需要能連線至 NVD 的網路。
安裝前請注意
對 NVD 為唯讀操作,但每次查詢都會送往第三方服務,受其速率限制與排隊機制約束。未設定 NVD_API_KEY 時歷史查詢較慢,可能需要調高 NVD_REQUEST_TIMEOUT_MS。公開託管端點由第三方營運,若在意查詢隱私可自行部署。預設會截斷過大的讀取,除非將 NVD_CLAMP_LIMITS 設為 false。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Nist Nvd Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fnist-nvd-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "nist-nvd": {
      "type": "http",
      "url": "https://nist-nvd.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/nist-nvd-mcp-server

Search and audit CVEs by keyword, severity, CWE, CISA KEV status, and CPE via the NIST National Vulnerability Database. STDIO or Streamable HTTP.

5 Tools • 2 Resources

Public Hosted Server: https://nist-nvd.caseyjhand.com/mcp


Overview

CVE and CPE data from the NIST National Vulnerability Database. Search and audit vulnerabilities by keyword, severity, CWE, or CISA KEV status, resolve products to CPE names, and track a CVE's revision history.

Tools

ToolDescription
nvd_search_cvesSearch CVEs by keyword, severity, CWE, date range, or CISA KEV status.
nvd_get_cveFetch one or more CVEs by ID — full CVSS scores, CWE, CPE configs, KEV fields, and references.
nvd_search_cpesSearch the NVD CPE dictionary by product keyword or partial match string.
nvd_audit_cpeFind all CVEs affecting a specific product version by CPE name or virtual match string.
nvd_get_cve_historyRetrieve the change history for a CVE — score revisions, status transitions, and reference additions.

Resources

ResourceDescription
nvd://cve/{cveId}Full CVE record by ID — same data as nvd_get_cve for a single ID, as a stable URI for injectable context.
skill://nist-nvd-guide/SKILL.mdProduct applicability, identifier chains, severity interpretation, and coverage guidance.

CVE resource data is also reachable via nvd_get_cve. The published guide is also available to plugin installs under skills/nist-nvd-guide/SKILL.md.

Capability reference

Oversized read limits clamp by default: 2000 for CVE search, audit, and history; 10000 for CPE search; 100 IDs for batch lookup. Clamped calls report requestedLimit, effectiveLimit, and a notice on both output surfaces. Batch lookup validates every supplied ID and lists normalized, deduplicated IDs beyond the processed prefix in unprocessedIds; missingIds covers queried IDs only. Set NVD_CLAMP_LIMITS=false before startup to restore advertised maxima and reject oversized requests. Zero, negative, and fractional limits remain invalid.

nvd_search_cves tool

  • Full-text keyword search (AND-semantics across words), or exactPhrase: true for an exact-phrase match — requires keyword
  • Filters: CVSS severity band (LOW/MEDIUM/HIGH/CRITICAL — CRITICAL requires severityVersion: "v3" or "v4"), CWE ID, CISA KEV status, noRejected (default true)
  • Date filters: pubDays/lastModDays convenience shorthands (auto-clamped to 120 days, clamping reported in the enrichment) or explicit ISO 8601 ranges (120-day max span, both ends required); the two forms per axis are mutually exclusive
  • Pagination via limit (up to 2000, default 20) and offset
  • Always returns brief summaries with a truncated description; call nvd_get_cve for full detail

nvd_get_cve tool

  • Batch up to 100 CVE IDs per call
  • Full mode (default): CVSS scores across v2.0/v3.0/v3.1/v4.0, CWE weaknesses, CPE configurations, CISA KEV fields, references
  • brief: true returns trimmed rows (ID, status, top severity, KEV name, truncated description) — recommended for batches over 10
  • includeReferences and includeConfigurations default to true; set either false to omit that field from both output surfaces. allLanguages: true keeps every localized description instead of English-only
  • missingIds enrichment field lists any requested IDs NVD didn't return
  • Both output surfaces carry every selected reference and CPE configuration; optional SSVC assessments appear when NVD supplies them

nvd_search_cpes tool

  • Keyword search (e.g. "apache http server") or a partial CPEv2.3 pattern via cpeMatchString — at least one required
  • Returns full CPE name, human-readable title, deprecation status, and superseding CPEs
  • Pagination via limit (up to 10,000, default 20) and offset — a vendor-level keyword can match tens of thousands of entries, so page rather than narrowing further
  • Use before nvd_audit_cpe to resolve the exact CPE name a product needs

nvd_audit_cpe tool

  • Two modes: exact cpeName (NVD auto-applies isVulnerable) or virtualMatchString with optional versionStart/versionEnd bounds (inclusive/exclusive)
  • Client-side severityMin filters the fetched page by the highest severity band across all CVSS metrics; the headline still follows the highest numerical score. It can only remove what limit retrieved
  • Returns full CVE records (CVSS scores, CWE, CPE configurations, KEV fields, references)
  • includeReferences and includeConfigurations default to true; false omits that field from both output surfaces. SSVC assessments remain optional
  • Pagination via limit (up to 2000, default 20) and offset — page at a modest limit rather than raising it, since each result is a full record
  • auditTarget enrichment field echoes the CPE identifier used, so callers can verify the correct product was queried

nvd_get_cve_history tool

  • Returns change events: CVSS revisions, status transitions, reference additions, CPE configuration updates
  • order picks the anchor end — newest (default) reads most-recent-first, oldest reads NVD's native order
  • Paginated via limit (up to 2000, default 20) and offset, counted from the end order anchors to
  • The history endpoint is markedly slower without an API key — set NVD_API_KEY and raise NVD_REQUEST_TIMEOUT_MS

nvd://cve/{cveId} resource

  • Full CVE record as application/json — same data as nvd_get_cve for one ID, with references and English-only descriptions
  • cveId must match CVE-YYYY-NNNNN; a well-formed but unknown ID throws cve_not_found

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

NVD-specific:

  • Request pacer enforces NVD's 5 req/30s (no key) and 50 req/30s (with key) limits with automatic queuing, at a minimum inter-request gap derived from the window and limit
  • Retry wraps the pacer rather than sitting inside it — every attempt takes its own turn in the queue, so retries count against the rate budget instead of bursting past it
  • A 403's Retry-After holds the whole queue until NVD's window resets; keyless, a 403 fails fast and names NVD_API_KEY rather than spending the 5-request budget on retries that cannot outlast a 30-second window
  • Deterministic rejections fail fast instead of consuming retries — NVD answers both a bad parameter and a refused API key with HTTP 404, separated only by a message header, so a refused key surfaces as a config fault naming NVD_API_KEY rather than as a malformed CVE ID
  • NVD block pages return a nonretryable blocked-request error; malformed JSON and response envelopes return an invalid-response error with recovery guidance
  • Request timeouts and caller cancellation remain active through response-body reads

Agent-friendly output:

  • An enrichment block on every response, carried on both structuredContent and the rendered text — total results, returned count, page offset, the filters actually applied, and any date-clamping events, so agents can reason about what was really queried
  • missingIds in batch CVE lookups — a per-ID parity check instead of a silent partial result
  • CPE echo in audit responses — cpeName or virtualMatchString reflected back so callers can verify the correct product was audited
  • Empty-result notices that name the cause — an unmatched query, a severity threshold that emptied the page, an offset past the end of the result set, and a clean audit ("no known vulnerabilities") are told apart rather than all reading as errors or "nothing found"

Getting started

Public Hosted Instance

A public instance is available at https://nist-nvd.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

json
{  "mcpServers": {    "nist-nvd-mcp-server": {      "type": "streamable-http",      "url": "https://nist-nvd.caseyjhand.com/mcp"    }  }}

Self-Hosted / Local

Add the following to your MCP client configuration file.

json
{  "mcpServers": {    "nist-nvd-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/nist-nvd-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "NVD_API_KEY": "your-api-key"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "nist-nvd-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/nist-nvd-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "NVD_API_KEY": "your-api-key"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "nist-nvd-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "MCP_TRANSPORT_TYPE=stdio",        "-e", "NVD_API_KEY=your-api-key",        "ghcr.io/cyanheads/nist-nvd-mcp-server:latest"      ]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NVD_API_KEY=... bun run start:http# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • Optional: NVD API key — free, raises rate limit from 5 req/30s to 50 req/30s.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/nist-nvd-mcp-server.git
  1. Navigate into the directory:
sh
cd nist-nvd-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment:
sh
cp .env.example .env# edit .env and set NVD_API_KEY if you have one

Configuration

VariableDescriptionDefault
NVD_API_KEYNVD API key. Without it, rate limit is 5 req/30s; with it, 50 req/30s. Get one free at nvd.nist.gov/developers/request-an-api-key.—
NVD_REQUEST_TIMEOUT_MSPer-request timeout in milliseconds. The history endpoint is slow without an API key — raise to 60000 if using nvd_get_cve_history without a key.10000
NVD_CLAMP_LIMITSClamp oversized reads to 2000 CVEs/events, 10000 CPEs, or 100 CVE IDs. false restores schema maxima and rejection.true
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false

See .env.example for the full list of optional overrides.

Node and Bun load .env from the working directory before server configuration is parsed. Exported variables take precedence. Invalid NVD_CLAMP_LIMITS values fail configuration validation; use true or false.

Running the server

Local development

  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker build -t nist-nvd-mcp-server .docker run --rm -e NVD_API_KEY=your-key -p 3010:3010 nist-nvd-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/nist-nvd-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers tools/resources and inits services.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts).
src/mcp-server/resourcesResource definitions (*.resource.ts).
src/services/nvd-httpNVD HTTP client with rate-limit pacing and retry.
src/services/nvd-cveCVE service — search, fetch-by-ID, CPE audit, change history, normalization.
src/services/nvd-cpeCPE service — dictionary search and normalization.
src/services/nvd-sourceSource service — resolves NVD contributor identifiers to their published names.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools and resources via the barrels in src/mcp-server/*/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 e3cf5b8

工具

5

nvd_get_cve

Get CVE Details

Fetch one or more CVEs by ID from the NIST National Vulnerability Database. Returns CVSS scores across all available versions (v2.0, v3.0, v3.1, v4.0), CWE weakness classifications, affected CPE configurations, CISA KEV fields, current SSVC assessments, and references. Up to 100 CVE IDs per call. For bulk lookups of more than 10 IDs, use brief: true — full records for 100 CVEs can exceed 1MB and exhaust context budgets.

輸入參數briefcveIds必填allLanguagesincludeReferencesincludeConfigurations

nvd_search_cves

Search CVEs

Search CVEs by keyword, severity, CWE, date range, or CISA KEV status. The primary discovery tool for vulnerability surveillance and triage workflows. pubDays and lastModDays expand to date pairs; values over 120 days are clamped to the NVD maximum and reported in the response enrichment. Returns brief summaries — call nvd_get_cve for full detail on specific IDs. At least one filter is recommended; omitting all filters returns CVEs in default NVD index order (oldest first by CVE ID). Blank string filters are omitted with a notice; nonblank strings are trimmed.

輸入參數cweIdlimitoffsetkevOnlykeywordpubDaysseveritynoRejectedpubEndDateexactPhraselastModDayspubStartDate另有 3 個

nvd_audit_cpe

Audit CPE for Vulnerabilities

Find all CVEs affecting a specific product and version using CPE (Common Platform Enumeration). Requires either an exact CPE name (cpeName) or a partial match string (virtualMatchString) with optional version range bounds. With cpeName, NVD scopes results to configurations where the product is directly vulnerable, not merely referenced as a dependency. Use nvd_search_cpes first to resolve the correct CPE string for a product. Returns full CVE records including current SSVC assessments.

輸入參數limitoffsetcpeNameversionEndseverityMinallLanguagesversionStartversionEndTypeversionStartTypeincludeReferencesvirtualMatchStringincludeConfigurations

nvd_search_cpes

Search CPE Dictionary

Search the NVD CPE (Common Platform Enumeration) dictionary by product keyword or partial match string. Returns CPE names, human-readable titles, and deprecation status. Use before nvd_audit_cpe to resolve the correct CPE name for a product — CPE strings are precise identifiers (e.g., cpe:2.3:a:apache:http_server:2.4.51:*:*:*:*:*:*:*) and must match exactly to audit the right product.

輸入參數limitoffsetkeywordcpeMatchString

nvd_get_cve_history

Get CVE Change History

Retrieve the change history for a single CVE — CVSS score revisions, reference additions, status transitions (e.g., "Received" → "Analyzed"), and CPE configuration updates. Use when tracking a CVE's escalation or investigating when a score changed. Events are returned newest-first by default; pass order="oldest" for the CVE's earliest events. For the current record, call nvd_get_cve instead. The NVD history endpoint is significantly slower than other NVD endpoints, especially without an API key — set NVD_API_KEY for reliable operation.

輸入參數cveId必填limitorderoffset

版本歷史

4
  1. v0.4.0最新Oct 26, 2026
  2. v0.3.2Oct 9, 2026
  3. v0.3.1Sep 21, 2026
  4. v0.3.0Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分