nist-nvd-mcp-server
Allows using Cloudflare KV, R2, or D1 as storage backends for the MCP server.
Enables structured logging and optional tracing via OpenTelemetry.
Allows using Supabase as a storage backend for the MCP server, enabling persistent data storage.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nist-nvd-mcp-serverfind critical CVEs from the last 30 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
Tool | Description |
| Search CVEs by keyword, severity, CWE, date range, or CISA KEV status. |
| Fetch one or more CVEs by ID — full CVSS scores, CWE, CPE configs, KEV fields, and references. |
| Search the NVD CPE dictionary by product keyword or partial match string. |
| Find all CVEs affecting a specific product version by CPE name or virtual match string. |
| Retrieve the change history for a CVE — score revisions, status transitions, and reference additions. |
Resources
Resource | Description |
| Full CVE record by ID — same data as |
All resource data is also reachable via tools.
Related MCP server: Cybersecurity MCP Server
Capability reference
nvd_search_cves tool
Full-text keyword search (AND-semantics across words), or
exactPhrase: truefor an exact-phrase match — requireskeywordFilters: CVSS severity band (LOW/MEDIUM/HIGH/CRITICAL — CRITICAL requires
severityVersion: "v3"or"v4"), CWE ID, CISA KEV status,noRejected(default true)Date filters:
pubDays/lastModDaysconvenience 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 exclusivePagination via
limit(up to 2000, default 20) andoffsetAlways returns brief summaries with a truncated description; call
nvd_get_cvefor 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: truereturns trimmed rows (ID, status, top severity, KEV name, truncated description) — recommended for batches over 10includeReferences: falsestrips the references array;allLanguages: truerenders every localized description instead of English-onlymissingIdsenrichment field lists any requested IDs NVD didn't returnRendered text caps references at 15 per record, with a
… N moretrailer
nvd_search_cpes tool
Keyword search (e.g.
"apache http server") or a partial CPEv2.3 pattern viacpeMatchString— at least one requiredReturns full CPE name, human-readable title, deprecation status, and superseding CPEs
Pagination via
limit(up to 10,000, default 20) andoffset— a vendor-level keyword can match tens of thousands of entries, so page rather than narrowing furtherUse before
nvd_audit_cpeto resolve the exact CPE name a product needs
nvd_audit_cpe tool
Two modes: exact
cpeName(NVD auto-appliesisVulnerable) orvirtualMatchStringwith optionalversionStart/versionEndbounds (inclusive/exclusive)Client-side
severityMinfilter drops low-signal entries from the fetched page — it can only remove whatlimitalready retrievedReturns full CVE records (CVSS scores, CWE, CPE configurations, KEV fields, references)
Pagination via
limit(up to 2000, default 20) andoffset— page at a modest limit rather than raising it, since each result is a full recordauditTargetenrichment 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
orderpicks the anchor end —newest(default) reads most-recent-first,oldestreads NVD's native orderPaginated via
limit(up to 2000, default 20) andoffset, counted from the endorderanchors toThe history endpoint is markedly slower without an API key — set
NVD_API_KEYand raiseNVD_REQUEST_TIMEOUT_MS
nvd://cve/{cveId} resource
Full CVE record as
application/json— same data asnvd_get_cvefor one ID, with references and English-only descriptionscveIdmust matchCVE-YYYY-NNNNN; a well-formed but unknown ID throwscve_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-Afterholds the whole queue until NVD's window resets; keyless, a 403 fails fast and namesNVD_API_KEYrather than spending the 5-request budget on retries that cannot outlast a 30-second windowDeterministic 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
messageheader, so a refused key surfaces as a config fault namingNVD_API_KEYrather than as a malformed CVE IDHTML-response guard catches NVD rate-limit pages served as HTML instead of a 403
Agent-friendly output:
An
enrichmentblock on every response, carried on bothstructuredContentand 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 queriedmissingIdsin batch CVE lookups — a per-ID parity check instead of a silent partial resultCPE echo in audit responses —
cpeNameorvirtualMatchStringreflected back so callers can verify the correct product was auditedEmpty-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:
{
"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.
{
"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):
{
"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:
{
"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:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NVD_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
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
Clone the repository:
git clone https://github.com/cyanheads/nist-nvd-mcp-server.gitNavigate into the directory:
cd nist-nvd-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set NVD_API_KEY if you have oneConfiguration
Variable | Description | Default |
| NVD 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. | — |
| Per-request timeout in milliseconds. The history endpoint is slow without an API key — raise to 60000 if using |
|
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t nist-nvd-mcp-server .
docker run --rm -e NVD_API_KEY=your-key -p 3010:3010 nist-nvd-mcp-serverThe 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
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| NVD HTTP client with rate-limit pacing and retry. |
| CVE service — search, fetch-by-ID, CPE audit, change history, normalization. |
| CPE service — dictionary search and normalization. |
| Source service — resolves NVD contributor identifiers to their published names. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsWrap 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:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Defensive vulnerability intelligence search across public CVE/NVD and GitHub advisory APIs with CVSS
CVE lookup via NIST NVD, CISA KEV, EPSS, and MITRE ATT&CK. 7 tools.
CVE & vulnerability search: 365k+ CVEs/NotCVEs, CVSS, EPSS, CISA KEV, exploits, patches, versions.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables users to retrieve and display CVE vulnerability information from the National Vulnerability Database (NVD) with support for keyword search and detailed lookup.222 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching the NIST NVD for CVEs, retrieving full CVE details, checking software for known vulnerabilities, and searching the CPE database.MIT
- FlicenseNot gradedqualityDmaintenanceEnables CVE vulnerability lookup and search using the National Vulnerability Database (NVD), allowing users to retrieve detailed information about specific CVEs and search for vulnerabilities by keyword.-
- AlicenseNot gradedqualityCmaintenanceEnables querying CVE vulnerability data from the NIST National Vulnerability Database, including CVE lookup, product/version search via CPE filters, CVSS severity scores, and recent high-severity disclosures.2 npmMIT