Observed since 20 Oct, 20:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
MCP server for security vulnerability scanning and detection
🔒 Clean Architecture security analysis with AI-powered vulnerability detection and validation
We think about your vulns so you don't have to.
Installation • Quick Start • Claude Code Setup • Cursor Setup • CLI Usage • MCP Tools • Architecture
# Install python uv
brew install uv
# Install Semgrep (required)
brew install semgrep # macOS
# or
pip install semgrep # Other platforms
# Install Adversary MCP Server
uv pip install adversary-mcp-server
adv --version
adv status
# Initial setup (interactive)
adv configure setup
# Or configure directly with options
adv configure --llm-provider openai --llm-api-key $OPENAI_API_KEY
adv configure --llm-provider anthropic --llm-api-key $ANTHROPIC_API_KEY
# Check configuration status
adv status
# Scan a single file (basic)
adv scan-file path/to/file.py
# Scan with AI analysis and validation (recommended)
adv scan-file path/to/file.py --use-llm --use-validation
# Scan entire directory
adv scan-folder ./src --use-llm --use-validation
# Scan code snippet directly
adv scan-code "print('Hello World')" --language python
# Launch interactive telemetry dashboard
adv dashboard
Create or update ~/.config/claude-code/mcp.json:
{
"mcpServers": {
"adversary": {
"command": "uvx",
"args": ["adversary-mcp-server"]
}
}
}
Once configured, these tools are available in Claude Code:
Create .cursor/mcp.json in your project:
{
"mcpServers": {
"adversary": {
"command": "uvx",
"args": ["adversary-mcp-server"]
}
}
}
{
"mcpServers": {
"adversary": {
"command": "python",
"args": ["-m", "adversary_mcp_server.sync_main"]
}
}
}
{
"mcpServers": {
"adversary": {
"command": "/path/to/.venv/bin/python",
"args": ["-m", "adversary_mcp_server.sync_main"]
}
}
}
Once configured, these tools are available in Cursor's chat:
# Configure the scanner
adv configure setup
# Check status and configuration
adv status
# Scan individual files
adv scan-file <file-path> [options]
# Scan directories
adv scan-folder <directory-path> [options]
# Scan code snippets
adv scan-code <code-content> --language <lang> [options]
# Launch comprehensive telemetry dashboard
adv dashboard
# Basic file scan
adv scan-file app.py
# Scan with AI analysis and validation (recommended)
adv scan-file app.py --use-llm --use-validation
# Directory scan with full analysis
adv scan-folder ./src --use-llm --use-validation
# Code snippet scan
adv scan-code "SELECT * FROM users WHERE id = ?" --language sql
# Scan with specific severity threshold
adv scan-file app.py --severity high
# Output results in different formats
adv scan-file app.py --output-format json --output-file results.json
adv scan-file app.py --output-format markdown --verbose
# Interactive setup
adv configure setup
# Direct configuration
adv configure --llm-provider openai --llm-api-key your-key
adv configure --llm-provider anthropic --llm-api-key your-key
# Reset configuration
adv configure reset
# Check current configuration
adv status
--use-llm / --no-llm # Enable/disable AI analysis
--use-validation / --no-validation # Enable/disable false positive filtering
--use-semgrep / --no-semgrep # Enable/disable Semgrep analysis (default: true)
--severity [low|medium|high|critical] # Minimum severity threshold
--output-format [json|markdown|csv] # Output format for results
--output-file <file> # Save results to specific file
--verbose # Verbose output with detailed information
| Tool | Description | Example Usage |
|---|---|---|
adv_scan_code | Scan code snippets directly | "Scan this code for vulnerabilities" |
adv_scan_file | Scan specific files with full analysis | "Check security issues in auth.py" |
adv_scan_folder | Scan entire directories recursively | "Analyze the src folder for vulnerabilities" |
adv_get_status | Check server status and capabilities | "Is the security scanner configured?" |
adv_get_version | Get server version information | "What version is running?" |
adv_mark_false_positive | Mark findings as false positives | "Mark finding XYZ as false positive" |
adv_unmark_false_positive | Remove false positive marking | "Unmark finding ABC as false positive" |
// In Claude Code or Cursor, ask the AI assistant:
// Scan current file with full analysis
"Use adv_scan_file to check this file for security issues with LLM validation"
// Scan directory with specific options
"Run adv_scan_folder on the src directory with severity threshold of high"
// Scan code snippet
"Use adv_scan_code to analyze this SQL query for injection vulnerabilities"
// Check scanner status
"Use adv_get_status to see what scan engines are available"
All MCP tools automatically save scan results in multiple formats:
.adversary.json - Machine-readable results with full metadata.adversary.md - Human-readable report with remediation guidance.adversary.csv - Spreadsheet-compatible format for analysisResults are automatically placed alongside scanned files/directories with intelligent conflict resolution.
The scanner includes a rich web-based dashboard for comprehensive telemetry analysis:
# Launch interactive dashboard
adv dashboard
Dashboard Features:
Adversary MCP Server includes comprehensive telemetry tracking:
Adversary MCP Server is built using Clean Architecture principles with Domain-Driven Design (DDD), ensuring separation of concerns, maintainability, and testability.
graph TB
subgraph "🖥️ **Presentation Layer**"
A[Cursor IDE]
B[CLI Interface]
C[Web Dashboard]
end
subgraph "🔧 **Application Layer**"
D[MCP Server]
E[CLI Commands]
F[Adapters]
subgraph "Adapters"
F1[SemgrepAdapter]
F2[LLMAdapter]
F3[ValidationAdapter]
end
end
subgraph "🏛️ **Domain Layer (Business Logic)**"
subgraph "Entities"
G[ScanRequest]
H[ScanResult]
I[ThreatMatch]
end
subgraph "Value Objects"
J[ScanContext]
K[SeverityLevel]
L[ConfidenceScore]
M[FilePath]
end
subgraph "Domain Services"
N[ScanOrchestrator]
O[ThreatAggregator]
P[ValidationService]
end
subgraph "Interfaces"
Q[IScanStrategy]
R[IValidationStrategy]
end
end
subgraph "⚙️ **Infrastructure Layer**"
S[SemgrepScanner]
T[LLMScanner]
U[LLMValidator]
V[SQLAlchemy Database]
W[File System]
X[Git Operations]
Y[Telemetry System]
end
A -->|MCP Protocol| D
B --> E
C --> Y
D --> F
E --> F
F1 --> N
F2 --> N
F3 --> P
N --> O
N --> P
G --> N
H --> O
I --> P
J --> G
K --> I
L --> I
M --> G
N --> Q
P --> R
F1 -.-> S
F2 -.-> T
F3 -.-> U
S --> W
T --> W
U --> V
Y --> V
X --> W
style N fill:#e1f5fe,stroke:#0277bd,stroke-width:3px
style O fill:#e1f5fe,stroke:#0277bd,stroke-width:3px
style P fill:#e1f5fe,stroke:#0277bd,stroke-width:3px
style G fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style H fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style I fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style F1 fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
style F2 fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
style F3 fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
ScanRequest, ScanResult, ThreatMatch - Rich business objectsScanContext, SeverityLevel, ConfidenceScore, FilePath - Immutable domain conceptsScanOrchestrator, ThreatAggregator, ValidationService - Pure business orchestrationIScanStrategy, IValidationStrategy - Contracts for external dependenciesSemgrepAdapter - Adapts Semgrep scanner to domain IScanStrategyLLMAdapter - Adapts LLM scanner to domain IScanStrategyValidationAdapter - Adapts LLM validator to domain IValidationStrategyScanRequest created with ScanContext (file/directory/code)ScanOrchestrator coordinates scanning strategiesIScanStrategy implementations execute concurrentlyThreatAggregator deduplicates and merges findingsValidationService filters false positives using AIScanResult with comprehensive metadata# Core settings (optional)
ADVERSARY_LOG_LEVEL=INFO # Set logging level
ADVERSARY_WORKSPACE_ROOT=/path # Override workspace detection
Settings are automatically managed through the CLI and stored in ~/.adversary/config.json:
# Interactive configuration
adv configure setup
# Direct configuration
adv configure --llm-provider openai --llm-api-key your-key
# Check current settings
adv status
name: Security Scan
on: [pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install adversary-mcp-server
- name: Run security scan
run: |
adv scan-directory . \
--use-llm \
--use-validation \
--severity medium \
--output-format json \
--output-file scan-results.json
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: security-scan
path: scan-results.json
# Clone repository
git clone https://github.com/brettbergin/adversary-mcp-server.git
cd adversary-mcp-server
# Create virtual environment (using uv or standard venv)
source .venv/bin/activate # Activate existing venv
# Install in development mode
uv pip install -e .[dev]
# Run tests
make test
# Full test suite with coverage
make test
# Specific test categories
make test-unit # Unit tests only
make test-integration # Integration tests only
make test-security # Security tests only
# Code quality checks
make format # Auto-format code
make mypy # Type checking
make lint # Run all linting
make pre-commit # Run same pre-commit in git commits.
MIT License - see LICENSE for details.
Contributions are welcome! Please see our Contributing Guide for details.
pypistats · 87 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 9 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-19 – 2026-10-19 | 11 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-18 – 2026-10-18 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-17 – 2026-10-17 | 51 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-16 – 2026-10-16 | 29 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-15 – 2026-10-15 | 10 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-14 – 2026-10-14 | 10 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-13 – 2026-10-13 | 14 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-12 – 2026-10-12 | 35 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-11 – 2026-10-11 | 93 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-10 – 2026-10-10 | 13 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-09 – 2026-10-09 | 43 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-08 – 2026-10-08 | 100 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-07 – 2026-10-07 | 19 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-06 – 2026-10-06 | 125 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-05 – 2026-10-05 | 7 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-04 – 2026-10-04 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-03 – 2026-10-03 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-02 – 2026-10-02 | 6 | 2026-10-21T16:16:02.6625138Z |
| 2026-10-01 – 2026-10-01 | 54 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-30 – 2026-09-30 | 11 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-29 – 2026-09-29 | 14 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-28 – 2026-09-28 | 19 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-27 – 2026-09-27 | 22 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-26 – 2026-09-26 | 42 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-25 – 2026-09-25 | 45 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-24 – 2026-09-24 | 54 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-23 – 2026-09-23 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-22 – 2026-09-22 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-21 – 2026-09-21 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-20 – 2026-09-20 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-19 – 2026-09-19 | 82 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-18 – 2026-09-18 | 5 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-17 – 2026-09-17 | 30 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-16 – 2026-09-16 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-15 – 2026-09-15 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-14 – 2026-09-14 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-13 – 2026-09-13 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-12 – 2026-09-12 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-10 – 2026-09-10 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-09 – 2026-09-09 | 6 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-08 – 2026-09-08 | 6 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-07 – 2026-09-07 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-06 – 2026-09-06 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-04 – 2026-09-04 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-03 – 2026-09-03 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-02 – 2026-09-02 | 9 | 2026-10-21T16:16:02.6625138Z |
| 2026-09-01 – 2026-09-01 | 24 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-31 – 2026-08-31 | 13 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-30 – 2026-08-30 | 13 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-29 – 2026-08-29 | 8 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-28 – 2026-08-28 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-27 – 2026-08-27 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-26 – 2026-08-26 | 6 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-25 – 2026-08-25 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-24 – 2026-08-24 | 15 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-23 – 2026-08-23 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-21 – 2026-08-21 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-20 – 2026-08-20 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-19 – 2026-08-19 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-18 – 2026-08-18 | 5 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-17 – 2026-08-17 | 9 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-16 – 2026-08-16 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-15 – 2026-08-15 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-14 – 2026-08-14 | 11 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-13 – 2026-08-13 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-12 – 2026-08-12 | 9 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-11 – 2026-08-11 | 5 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-10 – 2026-08-10 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-09 – 2026-08-09 | 14 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-08 – 2026-08-08 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-07 – 2026-08-07 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-06 – 2026-08-06 | 1 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-05 – 2026-08-05 | 11 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-04 – 2026-08-04 | 9 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-03 – 2026-08-03 | 13 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-02 – 2026-08-02 | 4 | 2026-10-21T16:16:02.6625138Z |
| 2026-08-01 – 2026-08-01 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-31 – 2026-07-31 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-30 – 2026-07-30 | 3 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-29 – 2026-07-29 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-28 – 2026-07-28 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-27 – 2026-07-27 | 5 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-26 – 2026-07-26 | 12 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-25 – 2026-07-25 | 2 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-24 – 2026-07-24 | 6 | 2026-10-21T16:16:02.6625138Z |
| 2026-07-23 – 2026-07-23 | 6 | 2026-10-21T16:16:02.6625138Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.11.1 | 24 Aug 2025 | 31 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 20:03 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:2afc885fdf6d744f538406d889e42354bf917b7d3e1a4192a3dba02907022d9d