Debian Security Analyzer MCP Server
Project description
debsecan-mcp
A Model Context Protocol (MCP) server for Debian security vulnerability analysis. This server integrates with AI assistants (like Claude) to provide vulnerability scanning capabilities for Debian systems.
Features
- List Vulnerabilities: Scan all installed packages on your Debian system for known vulnerabilities
- CVE Research: Get detailed information about specific CVEs including EPSS scores
- Automatic Suite Detection: Automatically detects your Debian suite (bookworm, trixie, sid, etc.)
- EPSS Integration: Enriches vulnerability data with Exploit Prediction Scoring System (EPSS) scores
Installation
pip install -e .
Usage
Running the MCP Server
debsecan-mcp
Or with a specific Debian suite:
DEBSECAN_SUITE=bookworm debsecan-mcp
Command Line Options
debsecan-mcp --help
Options:
--transport {stdio,sse,streamable-http}- Transport mode (default: stdio)--mount-path PATH- Mount path for HTTP transports (default: /mcp)--host HOST- Host to bind to for HTTP transport (default: 0.0.0.0)--port PORT- Port to bind to for HTTP transport (default: 8000)
Transport Modes
STDIO Mode (Default)
Used for direct integration with AI assistants like Claude Desktop or VSCode.
debsecan-mcp --transport stdio
HTTP Modes
For HTTP-based access, use sse or streamable-http:
# SSE mode
debsecan-mcp --transport sse --port 8080 --mount-path /mcp
# Streamable HTTP mode
debsecan-mcp --transport streamable-http --port 8080 --mount-path /mcp
Note: HTTP modes require running behind a web server. See HTTP Server Setup below.
HTTP Server Setup
The HTTP transport modes need to be served by a WSGI/ASGI server. Example with uvicorn:
# Install uvicorn
pip install uvicorn
# Run with stdio transport and wrap with uvicorn
uvicorn debsecan_mcp.main:mcp_app --app-dir src --host 0.0.0.0 --port 8000 --path /mcp
Or use the built-in development server:
# SSE mode
debsecan-mcp --transport sse --host 0.0.0.0 --port 8000 --mount-path /mcp
Available Tools
list_vulnerabilities
Lists all vulnerabilities affecting the currently installed packages on the system. Categorises them by severity (critical, high, medium, low, negligible) and EPSS score.
research_cves
Provides detailed information for a list of CVE IDs, including:
- Package name
- Urgency level
- EPSS score and percentile
- Whether a fix is available
- Remote exploitability
- Description
Adding to VSCode
To use this MCP server with VSCode and AI assistants:
-
Open VSCode Settings (JSON):
- On macOS:
Cmd + Shift + P→ "Preferences: Open Settings (JSON)" - On Linux/Windows:
Ctrl + Shift + P→ "Preferences: Open Settings (JSON)"
- On macOS:
-
Add the MCP server configuration:
{
"mcpServers": {
"debsecan": {
"command": "debsecan-mcp",
"args": [],
"env": {
"DEBSECAN_SUITE": "bookworm"
}
}
}
}
-
Replace
bookwormwith your Debian suite codename (e.g.,trixie,sid,GENERIC) -
Restart VSCode or reload the window
Adding to opencode
Option 1: STDIO Mode (Default)
For local usage with opencode, use the default stdio transport:
{
"mcpServers": {
"debsecan": {
"command": "debsecan-mcp",
"args": ["--transport", "stdio"],
"env": {
"DEBSECAN_SUITE": "bookworm"
}
}
}
}
Option 2: HTTP Mode
For remote or containerized setups, you can run the MCP server over HTTP:
- Start the server:
debsecan-mcp --transport streamable-http --port 8080 --mount-path /mcp
- Configure opencode to connect via HTTP:
{
"mcpServers": {
"debsecan": {
"url": "http://localhost:8080/mcp"
}
}
}
Note: HTTP mode requires the MCP client to support HTTP transport.
How It Works
- Package Discovery: Uses
python-aptto enumerate all installed packages on the system - Vulnerability Data: Fetches compressed vulnerability data from the Debian Security Tracker
- EPSS Enrichment: Downloads EPSS scores from CISA to prioritize vulnerabilities
- Analysis: Compares installed package versions against vulnerability data using APT version comparison
Requirements
- Python 3.11+
- Debian-based distribution (Debian, Ubuntu, etc.)
- Network access to download vulnerability data
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debsecan_mcp-0.1.0.tar.gz.
File metadata
- Download URL: debsecan_mcp-0.1.0.tar.gz
- Upload date:
- Size: 82.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f87da5235fb432dd6c8ecf79fa81a45e8fd68d0351ec91db7e21dcbc887bf825
|
|
| MD5 |
925de36a689a84c6e3da273cfc8f3d6f
|
|
| BLAKE2b-256 |
3237a9910239ea9c849d03a0bacdc40c2b942b6d760604122fbe81aef85fe7eb
|
Provenance
The following attestation bundles were made for debsecan_mcp-0.1.0.tar.gz:
Publisher:
ci.yml on copyninja/debsecan-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debsecan_mcp-0.1.0.tar.gz -
Subject digest:
f87da5235fb432dd6c8ecf79fa81a45e8fd68d0351ec91db7e21dcbc887bf825 - Sigstore transparency entry: 1746857182
- Sigstore integration time:
-
Permalink:
copyninja/debsecan-mcp@f2c81b8772f8785d912a15bb181b9bf2488844d9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/copyninja
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f2c81b8772f8785d912a15bb181b9bf2488844d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file debsecan_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: debsecan_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97e6ac18573c160ac12d99c82b7d3926ef1124c3775d7afdb19c2addaad8367
|
|
| MD5 |
33a90b2f0d85b23457258c8cdf6a8192
|
|
| BLAKE2b-256 |
35da3f6546b97bf3a5d9af30f0d1f73a69412ef6b69dc9ae837d4e3d61baa3b0
|
Provenance
The following attestation bundles were made for debsecan_mcp-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on copyninja/debsecan-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debsecan_mcp-0.1.0-py3-none-any.whl -
Subject digest:
b97e6ac18573c160ac12d99c82b7d3926ef1124c3775d7afdb19c2addaad8367 - Sigstore transparency entry: 1746857413
- Sigstore integration time:
-
Permalink:
copyninja/debsecan-mcp@f2c81b8772f8785d912a15bb181b9bf2488844d9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/copyninja
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f2c81b8772f8785d912a15bb181b9bf2488844d9 -
Trigger Event:
push
-
Statement type: