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
Standalone CLI Tool (debvulns)
The package includes a standalone CLI tool debvulns that allows you to scan for vulnerabilities directly from the command line without running the MCP server.
On first run, debvulns downloads the vulnerabilities and EPSS data and caches them locally (defaulting to /var/cache/debvulns or falling back to ~/.cache/debvulns if the default path is unwritable). The cache is refreshed automatically if it is older than 24 hours.
Running the CLI Tool
debvulns
Command Line Options
debvulns --help
Options:
-s, --severity {critical,high,medium,low,negligible}- Filter vulnerabilities by severity. By default, lists all vulnerabilities grouped by severity.-f, --format {json,csv}- Output format (default:json).--sort-by {package,cve}- Sort vulnerabilities by package name or CVE ID.--suite SUITE- Debian suite name (e.g.,bookworm,sid). Automatically detected by default.--cache-dir PATH- Directory to cache fetched and parsed data (default:/var/cache/debvulns).--no-cache- Do not use cached data, force downloading and parsing.--vuln-url URL- Custom URL or local path for Debian Security Tracker data.--epss-url URL- Custom URL or local path for EPSS scores data.-v, --verbose- Enable verbose debug logging (sent to stderr).
Examples
Filter high severity vulnerabilities, sort by CVE, and output in CSV format:
debvulns --severity high --sort-by cve --format csv
Run for a specific suite without using cached data:
debvulns --suite trixie --no-cache
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
Metadata
Release files for debsecan-mcp 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| debsecan_mcp-0.1.5.tar.gz | 92.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| debsecan_mcp-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.7 kB
Release files / debsecan_mcp-0.1.5.tar.gz
| Download URL | debsecan_mcp-0.1.5.tar.gz |
|---|---|
| Size | 92.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
483df2abdfa0bdd29681ae74ffadb27886886f9b41e19545dcc771fd275578dc
|
|
BLAKE2b-256 checksum How to use checksums |
dcd7c3ec2fd19fedff90fb2025be97fd91a511c179bed8726397efa50983958d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency logRelease files / debsecan_mcp-0.1.5-py3-none-any.whl
| Download URL | debsecan_mcp-0.1.5-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96d193fe347eb7657b83c28b3cb0affab25f7df0ebc59480d183cbbbc6ee396f
|
|
BLAKE2b-256 checksum How to use checksums |
016d7057b138151533118048ae83a17b0363160ca6ac525c585de97119b6a423
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency logSecurity for debsecan-mcp 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for debsecan_mcp-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.