Skip to content

Commit 25dc8f1

Browse files
committed
docs
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
1 parent 88d8a3b commit 25dc8f1

File tree

5 files changed

+43
-11
lines changed

5 files changed

+43
-11
lines changed

contrib/mcp-server-vdb/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LABEL maintainer="Team AppThreat" \
3232
org.opencontainers.image.licenses="MIT" \
3333
org.opencontainers.image.title="vulnerability-db" \
3434
org.opencontainers.image.description="MCP server for AppThreat's vulnerability database and package search library." \
35-
org.opencontainers.docker.cmd="docker run --rm -e VDB_HOME=/db -v /db:/db -v $(pwd):/app:rw -t ghcr.io/appthreat/mcp-server-vdb"
35+
org.opencontainers.docker.cmd="docker run -i --rm -e VDB_HOME=/db -v $HOME/db:/db:rw ghcr.io/appthreat/mcp-server-vdb:master"
3636

3737
WORKDIR /app
3838

contrib/mcp-server-vdb/README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,42 @@ This folder contains the source code for running VDB as a Model Context Protocol
55
## Pre-requisites
66

77
- Python >= 3.10 installed
8+
- docker or Rancher Desktop (or)
89
- uv [installed](https://docs.astral.sh/uv/getting-started/installation/)
910

10-
## Local uv-based execution
11+
## docker-based execution (Recommended)
12+
13+
Use our container image `ghcr.io/appthreat/mcp-server-vdb:master`.
14+
15+
### Claude Desktop configuration
16+
17+
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:
18+
19+
```json
20+
{
21+
"mcpServers": {
22+
"vdb": {
23+
"command": "docker",
24+
"args": [
25+
"run",
26+
"-i",
27+
"--rm",
28+
"-e",
29+
"VDB_HOME=/db",
30+
"-v",
31+
"$HOME/vdb:/db:rw",
32+
"ghcr.io/appthreat/mcp-server-vdb:master"
33+
]
34+
}
35+
}
36+
}
37+
```
38+
39+
Restart the Claude Desktop application.
40+
41+
If you get `ENOENT` error, specify the full path to docker. On a mac, `/Applications/Docker.app/Contents/Resources/bin/docker`.
42+
43+
## Local uv-based execution (Developers only)
1144

1245
```shell
1346
git clone https://github.com/AppThreat/vulnerability-db.git
@@ -20,11 +53,7 @@ vdb --download-image
2053
uv --directory contrib/mcp-server-vdb run mcp-server-vdb
2154
```
2255

23-
## docker-based execution
24-
25-
Our container image `ghcr.io/appthreat/mcp-server-vdb:master` is currently not working in stdio mode. There appears to be a limitation with Claude Desktop not supporting docker in interactive mode. Please send a pull request if you have any workarounds.
26-
27-
## Claude Desktop configuration
56+
### Claude Desktop configuration
2857

2958
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`.
3059

@@ -54,6 +83,8 @@ Use the below configuration and adjust the following paths:
5483

5584
Restart the Claude Desktop application.
5685

86+
## Screenshots
87+
5788
### Claude context screen
5889

5990
![Claude context](../claude-context.png)

contrib/mcp-server-vdb/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mcp-server-vdb"
3-
version = "0.1.0"
3+
version = "1.0.0"
44
description = "AppThreat Vulnerability Database MCP server"
55
authors = [
66
{name = "Team AppThreat", email = "cloud@appthreat.com"},

contrib/mcp-server-vdb/src/mcp_server_vdb/server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ def print_results(results):
6969

7070

7171
async def run():
72-
server = Server("appthreat-vulnerability-db")
7372

7473
@asynccontextmanager
75-
async def server_lifespan() -> AsyncIterator[dict]:
74+
async def lifespan() -> AsyncIterator[dict]:
7675
"""Manage server startup and shutdown lifecycle."""
7776
global db_conn, index_conn
7877
try:
@@ -96,6 +95,8 @@ async def server_lifespan() -> AsyncIterator[dict]:
9695
if index_conn:
9796
index_conn.close()
9897

98+
server = Server("appthreat-vulnerability-db", version="1.0.0")
99+
99100
@server.list_resources()
100101
async def handle_list_resources() -> list[mtypes.Resource]:
101102
return [

contrib/mcp-server-vdb/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)