NVD (National Vulnerability Database) logo

NVD (National Vulnerability Database)

Community
marcoeg

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

Publishermarcoeg
Repositorymcp-nvd
LanguagePython
Forks
11
Stars
14
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    NVD (National Vulnerability Database) exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    14 stars and 11 forks from the linked repository.

NVD Database MCP Server

PyPI - Version

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:

json
{
  "mcpServers": {
    "mcp-nvd": {
      "command": "/path/to/uvx",
      "args": ["mcp-nvd"],
      "env": {
        "NVD_API_KEY": "your-api-key"
      }
    }
  }
}
  1. 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.

  2. Restart Claude Desktop to apply the changes.

Development

Setup

  1. Prerequisites:

  2. Clone the Repository:

bash
git clone https://github.com/marcoeg/mcp-nvd
cd mcp-nvd
  1. 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.
  2. Install Dependencies:

bash
uv sync
uv pip install -e .

Run with the MCP Inspector

bash
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:

bash
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:

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

Test search_cve (default 10 results):

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

Test search_cve (exact match, 5 results):

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

Docker Setup

Build

bash
docker build -t mcp-nvd:latest .

Run

With .env:

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

With env var:

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

Custom port:

bash
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>
# Expect: INFO: Uvicorn running on http://0.0.0.0:9090

Test:

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

Notes

  • Ensure .env has NVD_API_KEY=your-key or use -e.
  • Default port: 9090.

Here’s the summary formatted as Markdown comments within a code block, suitable for inclusion in a file like docker-compose.yaml or README.md:

Using Docker Compose for Testing

This docker-compose.yaml, located in the tests/ directory, defines a service for testing the MCP-NVD server using a pre-built Docker image. It’s designed for a testing use case, similar to a standalone service like clickhouse, and assumes the image is built beforehand rather than rebuilt each time.

Assumptions

  • Pre-built Image: The service uses a pre-built image tagged as mcp-nvd:test, available locally or in a registry. The image is based on the Dockerfile in the parent directory, which sets up the MCP-NVD server with uv and runs it in SSE mode on port 9090.

How to Build the Image

To create the mcp-nvd:test image:

  1. Navigate to the project root:
    bash
    cd ./mcp-nvd
  2. Build the image using the Dockerfile:
    bash
    docker build -t mcp-nvd:test .
    • This builds the image with all dependencies from pyproject.toml and the mcp_nvd/ module, setting the default command to run the server.

Running the Service

From the tests/ directory:

bash
cd tests
docker-compose up
  • Access: The server runs at http://localhost:9090.
  • Stop: docker-compose down.
  • Environment: Ensure NVD_API_KEY is in ../.env or use docker-compose --env-file ../.env up.

Running test_tools.py in the Docker Compose Scenario

To run the unit tests (test_tools.py) within the Docker environment:

  1. Start the Service: Ensure the mcp-nvd service is running via docker-compose up.
  2. Exec into the Container:
    • Identify the container name (e.g., mcp-nvd-mcp-nvd-1) with:
      bash
      docker ps
    • Run the tests inside the container:
      bash
      docker exec -it mcp-nvd-mcp-nvd-1 python /app/tests/test_tools.py
    • Note: Assumes test_tools.py is copied into the image at /app/tests/. If not, modify the Dockerfile to include:
      dockerfile
      COPY tests/ ./tests/
      Then rebuild the image with docker build -t mcp-nvd:test . from the root.
  3. Alternative: Run tests locally against the containerized service:
    bash
    cd tests
    python test_tools.py
    • This tests against http://localhost:9090 while the service runs.

Key Details

  • Port: 9090 is exposed for SSE access.
  • Logs: Stored in a log-data volume (optional).
  • Image: Must be built once and tagged as mcp-nvd:test before running docker-compose.

Credits to @sidharthrajaram for its working pattern for SSE-based MCP clients and servers: https://github.com/sidharthrajaram/mcp-sse

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use NVD (National Vulnerability Database) MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once NVD (National Vulnerability Database) is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add NVD (National Vulnerability Database) as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the NVD (National Vulnerability Database) MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "nvd-national-vulnerability-database": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-nvd"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the NVD (National Vulnerability Database) MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the NVD (National Vulnerability Database) MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use NVD (National Vulnerability Database) to help me with this task?
NVD (National Vulnerability Database)
Sure. I read it.
Here is what I found using NVD (National Vulnerability Database).

Frequently asked questions

What is the NVD (National Vulnerability Database) MCP server used for?

NVD (National Vulnerability Database) is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use NVD (National Vulnerability Database) MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use NVD (National Vulnerability Database) with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use NVD (National Vulnerability Database) MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With NVD (National Vulnerability Database) connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect NVD (National Vulnerability Database) MCP to TypingMind?

NVD (National Vulnerability Database) runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does NVD (National Vulnerability Database) MCP provide in TypingMind?

NVD (National Vulnerability Database) exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use NVD (National Vulnerability Database) MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If NVD (National Vulnerability Database) requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇