mcp-server-vdb 6.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-server-vdb
3
+ Version: 6.7.0
4
+ Summary: AppThreat Vulnerability Database MCP server
5
+ Author-email: Team AppThreat <cloud@appthreat.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Intended Audience :: System Administrators
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: Free Threading :: 1 - Unstable
18
+ Classifier: Topic :: Security
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: appthreat-vulnerability-db[oras]==6.7.0
23
+ Requires-Dist: mcp[cli]>=1.22.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: black; extra == "dev"
26
+ Requires-Dist: bandit; extra == "dev"
27
+ Requires-Dist: flake8; extra == "dev"
28
+ Requires-Dist: pylint; extra == "dev"
29
+ Requires-Dist: pytest; extra == "dev"
30
+ Requires-Dist: pytest-cov; extra == "dev"
31
+
32
+ # Introduction
33
+
34
+ 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](https://modelcontextprotocol.io/clients) via pull requests.
35
+
36
+ ## What is available
37
+
38
+ The MCP server provides:
39
+
40
+ - Structured JSON tool results with summaries and machine-readable evidence.
41
+ - Bulk search tools for package lists and CycloneDX BOMs.
42
+ - 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.
43
+ - Metadata and full-text search over aliases, references, package names, descriptions, and affected functions/modules.
44
+ - Resource templates such as `cve://{id}` and `purl://{purl}`.
45
+ - Concrete resources such as `vdb://metadata`, `vdb://health`, `vdb://sources`, and `vdb://malware/latest`.
46
+ - Richer prompts for package-risk assessment, CVE triage, SBOM summaries, fix prioritization, version-match explanations, and overlay review.
47
+
48
+ ## Pre-requisites
49
+
50
+ - Python >= 3.10 installed
51
+ - docker or Rancher Desktop (or)
52
+ - uv [installed](https://docs.astral.sh/uv/getting-started/installation/)
53
+
54
+ ## docker-based execution (Recommended)
55
+
56
+ Use our container image `ghcr.io/appthreat/mcp-server-vdb:master`.
57
+
58
+ ### Claude Desktop configuration
59
+
60
+ 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:
61
+
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "vdb": {
66
+ "command": "docker",
67
+ "args": [
68
+ "run",
69
+ "-i",
70
+ "--rm",
71
+ "-e",
72
+ "VDB_HOME=/db",
73
+ "-v",
74
+ "$HOME/vdb:/db:rw",
75
+ "ghcr.io/appthreat/mcp-server-vdb:master"
76
+ ]
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ `nerdctl` example.
83
+
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "vdb": {
88
+ "command": "nerdctl",
89
+ "args": [
90
+ "run",
91
+ "-i",
92
+ "--rm",
93
+ "-e",
94
+ "VDB_HOME=/db",
95
+ "-v",
96
+ "$HOME/vdb:/db:rw",
97
+ "ghcr.io/appthreat/mcp-server-vdb:master"
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ Restart the Claude Desktop application.
105
+
106
+ If you get `ENOENT` error, specify the full path to docker. On a mac, `/Applications/Docker.app/Contents/Resources/bin/docker`.
107
+
108
+ ## Local uv-based execution (Developers only)
109
+
110
+ ```shell
111
+ git clone https://github.com/AppThreat/vulnerability-db.git
112
+ cd vulnerability-db
113
+ python -m pip install .
114
+
115
+ export VDB_HOME=$HOME/vdb
116
+ mkdir -p $VDB_HOME
117
+ vdb --download-image
118
+ uv --directory packages/mcp-server-vdb run mcp-server-vdb
119
+ ```
120
+
121
+ ### Claude Desktop configuration
122
+
123
+ 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`.
124
+
125
+ Use the below configuration and adjust the following paths:
126
+
127
+ - absolute path to the `mcp-server-vdb` package inside the `packages` directory.
128
+ - `VDB_HOME` - Full path to the directory containing the vulnerability database. Must have run `vdb --download-image`
129
+
130
+ ```json
131
+ {
132
+ "mcpServers": {
133
+ "vdb": {
134
+ "command": "uv",
135
+ "args": [
136
+ "--directory",
137
+ "/Volumes/Work/AppThreat/vulnerability-db/packages/mcp-server-vdb",
138
+ "run",
139
+ "mcp-server-vdb"
140
+ ],
141
+ "env": {
142
+ "VDB_HOME": "/Users/guest/vdb"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ Restart the Claude Desktop application.
150
+
151
+ ## Environment variables
152
+
153
+ The MCP server uses the same `vdb` configuration as the CLI. See the root [README environment variables](../../README.md#environment-variables) for the full reference. The most common MCP settings are:
154
+
155
+ | Variable | Default | Description |
156
+ | :------- | :------ | :---------- |
157
+ | `VDB_HOME` | Platform user data directory for `vdb` | Directory containing `data.vdb6`, `data.index.vdb6`, and `vdb.meta`. Set this explicitly for Docker volume mounts and local Claude Desktop configurations. |
158
+ | `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. |
159
+ | `VDB_APP_ONLY_DATABASE_URL` | `ghcr.io/appthreat/vdbxz-app:v6.7.x` | OCI image URL used by MCP automatic downloads. Override this for internally published app-only artifacts. |
160
+ | `VDB_SQLITE_IMMUTABLE` | unset | Open existing `.vdb6` files with SQLite's immutable URI option in read-only deployments. |
161
+
162
+ If the MCP server needs extended metadata searches such as full-text, alias, reference, package-name, or symbol lookup, point `VDB_APP_ONLY_DATABASE_URL` at an app-only extended artifact such as `ghcr.io/appthreat/vdbxz-app-extended:v6.7.x`, use your own mirrored extended image, or pre-populate `VDB_HOME` with a database built using `vdb --cache --include-metadata`.
163
+
164
+ ## Screenshots
165
+
166
+ ### Claude context screen
167
+
168
+ ![Claude context](./docs/claude-context.png)
169
+
170
+ ### Claude permissions on first run
171
+
172
+ ![Claude permissions](./docs/claude-permissions.png)
173
+
174
+ ### Claude results
175
+
176
+ ![Vulnerability description](./docs/vuln-description.png)
177
+
178
+ ### Latest malware
179
+
180
+ ![Latest Malware](./docs/latest-malware.png)
181
+
182
+ ## Configuration for MCP Inspector
183
+
184
+ - Transport Type: STDIO
185
+ - Command: uv
186
+ - Arguments: `--directory /absolute/path/to/vulnerability-db/packages/mcp-server-vdb run mcp-server-vdb`
187
+
188
+ Click "Connect"
189
+
190
+ ![MCP Inspector](./docs/vdb-mcp-inspector.png)
191
+
192
+ ### Testing
193
+
194
+ 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`.
195
+ 2. Select `search_by_purl_like` and enter a purl string such as `pkg:swift/vapor/vapor@4.89.0`.
196
+ 3. Confirm that the tool returns structured JSON content with `summary` and `results`.
197
+ 4. Try resources such as `vdb://metadata`, `vdb://health`, or `cve://CVE-2024-25169`.
198
+
199
+ ## Example common search options
200
+
201
+ Many tools accept the following optional fields in addition to their main locator:
202
+
203
+ ```json
204
+ {
205
+ "severity_threshold": "HIGH",
206
+ "source": ["osv", "github"],
207
+ "exclude_malware": true,
208
+ "package_ecosystem": "pypi",
209
+ "with_data": true,
210
+ "summary_only": false,
211
+ "include_references": true,
212
+ "include_affected_symbols": true,
213
+ "include_remediation": true,
214
+ "include_evidence": true,
215
+ "page": 1,
216
+ "page_size": 25
217
+ }
218
+ ```
@@ -0,0 +1,187 @@
1
+ # Introduction
2
+
3
+ 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](https://modelcontextprotocol.io/clients) via pull requests.
4
+
5
+ ## What is available
6
+
7
+ The MCP server provides:
8
+
9
+ - Structured JSON tool results with summaries and machine-readable evidence.
10
+ - Bulk search tools for package lists and CycloneDX BOMs.
11
+ - 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.
12
+ - Metadata and full-text search over aliases, references, package names, descriptions, and affected functions/modules.
13
+ - Resource templates such as `cve://{id}` and `purl://{purl}`.
14
+ - Concrete resources such as `vdb://metadata`, `vdb://health`, `vdb://sources`, and `vdb://malware/latest`.
15
+ - Richer prompts for package-risk assessment, CVE triage, SBOM summaries, fix prioritization, version-match explanations, and overlay review.
16
+
17
+ ## Pre-requisites
18
+
19
+ - Python >= 3.10 installed
20
+ - docker or Rancher Desktop (or)
21
+ - uv [installed](https://docs.astral.sh/uv/getting-started/installation/)
22
+
23
+ ## docker-based execution (Recommended)
24
+
25
+ Use our container image `ghcr.io/appthreat/mcp-server-vdb:master`.
26
+
27
+ ### Claude Desktop configuration
28
+
29
+ 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:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "vdb": {
35
+ "command": "docker",
36
+ "args": [
37
+ "run",
38
+ "-i",
39
+ "--rm",
40
+ "-e",
41
+ "VDB_HOME=/db",
42
+ "-v",
43
+ "$HOME/vdb:/db:rw",
44
+ "ghcr.io/appthreat/mcp-server-vdb:master"
45
+ ]
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ `nerdctl` example.
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "vdb": {
57
+ "command": "nerdctl",
58
+ "args": [
59
+ "run",
60
+ "-i",
61
+ "--rm",
62
+ "-e",
63
+ "VDB_HOME=/db",
64
+ "-v",
65
+ "$HOME/vdb:/db:rw",
66
+ "ghcr.io/appthreat/mcp-server-vdb:master"
67
+ ]
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ Restart the Claude Desktop application.
74
+
75
+ If you get `ENOENT` error, specify the full path to docker. On a mac, `/Applications/Docker.app/Contents/Resources/bin/docker`.
76
+
77
+ ## Local uv-based execution (Developers only)
78
+
79
+ ```shell
80
+ git clone https://github.com/AppThreat/vulnerability-db.git
81
+ cd vulnerability-db
82
+ python -m pip install .
83
+
84
+ export VDB_HOME=$HOME/vdb
85
+ mkdir -p $VDB_HOME
86
+ vdb --download-image
87
+ uv --directory packages/mcp-server-vdb run mcp-server-vdb
88
+ ```
89
+
90
+ ### Claude Desktop configuration
91
+
92
+ 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`.
93
+
94
+ Use the below configuration and adjust the following paths:
95
+
96
+ - absolute path to the `mcp-server-vdb` package inside the `packages` directory.
97
+ - `VDB_HOME` - Full path to the directory containing the vulnerability database. Must have run `vdb --download-image`
98
+
99
+ ```json
100
+ {
101
+ "mcpServers": {
102
+ "vdb": {
103
+ "command": "uv",
104
+ "args": [
105
+ "--directory",
106
+ "/Volumes/Work/AppThreat/vulnerability-db/packages/mcp-server-vdb",
107
+ "run",
108
+ "mcp-server-vdb"
109
+ ],
110
+ "env": {
111
+ "VDB_HOME": "/Users/guest/vdb"
112
+ }
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ Restart the Claude Desktop application.
119
+
120
+ ## Environment variables
121
+
122
+ The MCP server uses the same `vdb` configuration as the CLI. See the root [README environment variables](../../README.md#environment-variables) for the full reference. The most common MCP settings are:
123
+
124
+ | Variable | Default | Description |
125
+ | :------- | :------ | :---------- |
126
+ | `VDB_HOME` | Platform user data directory for `vdb` | Directory containing `data.vdb6`, `data.index.vdb6`, and `vdb.meta`. Set this explicitly for Docker volume mounts and local Claude Desktop configurations. |
127
+ | `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. |
128
+ | `VDB_APP_ONLY_DATABASE_URL` | `ghcr.io/appthreat/vdbxz-app:v6.7.x` | OCI image URL used by MCP automatic downloads. Override this for internally published app-only artifacts. |
129
+ | `VDB_SQLITE_IMMUTABLE` | unset | Open existing `.vdb6` files with SQLite's immutable URI option in read-only deployments. |
130
+
131
+ If the MCP server needs extended metadata searches such as full-text, alias, reference, package-name, or symbol lookup, point `VDB_APP_ONLY_DATABASE_URL` at an app-only extended artifact such as `ghcr.io/appthreat/vdbxz-app-extended:v6.7.x`, use your own mirrored extended image, or pre-populate `VDB_HOME` with a database built using `vdb --cache --include-metadata`.
132
+
133
+ ## Screenshots
134
+
135
+ ### Claude context screen
136
+
137
+ ![Claude context](./docs/claude-context.png)
138
+
139
+ ### Claude permissions on first run
140
+
141
+ ![Claude permissions](./docs/claude-permissions.png)
142
+
143
+ ### Claude results
144
+
145
+ ![Vulnerability description](./docs/vuln-description.png)
146
+
147
+ ### Latest malware
148
+
149
+ ![Latest Malware](./docs/latest-malware.png)
150
+
151
+ ## Configuration for MCP Inspector
152
+
153
+ - Transport Type: STDIO
154
+ - Command: uv
155
+ - Arguments: `--directory /absolute/path/to/vulnerability-db/packages/mcp-server-vdb run mcp-server-vdb`
156
+
157
+ Click "Connect"
158
+
159
+ ![MCP Inspector](./docs/vdb-mcp-inspector.png)
160
+
161
+ ### Testing
162
+
163
+ 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`.
164
+ 2. Select `search_by_purl_like` and enter a purl string such as `pkg:swift/vapor/vapor@4.89.0`.
165
+ 3. Confirm that the tool returns structured JSON content with `summary` and `results`.
166
+ 4. Try resources such as `vdb://metadata`, `vdb://health`, or `cve://CVE-2024-25169`.
167
+
168
+ ## Example common search options
169
+
170
+ Many tools accept the following optional fields in addition to their main locator:
171
+
172
+ ```json
173
+ {
174
+ "severity_threshold": "HIGH",
175
+ "source": ["osv", "github"],
176
+ "exclude_malware": true,
177
+ "package_ecosystem": "pypi",
178
+ "with_data": true,
179
+ "summary_only": false,
180
+ "include_references": true,
181
+ "include_affected_symbols": true,
182
+ "include_remediation": true,
183
+ "include_evidence": true,
184
+ "page": 1,
185
+ "page_size": 25
186
+ }
187
+ ```
@@ -0,0 +1,59 @@
1
+ [project]
2
+ name = "mcp-server-vdb"
3
+ version = "6.7.0"
4
+ description = "AppThreat Vulnerability Database MCP server"
5
+ authors = [
6
+ {name = "Team AppThreat", email = "cloud@appthreat.com"},
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ license = {text = "MIT"}
11
+ classifiers = [
12
+ "Development Status :: 5 - Production/Stable",
13
+ "Intended Audience :: Developers",
14
+ "Intended Audience :: System Administrators",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3.14",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: Free Threading :: 1 - Unstable",
23
+ "Topic :: Security",
24
+ "Topic :: Utilities",
25
+ ]
26
+
27
+ dependencies = [
28
+ "appthreat-vulnerability-db[oras]==6.7.0",
29
+ "mcp[cli]>=1.22.0",
30
+ ]
31
+
32
+ [build-system]
33
+ requires = ["setuptools>=61", "wheel", "build"]
34
+ build-backend = "setuptools.build_meta"
35
+
36
+ [tool.setuptools]
37
+ license-files = []
38
+
39
+ [tool.uv.sources]
40
+ appthreat-vulnerability-db = { path = "../..", editable = true }
41
+
42
+ [project.optional-dependencies]
43
+ dev = [
44
+ "black",
45
+ "bandit",
46
+ "flake8",
47
+ "pylint",
48
+ "pytest",
49
+ "pytest-cov",
50
+ ]
51
+
52
+ [project.scripts]
53
+ mcp-server-vdb = "mcp_server_vdb:main"
54
+
55
+ [tool.pytest.ini_options]
56
+ addopts="--showlocals -v --cov-report=term-missing --no-cov-on-fail --cov mcp_server_vdb"
57
+ testpaths = [
58
+ "test"
59
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,12 @@
1
+ from . import server
2
+ import asyncio
3
+
4
+ from contextlib import suppress
5
+
6
+
7
+ def main():
8
+ with suppress(asyncio.CancelledError, KeyboardInterrupt):
9
+ asyncio.run(server.run())
10
+
11
+
12
+ __all__ = ["main", "server"]
@@ -0,0 +1,41 @@
1
+ import base64
2
+
3
+ from rich.markdown import Markdown
4
+ from rich.table import Table
5
+
6
+ from vdb.lib.cve_model import CVE
7
+
8
+
9
+ def add_table_row(table: Table, res: dict, added_row_keys: dict):
10
+ # matched_by is the purl or cpe string
11
+ row_key = f"""{res["matched_by"]}|{res.get("source_data_hash")}"""
12
+ # Filter duplicate rows from getting printed
13
+ if added_row_keys.get(row_key):
14
+ return
15
+ source_data: CVE = res.get("source_data")
16
+ descriptions = []
17
+ cna_container = source_data.root.containers.cna
18
+ if cna_container and cna_container.descriptions and cna_container.descriptions.root:
19
+ for adesc in cna_container.descriptions.root:
20
+ description = (
21
+ "\n".join(
22
+ [
23
+ base64.b64decode(sm.value).decode("utf-8")
24
+ for sm in adesc.supportingMedia
25
+ ]
26
+ )
27
+ if adesc.supportingMedia
28
+ else adesc.value
29
+ )
30
+ description = description.replace("\\n", "\n").replace("\\t", " ")
31
+ descriptions.append(description)
32
+ table.add_row(
33
+ Markdown(
34
+ f"[{res.get('cve_id')}](cve://{res.get('cve_id')})",
35
+ justify="left",
36
+ hyperlinks=True,
37
+ ),
38
+ res.get("matched_by"),
39
+ Markdown("\n".join(descriptions), justify="left", hyperlinks=True),
40
+ )
41
+ added_row_keys[row_key] = True