Dependency Security MCP
Provides tools for running OWASP Dependency-Check vulnerability scans against allowed repositories, checking asynchronous scan status, and retrieving normalized reports with dependency and vulnerability findings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dependency Security MCP scan /workspace/repos/payment-service for vulnerable dependencies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dependency Security MCP
Dependency Security MCP is a small, production-oriented Model Context Protocol server for OWASP Dependency-Check vulnerability scanning. It exposes three narrow tools:
start_dependency_scanget_scan_statusget_scan_report
It does not expose shell execution, arbitrary filesystem access, repository mutation, remediation, package manager commands, or unrestricted OWASP CLI arguments.
Architecture
flowchart TD
LangGraph --> Client[MCP Client]
Client --> Server[Dependency Security MCP]
Server --> ScanService
Server --> ReportService
ScanService --> Scanner[DependencyScanner]
ReportService --> Scanner
Scanner --> OWASP[OWASP Dependency-Check]The MCP layer is intentionally thin. Tool functions validate and serialize request and response data, then call application services. Services depend on repository and scanner abstractions, so a later OSV scanner, dependency resolver, version provider, or remediation service can be added without changing the MCP tool contracts.
Related MCP server: Offensive360 MCP Server
Requirements
Python 3.12+
OWASP Dependency-Check CLI available as
dependency-checkThe official MCP Python SDK v2
Install Python dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"The project uses the current v2 server style:
from mcp.server import MCPServerInstalling OWASP Dependency-Check
Install Dependency-Check from the OWASP project and ensure the dependency-check command is on PATH. You can also point the server at a custom executable:
export OWASP_DEPENDENCY_CHECK_PATH=/opt/dependency-check/bin/dependency-check.shConfiguration
Copy .env.example values into your environment:
export MCP_SERVER_NAME=dependency-security-mcp
export OWASP_DEPENDENCY_CHECK_PATH=dependency-check
export SCAN_OUTPUT_ROOT=/tmp/dependency-security-mcp
export ALLOWED_REPOSITORY_ROOTS=/workspace/repos
export SCAN_TIMEOUT_SECONDS=1800
export LOG_LEVEL=INFOALLOWED_REPOSITORY_ROOTS is a comma-separated allowlist. Requested repositories are resolved with Path.resolve() and must exist, be directories, and live below one configured root.
Running
Run with stdio for local development:
uv run mcp dev src/dependency_security_mcp/server.pyRun with Streamable HTTP for production-style serving:
uv run mcp run src/dependency_security_mcp/server.py --transport streamable-httpOpen the MCP Inspector:
uv run mcp dev src/dependency_security_mcp/server.pyMCP Tools
start_dependency_scan
Starts an OWASP Dependency-Check scan asynchronously and returns immediately after scheduling.
Request:
{
"repository_path": "/workspace/repos/payment-service",
"project_name": "payment-service"
}Response:
{
"scan_id": "4f8b3dfd-e4f7-40ec-b31f-df3d1992c544",
"scanner": "OWASP_DEPENDENCY_CHECK",
"status": "RUNNING",
"project_name": "payment-service",
"started_at": "2026-10-03T07:00:00Z"
}get_scan_status
Request:
{
"scan_id": "4f8b3dfd-e4f7-40ec-b31f-df3d1992c544"
}Response:
{
"scan_id": "4f8b3dfd-e4f7-40ec-b31f-df3d1992c544",
"status": "COMPLETED",
"scanner": "OWASP_DEPENDENCY_CHECK",
"started_at": "2026-10-03T07:00:00Z",
"completed_at": "2026-10-03T07:03:15Z",
"error": null
}get_scan_report
Running response:
{
"scan_id": "4f8b3dfd-e4f7-40ec-b31f-df3d1992c544",
"status": "RUNNING",
"message": "Scan has not completed yet."
}Completed response:
{
"scan_id": "4f8b3dfd-e4f7-40ec-b31f-df3d1992c544",
"scanner": "OWASP_DEPENDENCY_CHECK",
"project_name": "payment-service",
"repository_path": "/workspace/repos/payment-service",
"status": "COMPLETED",
"dependency_count": 147,
"vulnerable_dependency_count": 3,
"vulnerability_count": 5,
"findings": []
}Example Client Flow
from mcp import Client
async with Client("http://localhost:8000/mcp") as client:
start = await client.call_tool(
"start_dependency_scan",
{
"repository_path": "/workspace/repos/payment-service",
"project_name": "payment-service",
},
)
scan_id = start.structured_content["scan_id"]
while True:
status = await client.call_tool("get_scan_status", {"scan_id": scan_id})
if status.structured_content["status"] in {"COMPLETED", "FAILED", "CANCELLED"}:
break
report = await client.call_tool("get_scan_report", {"scan_id": scan_id})
print(report.structured_content)Docker
Build:
docker build -t dependency-security-mcp .Run with a read-only repository mount:
docker run --rm \
-v /repos:/workspace/repos:ro \
-e ALLOWED_REPOSITORY_ROOTS=/workspace/repos \
dependency-security-mcpThe image runs as a non-root user and writes scan output under SCAN_OUTPUT_ROOT.
Security Model
Never executes arbitrary user commands.
Never uses
shell=True.Validates repository paths by resolving them before allowlist checks.
Restricts scans to configured roots.
Server controls output directories.
Enforces scan timeouts and process termination.
Validates scanner exit codes.
Returns structured client-safe errors.
Does not expose environment variables, raw shell access, arbitrary filesystem APIs, or arbitrary OWASP arguments.
The caller decides when and which allowed repository to scan. The MCP server decides whether the path is allowed, which executable and arguments are used, where reports are stored, how long the scan may run, and how reports are normalized.
Tests
Run unit tests:
pytestRun lint:
ruff check .The real OWASP integration test is opt-in:
RUN_OWASP_INTEGRATION_TESTS=true pytest tests/integrationRoadmap
The architecture is ready for additional narrow capabilities later:
Maven, Gradle, and npm dependency resolution
OSV scanning
Dependency version lookup
Suggested dependency fixes
Controlled dependency updates
Build/test verification
Those capabilities are intentionally not implemented in this first version.
Available Tools
3 toolsget_scan_reportB
Get the normalized vulnerability report for a completed scan.
Inputs: scan_id (required). Returns: object
get_scan_statusC
Get status for a dependency vulnerability scan.
Inputs: scan_id (required). Returns: object
start_dependency_scanB
Start an OWASP Dependency-Check scan for an allowed repository path.
Inputs: repository_path (required), project_name. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct phase of the scan lifecycle: start a scan, poll its status, and retrieve the completed report. There is no functional overlap, and the descriptions clearly differentiate status polling from report retrieval.
All tool names follow a consistent snake_case verb_noun pattern (start_dependency_scan, get_scan_status, get_scan_report). The shared 'get_scan_' prefix for the two retrieval tools reinforces predictability.
Three tools are well-scoped for a focused dependency scanning service: initiate, monitor, and fetch results. The set contains no redundant or filler tools, and the count sits comfortably in the typical 3-15 range.
The core lifecycle (start → status → report) is fully covered, but there is no way to list existing scans or cancel a running scan. These are minor gaps that agents can work around by retaining scan IDs, but they limit multi-scan management.
Maintenance
Related MCP Connectors
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Security scanning for code, containers and IaC: request scans, read findings, report fixes.
Scan packages and lockfiles (npm, PyPI, Go, Maven, Cargo, NuGet) for vulnerabilities and malware.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceProvides tools for autonomous CVE detection, enrichment, and remediation across managed repositories using GHSA and NVD data. It enables automated triage and pull request creation for dependency fixes based on configurable severity policies.2MIT- AlicenseAqualityDmaintenanceEnables AI assistants to run Offensive360 SAST scans on local codebases, returning security findings with file/line, severity, and fixes, plus scan status tracking.243 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables auditing npm, Yarn, and pnpm lockfiles in local project directories or remote Git repositories to surface dependency vulnerabilities. Exposes a tool that supports severity thresholds, registry overrides, optional dev-dependency skipping, and text or JSON reports.9 npmMIT
- AlicenseNot gradedqualityBmaintenanceExposes an assess_repo tool that scans a repository, local folder, or npm/PyPI package and returns supply-chain risk findings with file, line, and code evidence — install-time scripts, dangerous patterns, secrets, AI-agent manipulation, impersonation and published-artifact mismatches — while never executing the target's code. Findings carry severities from info to critical so results can gate installs and CI jobs.2Apache 2.0