NVD Database MCP Server

by marcoeg

250 downloads
Not rated
GitHub

About

An MCP server to query the NIST National Vulnerability Database (NVD)

Details

Author
marcoeg
Downloads
250
Categories
Database

- Query specific CVEs by ID with detailed vulnerability data
- Search the NVD database by keyword with customizable results
- Supports both stdio and SSE transport modes
- Compatible with MCP-compliant clients like Claude Desktop
- Offers concise output option for shorter CVE records
- Docker support for containerized deployment

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name NVD Database MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the server in the Claude Desktop config file by providing the path to uvx, the mcp-nvd argument, and your NVD API key as an environment variable. Then use the get_cve tool to retrieve a CVE by ID and the search_cve tool to search by keyword with optional parameters.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "nvd database mcp server": {
            "mcp-nvd": {
                "command": "/path/to/uvx",
                "args": [
                    "mcp-nvd"
                ],
                "env": {
                    "NVD_API_KEY": "your-api-key"
                }
            }
        }
    }
}

McpServers

{
    "mcp-nvd": {
        "command": "/path/to/uvx",
        "args": [
            "mcp-nvd"
        ],
        "env": {
            "NVD_API_KEY": "your-api-key"
        }
    }
}

NVD Database MCP Server

PyPI - Version

<a href="https://glama.ai/mcp/servers/@marcoeg/mcp-nvd">

</a>

A Model Context Protocol server implementation to query the NIST National Vulnerability Database (NVD) via its API. https://nvd.nist.gov/

As a prerequisite an NVD API key is required. (Request here).

Status

Works with Claude Desktop app and other MCP compliant hosts and clients using both the stdio and sse transports.

Features

- Query specific CVEs by ID with detailed vulnerability data. - Search the NVD database by keyword with customizable result options. - Supports Server-Sent Events (SSE) transport for real-time communication. - Compatible with MCP-compliant clients like Claude Desktop.

Tools

The server implements the following tools to query the NVD Database:

- get_cve:
- Description: Retrieves a CVE record by its ID.
- Parameters:
- cve_id (str): The CVE ID (e.g., CVE-2019-1010218).
- concise (bool, default False): If True, returns a shorter format.
- Returns: Detailed CVE info including scores, weaknesses, and references.

- search_cve:
- Description: Searches the NVD database by keyword.
- Parameters:
- keyword (str): Search term (e.g., Red Hat).
- exact_match (bool, default False): If True, requires an exact phrase match.
- concise (bool, default False): If True, returns shorter CVE records.
- results (int, default 10): Maximum number of CVE records (1-2000).
- Returns: List of matching CVEs with total count.

Configuration

1. Create or edit the Claude Desktop configuration file located at:
- On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows: %APPDATA%/Claude/claude_desktop_config.json

2. Add the following:

{
  "mcpServers": {
    "mcp-nvd": {
      "command": "/path/to/uvx",
      "args": ["mcp-nvd"],
      "env": {
        "NVD_API_KEY": "your-api-key"
      }
    }
  }
}

3. Replace /path/to/uvx with the absolute path to the uvx executable. Find the path with which uvx command in a terminal. This ensures that the correct version of uvx is used when starting the server.

4. Restart Claude Desktop to apply the changes.

Development

Setup

1. Prerequisites:
- Python 3.10 or higher.
- An NVD API key (request here).
- uv package manager (installation).

2. Clone the Repository:

git clone https://github.com/marcoeg/mcp-nvd
cd mcp-nvd

3. Set Environment Variables:
- Create a .env file in the project root:

     NVD_API_KEY=your-api-key

- Replace your-api-key with your NVD API key.

4. Install Dependencies:

uv sync
uv pip install -e .

Run with the MCP Inspector

cd /path/to/the/repo
source .env

npx @modelcontextprotocol/inspector uv \
--directory /path/to/repo/mcp-nvd run mcp-nvd

Then open the browser to the URL indicated by the MCP Inspector, typically http://localhost:8077?proxyPort=8078

> Switch freely between stdio and sse transport types in the inspector.

Testing with the SSE Client

Run the Server:

cd /path/to/the/repo
source .env

uv run mcp-nvd --transport sse --port 9090


- Runs with SSE transport on port 9090 by default.

Run the Client:

Test get_cve:
uv run client.py http://localhost:9090/sse CVE-2019-1010218

Test search_cve (default 10 results):

uv run client.py http://localhost:9090/sse "search:Red Hat"

Test search_cve (exact match, 5 results):

uv run client.py http://localhost:9090/sse "search:Microsoft Windows:exact:5"

Docker Setup

Build

docker build -t mcp-nvd:latest .

Run

With .env:
docker run -d -p 9090:9090 -v /path/to/.env:/app/.env mcp-nvd:latest

With env var:

docker run -d -p 9090:9090 -e NVD_API_KEY="your-key" mcp-nvd:latest

Custom port:

docker run -d -p 8080:8080 -v /path/to/.env:/app/.env mcp-nvd:latest uv run mcp-nvd --transport sse --port 8080 --host 0.0.0.0

Verify

```bash docker logs <container_id>
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.