vuln-nist-mcp-server

vuln-nist-mcp-server

A 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.

Category
访问服务器

README

vuln-nist-mcp-server

A Model Context Protocol (MCP) server for querying NIST National Vulnerability Database (NVD) API endpoints.

Purpose

This MCP server exposes tools to query the NVD/CVE REST API and return formatted text results suitable for LLM consumption via the MCP protocol. It includes automatic query chunking for large date ranges and parallel processing for improved performance.

Base API docs: https://nvd.nist.gov/developers/vulnerabilities

Features

Available Tools

  • get_temporal_context - Get current date and temporal context for time-relative queries

    • Essential for queries like "this year", "last year", "6 months ago"
    • Provides current date mappings and examples for date parameter construction
    • USAGE: Call this tool FIRST when user asks time-relative questions
  • search_cves - Search CVE descriptions by keyword with flexible date filtering

    • Parameters: keyword, resultsPerPage (default: 20), startIndex (default: 0), last_days (recent_days has been deprecated), start_date, end_date
    • New in v1.1.0: Support for absolute date ranges with start_date and end_date parameters
    • Date filtering priority: start_date/end_datelast_days → default 30 days
    • Auto-chunks queries > 120 days into parallel requests
    • Results sorted by publication date (newest first)
  • get_cve_by_id - Retrieve detailed information for a specific CVE

    • Parameters: cve_id
    • Returns: CVE details, references, tags, and publication dates
  • cves_by_cpe - List CVEs associated with a Common Platform Enumeration (CPE)

    • Parameters: cpe_name (full CPE 2.3 format required), is_vulnerable (optional)
    • Validates CPE format before querying
  • kevs_between - Find CVEs added to CISA KEV catalog within a date range

    • Parameters: kevStartDate, kevEndDate, resultsPerPage (default: 20), startIndex (default: 0)
    • Auto-chunks queries > 90 days into parallel requests
    • Results sorted by publication date (newest first)
  • cve_change_history - Retrieve change history for CVEs

    • Parameters: cve_id OR (changeStartDate + changeEndDate), resultsPerPage (default: 20), startIndex (default: 0)
    • Auto-chunks date range queries > 120 days into parallel requests
    • Results sorted by change creation date (newest first)

Key Features

  • Temporal Awareness: New get_temporal_context tool for accurate time-relative queries
  • Flexible Date Filtering: Support for both relative (last_days) and absolute (start_date/end_date) date ranges
  • Improved Result Ordering: All results sorted chronologically (newest first) for better relevance
  • Parallel Processing: Large date ranges are automatically split into chunks and processed concurrently
  • Input Validation: CPE format validation, date parsing, parameter sanitization
  • Emoji Indicators: Clear visual feedback (✅ success, ❌ error, ⚠️ warning, 🔍 search, 🔥 KEV, 🌐 CPE, 🕘 history, 📅 temporal)
  • Comprehensive Logging: Detailed stderr logging for debugging
  • Error Handling: Graceful handling of API errors, timeouts, and malformed responses

Prerequisites

  • Docker (recommended) or Python 3.11+
  • Network access to NVD endpoints (services.nvd.nist.gov)
  • MCP-compatible client (e.g., Claude Desktop)

Quick Start

Using Docker (Recommended)

# Clone and build
git clone https://github.com/HaroldFinchIFT/vuln-nist-mcp-server
cd vuln-nist-mcp-server
docker build -t vuln-nist-mcp-server .

# Run
docker run --rm -it vuln-nist-mcp-server

Configuration

Environment variables:

  • NVD_BASE_URL: Base URL for NVD API (default: https://services.nvd.nist.gov/rest/json)
  • NVD_VERSION: API version (default: /2.0)
  • NVD_API_TIMEOUT: Request timeout in seconds (default: 10)

Usage Examples

With Claude Desktop or MCP Client

Get temporal context for time-relative queries:

Tool: get_temporal_context
Params: {}

Search recent CVEs (relative time):

Tool: search_cves
Params: {
  "keyword": "Microsoft Exchange",
  "resultsPerPage": 10,
  "last_days": 7
}

Search CVEs with absolute date range:

Tool: search_cves
Params: {
  "keyword": "buffer overflow",
  "start_date": "2024-01-01T00:00:00",
  "end_date": "2024-03-31T23:59:59"
}

Search CVEs for "this year" (use get_temporal_context first):

# First, get temporal context
Tool: get_temporal_context

# Then use the provided date mappings
Tool: search_cves
Params: {
  "keyword": "remote code execution",
  "start_date": "2025-01-01T00:00:00",
  "end_date": "2025-09-17T12:00:00"
}

Get CVE details:

Tool: get_cve_by_id
Params: {"cve_id": "CVE-2024-21413"}

Check CPE vulnerabilities:

Tool: cves_by_cpe
Params: {
  "cpe_name": "cpe:2.3:a:microsoft:exchange_server:2019:*:*:*:*:*:*:*",
  "is_vulnerable": "true"
}

Find recent KEV additions:

Tool: kevs_between
Params: {
  "kevStartDate": "2024-01-01T00:00:00.000Z",
  "kevEndDate": "2024-03-31T23:59:59.000Z"
}

Performance Notes

  • Queries with date ranges > 90-120 days are automatically chunked for better performance
  • Parallel processing reduces total query time for large date ranges
  • Results are automatically sorted by publication date (newest first) across all chunks

Development

File Structure

vuln-nist-mcp-server/
├── Dockerfile
├── glama.json
├── LICENSE
├── nvd_logo.png
├── README.md
├── requirements.txt
├── SECURITY.md 
└── vuln_nist_mcp_server.py

Security Considerations

  • No API key required (public NVD endpoints)
  • Container runs as non-root user (mcpuser)
  • Input validation prevents injection attacks
  • No persistent storage of sensitive data
  • Network capabilities added only when required via Docker flags

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test locally
  5. Submit a pull request

License

MIT - see LICENSE file for details

Changelog

v1.1.0

  • NEW: Added get_temporal_context tool for temporal awareness and time-relative queries
  • ENHANCED: search_cves now supports absolute date ranges with start_date and end_date parameters
  • ENHANCED: Improved date filtering logic with priority: absolute dates → relative days → default 30 days
  • ENHANCED: All tools now return results sorted chronologically (newest first) for better relevance
  • IMPROVED: Better error handling for ISO-8601 date parsing
  • DEPRECATED: recent_days parameter in search_cves (use last_days instead)
  • UPDATED: Logo and visual improvements

v1.0.0

  • Initial release
  • Support for all major NVD API endpoints
  • Automatic query chunking and parallel processing
  • CPE format validation
  • Comprehensive error handling

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选