Skip to main content

Introduction

This folder contains the source code for running VDB as a Model Context Protocol (MCP) server. Below you can find the configuration for running the VDB MCP server with Claude Desktop. Please feel free to share the configuration for other clients via pull requests.

What is available

The MCP server provides:

  • Structured JSON tool results with summaries and machine-readable evidence.
  • Bulk search tools for package lists and CycloneDX BOMs.
  • Filter-aware search for severity thresholds, sources (osv, nvd, github, aqua), date ranges, malware-only / exclude-malware, package scope (app_only, os_only), package ecosystem, and pagination.
  • Metadata and full-text search over aliases, references, package names, descriptions, and affected functions/modules.
  • Resource templates such as cve://{id} and purl://{purl}.
  • Concrete resources such as vdb://metadata, vdb://health, vdb://sources, and vdb://malware/latest.
  • A db_refresh tool that fetches or refreshes local data through the same staged, validated, atomically-swapped path as vdb db refresh{"target": "full"} (optionally app_only or an image URL override), {"target": "shards", "shards": ["npm", "pypi"]}, or {"target": "sync"} (the default: refresh everything already local). Every result carries the post-refresh health report.
  • Richer prompts for package-risk assessment, CVE triage, SBOM summaries, fix prioritization, version-match explanations, and overlay review.

VDB 7 shard stores, coverage, and health

VDB 7 data can be a full database under VDB_HOME or a set of type shards (see the root README type-shard section). The server is honest about which one it has:

  • Every tool payload carries a status: ok, coverage_gap (some requested purl types have no local shard — those results were NOT checked), or stale_data (a shard lags its siblings by more than shard_store.STALE_SHARD_LAG_DAYS days). Shard-mode payloads also carry a coverage object with uncovered_types, shard_build_ids, and stale_shards; batch and BOM results mark affected packages with a per-package coverage_gap flag.
  • An empty or unusable database is a tool error, never an empty result list that reads as "no vulnerabilities found".
  • vdb://health reports status (ok | degraded | error | empty), the main-DB state, and the full per-shard store report (build ids, ages, staleness, missing group shards) — the same computation vdb db status uses. Use it to tell "I have no deb data" from "my deb data is three weeks old" from "I am fully current".
  • When the database is missing or older than VDB_AGE_DAYS at startup, the server refreshes it with db_refresh target=full --app-only semantics (downloaded to a staging directory, validated as a usable v7 artifact, then atomically swapped in — a failed or interrupted download never damages the existing database). A failed refresh is a visible warning and the server continues with whatever local data it has.

Pre-requisites

  • Python >= 3.10 installed
  • docker or Rancher Desktop (or)
  • uv installed

docker-based execution (Recommended)

Use our container image ghcr.io/appthreat/mcp-server-vdb:master.

Claude Desktop configuration

Edit the file using VS code or any editor of your choice. ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, the config file is $env:AppData\Claude\claude_desktop_config.json. Use the below configuration:

{
  "mcpServers": {
    "vdb": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VDB_HOME=/db",
        "-v",
        "$HOME/vdb:/db:rw",
        "ghcr.io/appthreat/mcp-server-vdb:master"
      ]
    }
  }
}

nerdctl example.

{
  "mcpServers": {
    "vdb": {
      "command": "nerdctl",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "VDB_HOME=/db",
        "-v",
        "$HOME/vdb:/db:rw",
        "ghcr.io/appthreat/mcp-server-vdb:master"
      ]
    }
  }
}

Restart the Claude Desktop application.

If you get ENOENT error, specify the full path to docker. On a mac, /Applications/Docker.app/Contents/Resources/bin/docker.

Local uv-based execution (Developers only)

git clone https://github.com/AppThreat/vulnerability-db.git
cd vulnerability-db
python -m pip install .

export VDB_HOME=$HOME/vdb
mkdir -p $VDB_HOME
vdb db refresh full --app-only
uv --directory packages/mcp-server-vdb run mcp-server-vdb

Claude Desktop configuration

Edit the file using VS code or any editor of your choice. ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, the config file is $env:AppData\Claude\claude_desktop_config.json.

Use the below configuration and adjust the following paths:

  • absolute path to the mcp-server-vdb package inside the packages directory.
  • VDB_HOME - Full path to the directory containing the vulnerability database. Must have run vdb db refresh full --app-only
{
  "mcpServers": {
    "vdb": {
      "command": "uv",
      "args": [
        "--directory",
        "/Volumes/Work/AppThreat/vulnerability-db/packages/mcp-server-vdb",
        "run",
        "mcp-server-vdb"
      ],
      "env": {
        "VDB_HOME": "/Users/guest/vdb"
      }
    }
  }
}

Restart the Claude Desktop application.

Environment variables

The MCP server uses the same vdb configuration as the CLI. See the root README environment variables for the full reference. The most common MCP settings are:

Variable Default Description
VDB_HOME Platform user data directory for vdb Directory containing data.vdb7, data.index.vdb7, and vdb.meta. Set this explicitly for Docker volume mounts and local Claude Desktop configurations.
VDB_SHARDS_DIR $VDB_HOME/shards Type-shard store directory. Searches fan out across shards when the main DB under VDB_HOME is a shard (vdb.meta completeness: "partial").
VDB_AGE_DAYS 2 Number of days before the server treats the local database as stale. When stale or missing and ORAS support is installed, the server downloads the app-only database on startup. Use an integer string.
VDB_APP_ONLY_DATABASE_URL ghcr.io/appthreat/vdb7-app-only:v7.0.x-xz OCI image URL used by MCP automatic downloads. Override this for internally published app-only artifacts. Prefer the -xz suffix: it unpacks unconditionally, while -zst needs a zstd decompressor (Python 3.14+ or a zstd binary on PATH).
VDB_SQLITE_IMMUTABLE unset Open existing .vdb7 files with SQLite's immutable URI option in read-only deployments.

If the MCP server needs extended metadata searches such as full-text, alias, reference, package-name, or symbol lookup, v7 publishes no pre-built extended artifacts — pre-populate VDB_HOME with a database built using vdb --cache --include-metadata (or --cache-os --include-metadata), or point VDB_DATABASE_URL/VDB_APP_ONLY_DATABASE_URL at your own internally published metadata artifact.

Screenshots

Claude context screen

Claude context

Claude permissions on first run

Claude permissions

Claude results

Vulnerability description

Latest malware

Latest Malware

Configuration for MCP Inspector

  • Transport Type: STDIO
  • Command: uv
  • Arguments: --directory /absolute/path/to/vulnerability-db/packages/mcp-server-vdb run mcp-server-vdb

Click "Connect"

MCP Inspector

Testing

  1. Click "List Tools". You should see structured tools such as search_by_purl_like, search_full_text, search_packages, search_bom_summary, and search_bom_detailed.
  2. Select search_by_purl_like and enter a purl string such as pkg:swift/vapor/vapor@4.89.0.
  3. Confirm that the tool returns structured JSON content with summary and results.
  4. Try resources such as vdb://metadata, vdb://health, or cve://CVE-2024-25169.

Example common search options

Many tools accept the following optional fields in addition to their main locator:

{
  "severity_threshold": "HIGH",
  "source": ["osv", "github"],
  "exclude_malware": true,
  "package_ecosystem": "pypi",
  "with_data": true,
  "summary_only": false,
  "include_references": true,
  "include_affected_symbols": true,
  "include_remediation": true,
  "include_evidence": true,
  "page": 1,
  "page_size": 25
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_vdb-7.0.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_vdb-7.0.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_vdb-7.0.0.tar.gz.

File metadata

  • Download URL: mcp_server_vdb-7.0.0.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_server_vdb-7.0.0.tar.gz
Algorithm Hash digest
SHA256 8c4dda215640ceb41002e8f32482c90b6db3f5b238185787026271884fdb977d
MD5 d3b91ecb5dabe0b563a25f02b506fd12
BLAKE2b-256 9cdb314f1702a7178a9e4583d6a1b53bac6667f8da7606086cc50236786d2f8a

See more details on using hashes here.

File details

Details for the file mcp_server_vdb-7.0.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_server_vdb-7.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_server_vdb-7.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b8d3ffe92bc18eaa1946c65b66899092df8c6b75d18acf416552e6f6cadb4ed
MD5 15d4bfcb0ef00e2c5c5e63ec6f018857
BLAKE2b-256 19515c9ccd93f6c3c4210577bc95607c35d0e2499082379e2e814c174ef24cc9

See more details on using hashes here.

Release history Release notifications | RSS feed

7.0.1

2 files

This release

7.0.0 This release

2 files

6.7.2

2 files

6.7.1

2 files

6.7.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page