Loading...
Loading...
Deploy and orchestrate 38 MCP servers for offensive security tools (Nmap, Nuclei, Ghidra, SQLMap, etc.) via Docker
npx skill4agent add aradotso/security-skills mcp-security-hubSkill by ara.so — Security Skills collection.
mcp-security-hubgit clone https://github.com/FuzzingLabs/mcp-security-hub.git
cd mcp-security-hub
# Build all MCP servers
docker-compose build
# Or build specific servers
docker-compose build nmap-mcp nuclei-mcp gitleaks-mcp# Check built images
docker images | grep mcp
# Start specific servers
docker-compose up nmap-mcp nuclei-mcp -d
# Verify health
docker-compose ps~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"nmap": {
"command": "docker",
"args": ["run", "-i", "--rm", "--cap-add=NET_RAW", "nmap-mcp:latest"]
},
"nuclei": {
"command": "docker",
"args": ["run", "-i", "--rm", "nuclei-mcp:latest"]
},
"gitleaks": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "${HOME}/repos:/app/target:ro",
"gitleaks-mcp:latest"
]
},
"radare2": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "${HOME}/binaries:/samples:ro",
"radare2-mcp:latest"
]
},
"sqlmap": {
"command": "docker",
"args": ["run", "-i", "--rm", "sqlmap-mcp:latest"]
},
"trivy": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/var/run/docker.sock:/var/run/docker.sock:ro",
"trivy-mcp:latest"
]
}
}
}.mcp.json{
"mcpServers": {
"nmap": {
"command": "docker",
"args": ["run", "-i", "--rm", "--cap-add=NET_RAW", "nmap-mcp:latest"]
},
"nuclei": {
"command": "docker",
"args": ["run", "-i", "--rm", "nuclei-mcp:latest"]
}
}
}# Shodan
export SHODAN_API_KEY=your_key_here
# VirusTotal
export VT_API_KEY=your_key_here
# ZoomEye
export ZOOMEYE_API_KEY=your_key_here
# Burp Suite
export BURP_API_KEY=your_key_here{
"mcpServers": {
"shodan": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "SHODAN_API_KEY=${SHODAN_API_KEY}",
"shodan-mcp:latest"
]
}
}
}scan_hostsscan_portsscan_osscan_vulnscan_customlist_nse_scriptsget_nse_script_infoscan_with_scriptscan_targetscan_with_severityscan_with_tagsscan_with_templateslist_templatesupdate_templatesscan_multiple_targetsscan_reposcan_filescan_directorygenerate_baselinescan_commits{
"gitleaks": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/path/to/repos:/app/target:ro",
"gitleaks-mcp:latest"
]
}
}analyze_binarydisassembledecompilelist_functionsfind_stringsfind_importsfind_exportssearch_bytesanalyze_entropy{
"radare2": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/path/to/binaries:/samples:ro",
"radare2-mcp:latest"
]
}
}test_urldump_databasedump_tablelist_databaseslist_tablesget_dbsget_current_usertest_formsscan_imagescan_filesystemscan_configscan_repolist_vulnerabilitiesget_sbomscan_kubernetes# 1. Build reconnaissance servers
docker-compose build nmap-mcp whatweb-mcp masscan-mcp
# 2. Start services
docker-compose up nmap-mcp whatweb-mcp -d
# 3. Use in Claude
# "Scan 10.0.0.0/24 for web servers, then fingerprint each one"# Build web security stack
docker-compose build nuclei-mcp sqlmap-mcp ffuf-mcp
# Start services
docker-compose up nuclei-mcp sqlmap-mcp ffuf-mcp -d
# In Claude:
# "Scan example.com with nuclei, test any forms for SQL injection,
# and fuzz for hidden directories"# Build binary analysis tools
docker-compose build radare2-mcp binwalk-mcp yara-mcp capa-mcp
# Mount binaries directory
docker-compose up radare2-mcp binwalk-mcp yara-mcp capa-mcp -d
# In Claude:
# "Analyze /samples/suspicious.exe - extract filesystem if packed,
# scan for malware patterns, and identify capabilities"# Build gitleaks
docker-compose build gitleaks-mcp
# Run as one-off scan
docker run -i --rm \
-v "$(pwd):/app/target:ro" \
gitleaks-mcp:latest <<EOF
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "scan_directory",
"arguments": {
"path": "/app/target"
}
},
"id": 1
}
EOF# Build cloud security tools
docker-compose build trivy-mcp prowler-mcp
# Mount Docker socket for Trivy
docker-compose up trivy-mcp prowler-mcp -d
# In Claude:
# "Scan all running containers for CVEs, then audit AWS account
# for security misconfigurations"docker-compose up -d# Reconnaissance only
docker-compose up nmap-mcp whatweb-mcp masscan-mcp -d
# Web security only
docker-compose up nuclei-mcp sqlmap-mcp ffuf-mcp -ddocker-compose.ymlservices:
nmap-mcp:
image: nmap-mcp:latest
deploy:
resources:
limits:
cpus: '2.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M# Check health status
docker-compose ps
# View logs
docker-compose logs -f nmap-mcp
# Restart unhealthy services
docker-compose restart nmap-mcpcd reconnaissance/nmap-mcp
docker build -t nmap-mcp:latest .# Run interactive test
docker run -it --rm nmap-mcp:latest
# Send JSON-RPC request
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | \
docker run -i --rm nmap-mcp:latestmkdir -p custom-category/mytool-mcp
cd custom-category/mytool-mcp
# Create Dockerfile
cat > Dockerfile <<'EOF'
FROM python:3.11-slim
RUN useradd -m -u 1000 mcpuser
RUN pip install mcp mytool
USER mcpuser
WORKDIR /app
COPY server.py .
CMD ["python", "server.py"]
EOF
# Create server.py with MCP protocol implementation
# Add to docker-compose.yml# Example hardened Dockerfile pattern
FROM alpine:3.19
RUN adduser -D -u 1000 mcpuser
RUN apk add --no-cache tool-name
USER mcpuser
WORKDIR /app
# Drop all capabilities by default
# Add only required capabilities in docker-compose.ymlnmap-mcp:
cap_drop:
- ALL
cap_add:
- NET_RAW # Required for SYN scanning
trivy-mcp:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Docker scanninggitleaks-mcp:
volumes:
- ./repos:/app/target:ro # Read-only prevents modification# Check if container is running
docker ps | grep mcp
# View logs
docker logs nmap-mcp
# Restart service
docker-compose restart nmap-mcp
# Test JSON-RPC directly
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | \
docker run -i --rm nmap-mcp:latest# Nmap requires NET_RAW capability
# Add to docker-compose.yml:
cap_add:
- NET_RAW
# Or run with --cap-add
docker run --cap-add=NET_RAW nmap-mcp:latest# Ensure absolute paths
docker run -v /absolute/path:/app/target:ro gitleaks-mcp
# Check permissions (container runs as UID 1000)
chown -R 1000:1000 /path/to/repos
# Verify mount inside container
docker run -it --rm -v $(pwd):/app/target:ro gitleaks-mcp sh
ls -la /app/target# Verify config location
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%\Claude\claude_desktop_config.json
# Check JSON syntax
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq .
# Restart Claude Desktop after config changes
# Verify image exists
docker images | grep nmap-mcp# Verify environment variable is set
echo $SHODAN_API_KEY
# Pass to Docker container
docker run -e SHODAN_API_KEY=$SHODAN_API_KEY shodan-mcp
# For Claude Desktop, use full env var syntax
{
"command": "docker",
"args": ["-e", "SHODAN_API_KEY=${SHODAN_API_KEY}", ...]
}# Some tools need host network access
docker run --network host nmap-mcp
# Or create custom network
docker network create security-net
docker run --network security-net nmap-mcp# Clear Docker build cache
docker builder prune -a
# Rebuild with no cache
docker-compose build --no-cache nmap-mcp
# Check base image availability
docker pull alpine:3.19
docker pull python:3.11-slim# Mount custom template directory
docker run -i --rm \
-v $(pwd)/custom-templates:/nuclei-templates:ro \
nuclei-mcp:latest
# In Claude: "Use custom nuclei templates from /nuclei-templates"# 1. Extract firmware
docker run -v $(pwd)/firmware:/samples:ro binwalk-mcp
# 2. Scan extracted files
docker run -v $(pwd)/firmware/_extracted:/samples:ro yara-mcp
# 3. Analyze suspicious binaries
docker run -v $(pwd)/firmware/_extracted:/samples:ro radare2-mcp#!/bin/bash
# scan-pipeline.sh
TARGET=$1
# Network scan
docker run --rm --cap-add=NET_RAW nmap-mcp \
-A $TARGET > nmap-results.txt
# Web fingerprinting
docker run --rm whatweb-mcp $TARGET > whatweb-results.txt
# Vulnerability scan
docker run --rm nuclei-mcp -u $TARGET -severity high,critical \
> nuclei-results.txt# Export Trivy results to JSON
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
trivy-mcp image nginx:latest -f json > trivy-report.json
# Parse and filter with jq
cat trivy-report.json | jq '.Results[] | select(.Vulnerabilities)'