The CVE MCP Server provides conversational access to a local, refreshable CVE database through three main tools:
Get CVE Details - Retrieve comprehensive information about specific CVEs by ID (e.g., CVE-2024-0001), including severity, CVSS score, description, published/modified dates, and references
Search CVEs - Perform keyword searches across CVE descriptions with configurable result limits (default 10, maximum 50 results)
Get Database Statistics - Query database metrics including total CVE count, date range of stored CVEs, and last update timestamp
Key Features:
Fully Local & Private - All data stored locally with no external dependencies during queries
Refreshable Data - Load CVE data from official GitHub sources (CVEProject/cvelistV5) via quick limited loads or full dataset (~240K CVEs)
Flexible Deployment - Run in Docker containers for easy setup or locally via Python virtual environments
Fast Performance - Optimized loader processes 2,700+ CVEs/second, creating a ~190 MB database
MCP Protocol Compatible - Works with any MCP-compatible client including MCP Inspector and AI assistants
Testing & Development - Includes automated test scripts, unit tests, and comprehensive troubleshooting guides
Fetches and updates CVE (Common Vulnerabilities and Exposures) data from the GitHub CVEProject/cvelistV5 repository, enabling access to vulnerability information through natural language queries against a local database.
Click on "Install 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., "@CVE MCP Servershow me details for CVE-2024-12345"
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.
CVE MCP Server (Prototype)
A local, containerized Model Context Protocol (MCP) server that provides conversational access to a CVE (Common Vulnerabilities and Exposures) database.
PROTOTYPE: This is a project demonstrating MCP server implementation. It is functional but not production-ready.
Overview
This project enables natural-language queries against a local CVE database using any MCP-compatible client. All data is stored locally for privacy and can be refreshed from public CVE sources.
Features
Fully local - all data on your machine, stdio transport only
Refreshable CVE data from GitHub database
Runs in Docker
Works with MCP Inspector and other MCP clients
Three tools:
get_cve_details,search_cves,get_statistics
Prerequisites
Docker (with
docker composesupport)Python 3.11+ (for local development)
Node.js 18+ (for MCP Inspector)
Installation
New to this project? See
Python Dependencies
Project uses pyproject.toml for configuration.
Configuration (optional)
Create a .env file to customize paths:
Works fine without any configuration.
Quick Start with Run Scripts (Recommended)
Convenient shell scripts automate the testing workflow:
Docker Testing (Full Workflow)
Local Testing (Full Workflow)
Available Run Scripts
Script | Purpose | Usage |
| Load small dataset via API |
|
| Load full/filtered dataset via Git |
|
| Build and start Docker container |
|
| Launch MCP Inspector for testing |
|
Quick Start with Docker (Manual)
For detailed, tested step-by-step instructions, see
1. Clone the Repository
2. Build Docker Image
Note: If you get "permission denied", either use sudo with all docker commands, or add your user to the docker group:
3. Start Container
Verify it's running:
4. Load CVE Data
This downloads ~100 recent CVEs from GitHub (takes 1-2 minutes).
5. Test with MCP Inspector
Inspector configuration (if using sudo):
Command:
sudoArguments:
docker exec -i cve-mcp-server python -m src.mcp_serverEnvironment:
PYTHONPATH=/app
Inspector configuration (if in docker group):
Command:
dockerArguments:
exec -i cve-mcp-server python -m src.mcp_serverEnvironment:
PYTHONPATH=/app
Note: If connection fails, restart MCP Inspector and try again.
Local Development (Without Docker)
1. Setup Python Environment
2. Load CVE Data
3. Run MCP Server
The server will wait for MCP client connections via stdio.
4. Test Locally with MCP Inspector
In a new terminal:
Configuration:
Command:
pythonArguments:
-m src.mcp_serverEnvironment:
PYTHONPATH=/path/to/cve-mcp-server
5. Run Unit Tests
Available Tools
get_cve_details
Get detailed information about a specific CVE.
Parameters:
cve_id(string): CVE identifier like "CVE-2024-0001"
Example:
Response:
search_cves
Search CVEs by keyword.
Parameters:
keyword(string): Search termlimit(integer): Max results, default 10
Example response:
get_statistics
Get database stats.
No parameters.
Data Management
Using Run Scripts (Recommended)
Local development:
Docker:
Manual Commands
Load More CVE Data (Local):
Load More CVE Data (Docker):
Performance & Benchmarks
Based on systematic benchmarking:
Full dataset load time: ~6-7 minutes (240,000 CVEs)
Database size: ~190 MB
Loading speed: 2,700+ CVEs/second (using optimized loader)
Load Full Dataset
See benchmarks/BENCHMARK_RESULTS.md for detailed analysis.
Check Database Status
Project Structure
Technologies Used
Python 3.11: Core language
MCP SDK: Model Context Protocol implementation
SQLite: Local database with full-text search capability
Docker: Containerization and deployment
GitHub CVE Database: Data source (CVEProject/cvelistV5)
pyproject.toml: Modern Python project configuration (PEP 621)
Testing
Quick Testing with Run Script (Recommended)
Use the convenient testing script that handles both local and Docker deployments:
The script will:
Ask if you want to test Local or Docker deployment
Validate prerequisites (virtual environment, container running, database exists)
Display the correct MCP Inspector configuration
Launch MCP Inspector automatically
Manual Testing with MCP Inspector
MCP Inspector provides an interactive UI to test all tools:
Start the server (Docker or local)
Run
npx @modelcontextprotocol/inspectorConfigure connection (see Quick Start sections above)
Test each tool with various inputs
For detailed testing procedures, see TESTING.md.
Unit Testing
Troubleshooting
Docker Issues
Container won't start:
No CVE data loaded:
Rebuild after code changes:
MCP Inspector Connection Issues
Connection fails with "unknown shorthand flag" error:
Restart MCP Inspector completely (Ctrl+C and rerun
npx @modelcontextprotocol/inspector)If using
sudofor docker, set Command tosudoand Arguments todocker exec -i cve-mcp-server python -m src.mcp_serverIf in docker group, set Command to
dockerand Arguments toexec -i cve-mcp-server python -m src.mcp_server
Connection fails:
Verify container is running:
sudo docker psCheck exact command:
sudo docker exec -i cve-mcp-server python -m src.mcp_serverEnsure container name matches:
cve-mcp-serverEnsure PYTHONPATH environment variable is set to
/app
Tools not appearing:
Check server logs for import errors
Verify PYTHONPATH is set correctly in Inspector environment variables
Local Development Issues
Import errors:
Ensure virtual environment is activated
Check PYTHONPATH includes project root
Verify all dependencies installed:
pip install -r requirements.txt
Database not found:
Check
data/cve.dbexistsRun data loader:
python -m src.data_ingestion.loader
Limitations
Local only (stdio transport)
Basic keyword search, no FTS5 yet
Manual data refresh
No auth/security (local use only)
TODO
Things that would be nice to add:
SSE transport for network access
SQLite FTS5 for better search
Filter by CVSS score/severity/date ranges
Automated data refresh (cron job?)
Example UI with Streamlit or something
Maybe a REST API wrapper
CVE monitoring/alerts
Export to PDF/CSV
Stats dashboard
Contributing
Prototype project. PRs welcome for bug fixes, docs, or features from TODO list.
License
MIT - see LICENSE file
Credits
CVE data from CVEProject/cvelistV5
Built with Anthropic MCP SDK
Note: This is a prototype. For production use you'd want proper security, auth, error handling, etc.