CVE MCP Server

by mukul975

Not rated
GitHub

Description

A production-grade Model Context Protocol (MCP) server that turns Claude into a full-spectrum security analyst. Instead of juggling 15+ browser tabs across NVD, EPSS, CISA KEV, Shodan, VirusTotal, and GreyNoise, ask Claude one question and get correlated intelligence in seconds…

About

A production-grade Model Context Protocol (MCP) server that turns Claude into a full-spectrum security analyst. Instead of juggling 15+ browser tabs across NVD, EPSS, CISA KEV, Shodan, VirusTotal, and GreyNoise, ask Claude one question and get correlated intelligence in seconds. Built with Python, FastMCP, httpx…

Details

Author
mukul975
Categories
Developer Tools, Other, AI

Setup

Install CVE MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mukul975/cve-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

AI-powered security intelligence at your fingertips — 28 tools + a one-calltriage_cveorchestrator, 24 data sources, one protocol.[](https://mahipal.engineer/survey?utm_source=github_badge&amp;utm_medium=readme&amp;utm_campaign=gars2026)<<<[](https://python.org)<<<[](https://github.com/mukul975/cve-mcp-server/blob/HEAD/LICENSE)<<<[](https://modelcontextprotocol.io)<<<[](https://github.com/mukul975/cve-mcp-server)<<<

A production-gradeModel Context Protocol (MCP) serverthat turns Claude into a full-spectrum security analyst. Instead of juggling 15+ browser tabs across NVD, EPSS, CISA KEV, Shodan, VirusTotal, and GreyNoise, ask Claude one question and get correlated intelligence in seconds. Built with Python, FastMCP, httpx, aiosqlite, Pydantic v2, and defusedxml.

The problem:Triaging a single CVE means querying NVD for CVSS scores, EPSS for exploitation probability, CISA KEV for active exploitation status, GitHub for patches, and VirusTotal for malware associations — then mentally correlating everything. For 50 CVEs, that's an entire day lost.

The solution:CVE MCP Server gives Claude direct access to 28 security tools across 24 APIs — fronted by thetriage_cveone-call orchestrator. Ask "Should we patch CVE-2024-3400?" and Claude fans out to every relevant source in parallel, calculates a composite risk score (with a CISA KEV hard override), and delivers a prioritized recommendation with evidence.

🌍 GARS-2026 — Global Agentic AI Readiness Survey

I'm running a global academic study measuring how ready security professionals, developers, and enterprise teams actually are for agentic AI — MCP servers, tool calling, governance, and human-in-the-loop workflows.

If you use this repo, your response would be a genuinely valuable data point.

- 60 questions · Anonymous · Supervised by SRH Berlin
- You get50 Casky Tokensfor early access to
casky.ai
- Results published open access under CC-BY 4.0

- Architecture
-
Tool catalog
-
Installation
-
API keys setup
-
Configuration
-
Quick start
-
Usage examples
-
Risk score explained
-
Data sources
-
Running tests
-
Architecture deep dive
-
Security and privacy
-
Troubleshooting
-
Roadmap and known limitations
-
Contributing
-
License

┌─────────────────────────────────────────────────────────────────────┐ │ Claude Desktop / Claude Code │ │ (MCP Client via stdio) │ └──────────────────────────────┬──────────────────────────────────────┘ │ Model Context Protocol (stdio) ▼ ┌─────────────────────────────────────────────────────────────────────┐ │ CVE MCP Server (Python) │ │ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │ │ │ 27 MCP │ │ Composite │ │ SQLite Cache │ │ │ │ Tools │ │ Risk Engine │ │ + Audit Log │ │ │ └──────┬──────┘ └──────┬───────┘ └───────┬───────┘ │ │ │ │ │ │ │ ┌──────┴────────────────┴───────────────────┴──────┐ │ │ │ Async HTTP Client (httpx) │ │ │ │ Rate Limiter · Response Cache │ │ │ └──────────────────────┬───────────────────────────┘ │ └─────────────────────────┼───────────────────────────────────────────┘ │ HTTPS (outbound only) ┌───────────────┼───────────────────────────┐ ▼ ▼ ▼ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ VULNERABILITY│ │ NETWORK │ │ THREAT │ │ INTELLIGENCE │ │ INTELLIGENCE │ │ INTELLIGENCE │ ├──────────────┤ ├──────────────┤ ├──────────────┤ │ NVD API 2.0 │ │ AbuseIPDB │ │ VirusTotal │ │ EPSS / FIRST │ │ GreyNoise v3 │ │ MalwareBazaar│ │ CISA KEV │ │ Shodan │ │ ThreatFox │ │ OSV.dev │ │ CIRCL PDNS │ │ Ransomwhere │ │ GitHub GHSA │ │ │ │ AlienVault │ │ MITRE ATT&CK │ │ │ │ URLScan.io │ └──────────────┘ └──────────────┘ └──────────────┘

All traffic isoutbound HTTPS only— no inbound ports are opened. API keys are loaded from environment variables and never logged. Private/internal IP addresses are blocked from all lookup tools.

Also exposed via MCP primitives— Resources:kev://catalog,epss://scores/{cve_id},manifest://tool-hash(SHA-256 over the registered tool surface, for tamper detection). Prompts:patch_decision,compare_and_prioritize,dependency_triage.

Core Vulnerability Intelligence (8 tools)

Exploit & Attack Intelligence (4 tools)

Phase 3: Advanced Risk & Reporting (4 tools)

- Python 3.10+(3.11 or 3.12 recommended)
- piporuvpackage manager
- Gitfor cloning the repository
- A terminal with access to environment variables

# 1. Clone the repository git clone https://github.com/mukul975/cve-mcp-server.git cd cve-mcp-server # 2. Create and activate a virtual environment python -m venv venv # macOS / Linux: source venv/bin/activate # Windows (PowerShell): .\venv\Scripts\Activate.ps1 # Windows (CMD): venv\Scripts\activate.bat # 3. Install dependencies pip install -e . # 4. Copy and configure environment variables cp .env.example .env # Edit .env with your API keys (see API Keys Setup section below) # 5. Verify the server starts python -m cve_mcp.server
git clone https://github.com/mukul975/cve-mcp-server.git cd cve-mcp-server uv venv source .venv/bin/activate # or .venv\Scripts\activate on Windows uv pip install -e . cp .env.example .env

API keys are organized by priority — get theTier 1keys first for maximum coverage with free tools, then progressively add Tier 2 and Tier 3 as needed.

Tier 1: High priority (free, instant access, maximum coverage)

Tier 2: Recommended (free accounts, significant value)

Tier 3: Optional (extended intelligence)

⚡ Zero-key start:Eight tools work without any API key — EPSS, CISA KEV, OSV.dev, MITRE ATT&CK, CWE lookups, CVSS parsing, Ransomwhere, and NVD (at reduced rate). You can start using the server immediately and add keys progressively.

# NVD API key — free at https://nvd.nist.gov/developers/request-an-api-key # Without key: 5 req/30s | With key: 50 req/30s NVD_API_KEY= # GitHub token — increases rate limit from 60/hr to 5000/hr (no scopes needed) GITHUB_TOKEN= # Threat intelligence keys (all optional — tools degrade gracefully without them) ABUSEIPDB_KEY= # https://www.abuseipdb.com/account/api VIRUSTOTAL_KEY= # https://www.virustotal.com/gui/join-us URLSCAN_KEY= # https://urlscan.io/user/signup SHODAN_KEY= # https://account.shodan.io/register # GreyNoise — uses /v3/ip/{ip} endpoint (NOT the deprecated /v3/community) GREYNOISE_API_KEY= # https://viz.greynoise.io/signup # CIRCL Passive DNS — requires partner registration CIRCL_PDNS_USER= CIRCL_PDNS_PASS= # Optional overrides CACHE_DB_PATH= # defaults to ~/.cve-mcp/cache.db AUDIT_LOG_PATH= # defaults to ~/.cve-mcp/audit.log REQUEST_TIMEOUT=30 # HTTP timeout in seconds MAX_RETRIES=3 # retries on transient errors

macOS:~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%\Claude\claude_desktop_config.json

{ "mcpServers": { "cve-mcp": { "command": "python", "args": ["-m", "cve_mcp.server"], "cwd": "/absolute/path/to/cve-mcp-server", "env": { "NVD_API_KEY": "your-key-here", "GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx", "ABUSEIPDB_KEY": "your-abuseipdb-key", "GREYNOISE_API_KEY": "your-greynoise-key", "SHODAN_KEY": "your-shodan-key" } } } }

⚠️Important:Always useabsolute paths. Fully quit Claude Desktop (Cmd+Q / Alt+F4) after changing the config — reloading is not enough.

# Basic setup claude mcp add cve-mcp -- python -m cve_mcp.server # With environment variables (repeat -e for each key) claude mcp add cve-mcp -e NVD_API_KEY=your_key -e VULNCHECK_TOKEN=your_token -- python -m cve_mcp.server # Or just run from the project directory — python-dotenv auto-loads .env on startup # Verify it's connected claude mcp list
git clone https://github.com/mukul975/cve-mcp-server.git cd cve-mcp-server python -m venv venv && source venv/bin/activate pip install -e .

No.envfile needed. Add the server to Claude Desktop or Claude Code and try:

"What is CVE-2021-44228? Is it actively exploited?"

Claude will uselookup_cve(NVD),get_epss_score(EPSS), andcheck_kev(CISA KEV) — all free, no keys required.

"Scan these Python packages for vulnerabilities: requests 2.28.0, flask 2.2.0, django 3.2.0"

Step 3: Add your first key for 10× performance

echo 'NVD_API_KEY=your-key-here' > .env

Request a free NVD key atnvd.nist.gov— instant via email, increases rate limit from5 to 50 requests per 30 seconds.

Once you've added Tier 1 and Tier 2 keys:

"Calculate the risk score for CVE-2024-3400 and tell me if we should patch immediately."

Scenario 1: "Should we patch Log4Shell immediately?"

You:Analyze if CVE-2021-44228 (Log4Shell) needs immediate patching. Give me the risk score and your recommendation.

Claude orchestrates multiple tools behind the scenes:

→ lookup_cve("CVE-2021-44228") CVSS 3.1: 10.0 (CRITICAL) | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H → get_epss_score("CVE-2021-44228") EPSS: 0.97531 (97.5%) | Percentile: 99.99% → check_kev("CVE-2021-44228") ✅ IN CISA KEV — Added 2021-12-10 | Known ransomware use: Yes → check_poc_exists("CVE-2021-44228") ✅ WEAPONIZED — 300+ public PoC repositories found → calculate_risk_score("CVE-2021-44228") Risk Score: 97/100 (CRITICAL) | Urgency: PATCH IMMEDIATELY

Claude's response:"CVE-2021-44228 scores97/100 (CRITICAL). Remote code execution in Apache Log4j, CVSS 10.0, 97.5% EPSS probability, confirmed active exploitation in CISA KEV including ransomware campaigns, 300+ public exploits.Patch immediately."

Scenario 2: "Scan my Python requirements.txt"

You:Scan these dependencies: requests==2.28.0, flask==2.2.0, django==3.2.0, pillow==9.0.0, cryptography==37.0.0

→ scan_dependencies(ecosystem="PyPI", packages={...}) Found 12 vulnerabilities across 4 packages

Claude's response:"Found12 vulnerabilitiesacross your packages.Immediate action:Django 3.2.0 (3 critical CVEs including SQL injection), Pillow 9.0.0 (heap overflow), cryptography 37.0.0 (OpenSSL chain). Upgrade to: django>=4.2.16, pillow>=10.3.0, cryptography>=42.0.0."

Scenario 3: "Investigate a suspicious IP"

You:Investigate suspicious IP 185.220.101.34 — is it malicious?

→ check_ip_reputation("185.220.101.34") AbuseIPDB Confidence: 100% | Reports: 4,832 | ISP: Tor Exit Node → check_ip_noise("185.220.101.34") GreyNoise: MALICIOUS | Tags: [Tor Exit Node, Web Scanner] CVEs targeted: CVE-2024-3400, CVE-2023-46805 → shodan_host_lookup("185.220.101.34") Open ports: 22, 80, 443, 9001 | OS: Linux

Claude's response:"185.220.101.34 is a known Tor exit noderated 100% malicious by AbuseIPDB with 4,832 abuse reports. GreyNoise confirms active scanning for CVE-2024-3400 (Palo Alto) and CVE-2023-46805 (Ivanti).Recommendation: Block at firewall."

Scenario 4: "Generate an executive security report"

You:Generate an executive security report for: CVE-2024-3400, CVE-2023-44487, CVE-2023-4966, CVE-2024-21887

→ compare_cves([...]) Compiles: NVD, EPSS, KEV, PoC availability, MITRE ATT&CK mapping Generates: Ranked risk table, remediation timeline, executive summary

Thecalculate_risk_scoretool produces acomposite risk score from 0 to 100by weighting four independent signals.

Risk Score = (CVSS × 0.20) + (EPSS × 0.35) + (KEV × 0.30) + (PoC × 0.15)

- KEV + active PoC→ ×1.15
- CVSS ≥ 9.0 + EPSS > 0.7→ ×1.10
- Published < 7 days ago→ ×1.05

The numeric scorer isscoring_version1.0(surfaced intriage_cve,calculate_risk_score, andhealth_check). The linear weighted sum above is the v1 default for thenumericscore, with one hard override:

- CISA KEV hard override:a KEV-listed CVE is confirmed exploited in the wild, the single strongest exploitation signal. Its label can never be lower thanCRITICALand its score is clamped to≥ 76, regardless of CVSS/EPSS. (A KEV CVE with a low CVSS and low EPSS still returns CRITICAL / 76.)
- CVSS is treated as aseveritysignal, not an exploitation-likelihood signal (per Allodi & Massacci 2014); EPSS and KEV carry the exploitation signal.
- An experimentalSSVC v2gated decision (CISA Deployer model →Act/Attend/Track*/Track) is available viatriage_cve(depth="deep")as a qualitative, explainable alternative to the 0–100 number.

EPSS gets the highest weight (35%)because it's the single best predictor of actual exploitation — far better than CVSS alone. A CVSS 10.0 with EPSS 0.01 is theoretically dangerous but practically unlikely.KEV at 30%is ground truth: confirmed exploitation, not a prediction.CVSS at 20%captures severity context for new CVEs with insufficient EPSS data.PoC at 15%reflects that public exploits dramatically accelerate real-world attacks.

- triage_cveorchestrator— one tool call that fans out NVD + EPSS + CISA KEV (+ public PoC discovery fordepth != "quick") concurrently, computes the composite risk score, and returns a clean report.depthisquick/standard(default) /deep;deepadditionally emits the SSVC v2 gated decision.
- New upstream sources— VulnCheck NVD++ (a transparent NVD fallback used automatically insidetriage_cvewhen NIST NVD is unreachable/throttled), CIRCL hashlookup, and the HIBP Pwned Passwords range API.
- KEV hard-override scoring+scoring_version— KEV-listed CVEs are always CRITICAL (score ≥ 76); the scoring version is reported intriage_cveandhealth_check.
- HTTP transport— setMCP_TRANSPORT=httpto serve streamable-HTTP onHOST:PORT(default0.0.0.0:8000, stateless) instead of stdio. Ships with aDockerfile.
- Resources & prompts— resourceskev://catalog,epss://scores/{cve_id}, andmanifest://tool-hash(SHA-256 over the registered tool surface); promptspatch_decision,compare_and_prioritize, anddependency_triage.
- Security posture— the server never registers a sampling handler / never issuessampling/createMessage(Unit 42 MCP-sampling attack vector); new outbound paths are scheme/host-allowlisted.

# Run the full test suite pytest tests/ -v # Run specific test files pytest tests/test_validators.py tests/test_risk_scorer.py -v # Run with coverage pytest tests/ -v --cov=src/cve_mcp --cov-report=term-missing
npx @modelcontextprotocol/inspector python -m cve_mcp.server

Opens athttp://localhost:6274— interactively test each tool, view input schemas, and inspect response formats.

- Unit tests:Risk score calculation, CVSS vector parsing, input validation
- Integration tests:Tool registration, parameter validation, error handling for missing keys
- Cache tests:SQLite cache writes, TTL expiration, cache hit/miss
- Security tests:Private IP blocking, XML bomb protection (defusedxml), input sanitization

src/cve_mcp/ ├── server.py # FastMCP server — all 27 @mcp.tool() definitions ├── config.py # Environment config and API base URLs ├── models.py # Pydantic models (CVERecord, KEVEntry, EPSSScore, ...) ├── audit.py # Rotating audit log (50MB, 5 backups) ├── api/ │ ├── nvd_client.py # NVD REST API v2.0 │ ├── osv_client.py # OSV.dev package vulnerability API │ ├── epss_client.py # FIRST EPSS API │ ├── kev_client.py # CISA KEV catalog │ ├── ip_intel.py # AbuseIPDB + GreyNoise │ ├── domain_intel.py # crt.sh + CIRCL passive DNS │ ├── shodan_client.py # Shodan host intelligence │ ├── hash_intel.py # MalwareBazaar + VirusTotal │ ├── url_safety.py # URLScan.io │ ├── malware_intel.py # ThreatFox IOC lookup │ ├── ransomware_intel.py# Ransomwhere Bitcoin address lookup │ ├── exploit_intel.py # GitHub PoC/exploit search │ ├── vendor_advisory.py # MSRC + Red Hat + Ubuntu advisories │ ├── attack_mapping.py # MITRE ATT&CK STIX mapping │ ├── cve_timeline.py # CVE event timeline builder │ ├── dependency_scan.py # OSV-based dependency scanning │ ├── poc_checker.py # GitHub + Exploit-DB + Nuclei PoC search │ ├── report_generator.py# Vuln report + CVE comparison matrix │ └── rate_limiter.py # Token bucket rate limiter for NVD ├── cache/ │ └── sqlite_cache.py # Async SQLite cache with per-key TTL └── utils/ ├── validators.py # CVE ID normalization, IP/hash validation └── risk_scorer.py # Composite risk score computation

Every tool invocation is logged to~/.cve-mcp/audit.log:

{ "timestamp": "2026-04-14T10:23:45.123Z", "tool": "lookup_cve", "parameters": {"cve_id": "CVE-2024-3400"}, "duration_ms": 342, "cache_hit": false, "status": "ok" }

API keys and response payloads arenever written to audit logs.

- Outbound HTTPS only— no inbound ports opened, no telemetry
- CVE IDs, IPs, hashes, domains, and package names are sent to respective APIs for lookup
- API responses are cached locally in SQLite — cached data stays on your machine

All network intelligence tools block private and reserved IP ranges before any external API call:

- 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16(RFC 1918)
- 127.0.0.0/8(loopback),169.254.0.0/16(link-local)
- ::1,fc00::/7(IPv6 private)

- Keys loaded from environment variables only — never hardcoded
- .envis gitignored
- Keys never logged, cached, or included in audit entries

defusedxmlis used for all XML parsing to prevent XML bomb attacks (billion laughs, XXE injection).

# Ensure virtual environment is activated and package is installed pip install -e . python --version # must be 3.10+

Claude Desktop doesn't show the hammer icon (🔨)

- Check for JSON syntax errors (no trailing commas) in your config
- Useabsolute paths— relative paths silently fail
- Fully quit Claude Desktop (Cmd+Q / Alt+F4) and restart

# Add your free NVD API key to .env NVD_API_KEY=your-key-here # https://nvd.nist.gov/developers/request-an-api-key

The server queues excess requests automatically, but with a key you get 10× throughput.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.