nvd-cve-mcp-server
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., "@nvd-cve-mcp-server search for critical vulnerabilities in 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.
NVD CVE MCP Server (Python, stdio)
A Model Context Protocol (MCP) server that exposes CVE search tools backed by the NVD API v2.0.
Features
search_cve_by_id— look up an exact CVE ID (e.g.CVE-2024-1234)search_cve_by_keyword— search by product name/keyword, with optionaldays_backdate filterget_recent_cves— get newly published CVEs from a configurable time window (default: 7 days)search_by_severity— filter by severity:CRITICAL,HIGH,MEDIUM,LOWNVD API rate limiting + automatic retry with exponential backoff (handles 429, 5xx errors)
Respects
Retry-Afterresponse headers; up to 3 retries per requestNVD API date range limit enforced:
days_backis validated against the 120-day maximumstdio transport (recommended for Claude Desktop and most MCP clients)
Related MCP server: NVD MCP Server
Data Source
NVD Vulnerability API v2.0:
Endpoint used:
https://services.nvd.nist.gov/rest/json/cves/2.0
Project Structure
nvd_cve_mcp_server/
├── pixi.toml
├── pyproject.toml
├── README.md
└── src/nvd_cve_mcp_server/
├── __init__.py
├── nvd_client.py
└── server.pySetup
Option 1: pixi (recommended)
Supported platforms: linux-64, linux-aarch64, osx-arm64, osx-64, win-64
cd nvd-cve-mcp-server
pixi install
pixi run run-mcp-serverDevelopment workflow (pixi tasks)
The project uses pixi tasks for all quality and packaging workflows:
pixi run lint # ruff lint
pixi run format # ruff formatter
pixi run format-check # verify formatting only
pixi run typecheck # mypy (strict)
pixi run test # pytest
pixi run check # lint + format-check + typecheck + testBuild and release artifacts
PyPI artifacts (wheel + sdist) are built with Hatch:
pixi run build-pypiConda package is built from a v1 recipe (
recipe/recipe.yaml) aligned with conda-forge/feedstock workflows. The recipe source is expected to be a version tag tarball (v<version>) with a pinned SHA256.
pixi run build-condaChangelog generation
git-cliff is configured in pyproject.toml and generates CHANGELOG.md from Conventional Commit history.
pixi run changelogConventional Commits
Use commit messages that follow: type(scope): description
Common types:
feat: new functionalityfix: bug fixdocs: documentation changesrefactor: internal refactorstest: testsbuild: packaging/build toolingci: CI/CD changeschore: maintenance
Examples:
feat(server): add severity filter toolfix(nvd): handle retry-after parsingbuild(release): add hatch pypi build task
History rewrite note: if commit history is rewritten to conform to Conventional Commits, coordinate with collaborators and force-push carefully.
Option 2: pip / venv
cd nvd-cve-mcp-server
python -m venv .venv
source .venv/bin/activate
pip install -e .
python -m nvd_cve_mcp_server.serverConfiguration
Environment variables:
NVD_API_KEY(optional, recommended for higher NVD rate limits)NVD_RATE_LIMIT_REQUESTS(optional)NVD_RATE_LIMIT_WINDOW_SECONDS(optional)
Defaults used by server:
Without API key:
5requests /30secondsWith API key:
50requests /30seconds
MCP Transport
The server uses stdio transport:
mcp.run(transport="stdio")Example MCP Client Configuration (Claude Desktop style)
Adjust Python path/environment for your machine:
{
"mcpServers": {
"cve": {
"command": "python",
"args": ["-m", "nvd_cve_mcp_server.server"],
"cwd": "/path/to/nvd-cve-mcp-server",
"env": {
"NVD_API_KEY": "your_api_key_here"
}
}
}
}Tool Usage Examples
1) search_cve_by_id
Input:
{ "cve_id": "CVE-2024-3094" }2) search_cve_by_keyword
Search by keyword with no date filter:
Input:
{ "keyword": "openssl", "limit": 5 }Search by keyword limited to the last 30 days (days_back max is 120):
Input:
{ "keyword": "openssl", "limit": 5, "days_back": 30 }3) get_recent_cves
Defaults to the last 7 days. Accepts any value from 1–120 for days_back:
Input:
{ "limit": 10, "days_back": 7 }4) search_by_severity
Input:
{ "severity": "HIGH", "limit": 10 }Response Shape
Each tool returns a normalized structure like:
{
"success": true,
"total_results": 123,
"returned_results": 10,
"cves": [
{
"id": "CVE-2024-0001",
"published": "2024-01-01T00:00:00.000",
"last_modified": "2024-01-02T00:00:00.000",
"description": "...",
"severity": "HIGH",
"base_score": 7.5,
"vector": "CVSS:3.1/...",
"cwes": ["CWE-79"],
"references": ["https://..."]
}
]
}Error case:
{
"success": false,
"error": "NVD API request failed ..."
}Error Handling & Retry Behavior
The NVDClient automatically retries transient failures up to 3 times using exponential backoff with jitter:
Condition | Behavior |
HTTP 429 / 5xx | Retry with backoff; honour |
Timeout | Retry with backoff |
Network error | Retry with backoff |
Invalid date range ( | Immediate error — no retry |
Invalid severity value | Immediate error — no retry |
Available Tools
4 toolsget_recent_cvesA
Fetch recent CVEs from the last days_back days (max 120 due to NVD API limit).
Inputs: limit, days_back. Returns: object
search_by_severityC
Filter CVEs by severity (CRITICAL, HIGH, MEDIUM, LOW).
Inputs: severity (required), limit. Returns: object
search_cve_by_idA
Search for a CVE by ID (example: CVE-2024-1234).
Inputs: cve_id (required). Returns: object
search_cve_by_keywordB
Search CVEs by product name or any keyword. Optionally limit to the last days_back days (max 120).
Inputs: keyword (required), limit, days_back. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: recent CVEs, severity filter, ID lookup, and keyword search. No overlap or confusion.
Mixed naming patterns: 'get_recent_cves' uses 'get' while others use 'search'. Also 'search_by_severity' lacks 'cve' unlike 'search_cve_by_id' and 'search_cve_by_keyword'.
With 4 tools covering common CVE search methods, the count is well-scoped for the purpose without being excessive.
Core CVE queries (time, severity, ID, keyword) are covered. Missing explicit date range or CVSS score search but acceptable for a simple server.
Maintenance
Related MCP Connectors
MCP server for the Vulners.com API
NVD MCP — wraps the NIST National Vulnerability Database API.…
Search and audit NIST NVD CVEs by keyword, severity, CWE, CISA KEV status, and CPE.
The main MCP server has 10 tools, including six public, read-only CVE tools, site search and page reading. CVE results include source software/version evidence and available CISA KEV and dated FIRST EPSS data. The separate request_security_test action requires an agent key, consent and authorization. A no-account, read-only CVE-only endpoint is https://excessionlabs.ai/mcp/cve. Docs: https://excessionlabs.ai/cve-intelligence/.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server for vulnerability management that provides tools for automated severity and CWE classification using NLP models. It enables AI agents to query the Vulnerability Lookup API for detailed CVE information and search for security vulnerabilities across various sources.1643AGPL 3.0
- AlicenseAqualityCmaintenanceMCP server for the NIST National Vulnerability Database — lets AI assistants search CVEs by keyword, severity, CPE, CWE, KEV status, and date range via natural language.21GPL 3.0
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for querying the NIST National Vulnerability Database (NVD) API, enabling search and retrieval of CVE details, temporal context, and KEV catalog entries.14MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for retrieving vulnerability data (CVE) via HTTP, testable with MCP Inspector and OpenCode.2-