NVD (National Vulnerability Database) MCP server

Provides access to the NIST National Vulnerability Database through get_cve and search_cve tools for retrieving and searching CVE records with customizable result options.
Back to servers
Provider
Marco Graziano
Release date
Mar 24, 2025
Language
Python
Package
Stats
676 downloads
3 stars

The NVD Database MCP Server provides a Model Context Protocol implementation that allows you to query the NIST National Vulnerability Database (NVD) via its API. This server works with Claude Desktop app and other MCP compliant hosts and clients using both stdio and SSE transports. You'll need an NVD API key to use this server.

Installation

Prerequisites

Installing from PyPI

pip install mcp-nvd

Or using uv:

uv pip install mcp-nvd

Configuration

To use the MCP server with Claude Desktop:

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the following configuration:

{
  "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 your uvx executable (find it using which uvx in terminal)
  2. Replace your-api-key with your actual NVD API key
  3. Restart Claude Desktop to apply the changes

Usage

The MCP-NVD server provides two main tools to query the NVD database:

Get a Specific CVE by ID

Use the get_cve tool to retrieve detailed information about a specific CVE:

  • Parameters:
    • cve_id: The CVE identifier (e.g., CVE-2019-1010218)
    • concise: Set to True for a shorter format (default: False)

Search CVEs by Keyword

Use the search_cve tool to search for vulnerabilities:

  • Parameters:
    • keyword: Search term (e.g., Red Hat)
    • exact_match: Set to True to require exact phrase match (default: False)
    • concise: Set to True for shorter records (default: False)
    • results: Maximum number of CVE records to return (default: 10, range: 1-2000)

Running as a Standalone Server

You can run the MCP-NVD server directly with SSE transport:

  1. Set your NVD API key as an environment variable:
export NVD_API_KEY="your-api-key"
  1. Start the server:
uvx mcp-nvd --transport sse --port 9090
  1. Test the server using the provided client:
# Get a specific CVE
uvx client.py http://localhost:9090/sse CVE-2019-1010218

# Search for CVEs (default 10 results)
uvx client.py http://localhost:9090/sse "search:Red Hat"

# Search with exact match, limiting to 5 results
uvx client.py http://localhost:9090/sse "search:Microsoft Windows:exact:5"

Using with Docker

Running with Docker

# Run with environment variable
docker run -d -p 9090:9090 -e NVD_API_KEY="your-key" mcp-nvd:latest

# Run with .env file
docker run -d -p 9090:9090 -v /path/to/.env:/app/.env mcp-nvd:latest

# Run with custom port
docker run -d -p 8080:8080 -e NVD_API_KEY="your-key" mcp-nvd:latest uv run mcp-nvd --transport sse --port 8080 --host 0.0.0.0

Verify the Server

# Check server logs
docker logs <container_id>

# Test with a sample request
uvx client.py http://localhost:9090/sse CVE-2019-1010218

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later