WSL DevSecOps MCP Server
Provides tools for container operations in the WSL environment: scanning Docker images for vulnerabilities with Trivy, generating SBOMs for images, and listing Docker containers with their running or stopped status.
Provides tools to audit Kubernetes clusters against security frameworks (NSA, MITRE ATT&CK, CIS) via Kubescape, list and inspect Kubernetes resources such as pods, services and deployments across namespaces, and retrieve logs from pods and specific containers.
Integrates Trivy to scan Docker images for vulnerabilities and check security issues, including filtering by severity such as HIGH and CRITICAL, as part of pre-deployment and compliance workflows.
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., "@WSL DevSecOps MCP Server Scan nginx:latest for critical vulnerabilities"
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.
WSL DevSecOps MCP Server
A Model Context Protocol (MCP) server that enables AI to execute DevSecOps tasks directly in your WSL Kali Linux environment. Streamline your container security scanning, Kubernetes management, and security automation workflows.
π― For DevSecOps Engineers
This tool bridges AI with your WSL environment, allowing you to:
Scan Docker images for vulnerabilities with Trivy
Audit Kubernetes clusters against NSA, MITRE, and CIS frameworks
Manage K8s resources through natural language commands
Generate SBOMs for compliance and supply chain security
Automate security scripts and custom workflows
Debug containers and pods efficiently
Perfect for DevSecOps teams working with containerized applications and Kubernetes environments who want to leverage AI assistance for security tasks.
Related MCP server: Kali Linux MCP Server
π Quick Start
Prerequisites
Windows 10/11 with WSL2
Kali Linux (or Ubuntu) installed in WSL
Node.js v18+ installed on Windows
AI Desktop application
Docker Desktop (optional, for container operations)
kubectl configured with cluster access (for K8s operations)
1. Install Security Tools in WSL
# Open your WSL terminal (Kali Linux)
wsl -d kali-linux
# Update system
sudo apt update && sudo apt upgrade -y
# Install Trivy (vulnerability scanner)
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
# Install Kubescape (K8s security scanner)
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash
# Install Syft (SBOM generator)
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
# Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Install utilities
sudo apt install jq docker.io -y
# Verify installations
trivy --version
kubectl version --client
kubescape version
syft version2. Create Scripts Directory
mkdir -p /home/kali/scripts
chmod 755 /home/kali/scripts3. Install MCP Server
# In Windows PowerShell or Command Prompt
cd C:\Users\YourUsername
git clone https://github.com/yourusername/wsl-devsecops-mcp.git
cd wsl-devsecops-mcp
npm install4. Configure AI Desktop
Edit your AI Desktop configuration file:
Location: %APPDATA%\AI\AI_desktop_config.json
Add this configuration:
{
"mcpServers": {
"wsl-devsecops": {
"command": "node",
"args": ["C:\\Users\\YourUsername\\wsl-devsecops-mcp\\wsl-mcp-server.js"],
"env": {
"WSL_DISTRO": "kali-linux",
"WSL_SCRIPTS_DIR": "/home/kali/scripts"
}
}
}
}Important: Replace YourUsername with your actual Windows username.
5. Restart AI Desktop
Close and reopen AI Desktop to load the MCP server.
π οΈ Available Tools
Security Scanning
scan_docker_image
Scan Docker images for vulnerabilities using Trivy.
Example prompts:
"Scan nginx:latest for critical vulnerabilities"
"Check alpine:3.18 for security issues"
"Scan our production image myapp:v1.2.3 for HIGH and CRITICAL vulnerabilities"
generate_sbom
Generate Software Bill of Materials for container images.
Example prompts:
"Generate an SBOM for nginx:latest in CycloneDX format"
"Create an SPDX SBOM for our application image"
Kubernetes Management
scan_kubernetes_cluster
Audit your K8s cluster against security frameworks (NSA, MITRE, CIS).
Example prompts:
"Scan our K8s cluster against NSA framework"
"Run a CIS benchmark on the production namespace"
"Check our cluster for MITRE ATT&CK compliance"
list_kubernetes_resources
List and inspect Kubernetes resources.
Example prompts:
"Show all pods in the production namespace"
"List all services across all namespaces"
"What deployments are running in staging?"
kubectl_get_logs
Retrieve logs from Kubernetes pods.
Example prompts:
"Get the last 500 lines from the api-server pod"
"Show logs from the nginx pod in production namespace"
"Get logs from the web container in the app-pod"
Container Operations
check_docker_containers
List Docker containers and their status.
Example prompts:
"What Docker containers are currently running?"
"Show all containers including stopped ones"
"List the status of all my containers"
Custom Automation
run_security_script
Execute custom security scripts from /home/kali/scripts.
Example prompts:
"Run the compliance-check.sh script"
"Execute vulnerability-report.py with the --full flag"
execute_wsl_command
Run any command in your WSL environment.
Example prompts:
"Run nmap scan on 192.168.1.0/24"
"Check the disk usage in WSL"
"List all running processes"
π Common DevSecOps Workflows
Pre-Deployment Security Check
"Scan the myapp:latest image for vulnerabilities, generate an SBOM,
and check if all HIGH/CRITICAL issues are patched"Cluster Security Audit
"Scan our Kubernetes cluster against NSA framework and list any
pods that don't meet security standards"Incident Response
"Get logs from the failing api-server pod in production,
check what containers are running, and scan the image for known exploits"Compliance Reporting
"Generate an SBOM for all our production images and run a CIS
benchmark on our cluster"π§ Configuration
Environment Variables
Set these in your AI Desktop config:
WSL_DISTRO- Your WSL distribution name (default:kali-linux)Find it with:
wsl -l -vCommon values:
kali-linux,Ubuntu,Ubuntu-22.04
WSL_SCRIPTS_DIR- Directory for custom scripts (default:/home/kali/scripts)
Custom Scripts
Place your security automation scripts in /home/kali/scripts:
# Example: Create a compliance check script
cat > /home/kali/scripts/compliance-check.sh <<'EOF'
#!/bin/bash
echo "Running compliance checks..."
trivy image --severity CRITICAL,HIGH $1
kubescape scan framework nsa
EOF
chmod +x /home/kali/scripts/compliance-check.shThen use it: "Run compliance-check.sh with nginx:latest"
π Troubleshooting
MCP Server Not Connecting
Check AI Desktop logs:
%APPDATA%\AI\logsVerify Node.js:
node --version(should be v18+)Test manually:
node C:\path\to\wsl-mcp-server.js
WSL Commands Failing
Verify WSL is running:
wsl -l -vTest connection:
wsl -d kali-linux whoamiCheck distribution name matches config
Tool Not Found Errors
Verify tools are installed in WSL:
wsl -d kali-linux bash -c "which trivy kubectl kubescape syft"Permission Issues
# In WSL, fix permissions
chmod 755 /home/kali/scripts
chmod +x /home/kali/scripts/*.shπ Security Considerations
This server has full access to your WSL environment
Use only in trusted environments
Review all custom scripts before execution
Keep security tools updated regularly
Never commit sensitive credentials to scripts
Consider using separate WSL instances for different environments
π Additional Resources
π€ Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
π License
MIT License - See LICENSE file for details
π Acknowledgments
Built with:
Model Context Protocol by Anthropic
Trivy by Aqua Security
Kubescape by ARMO
Syft by Anchore
Made for DevSecOps engineers who want to work smarter, not harder. π
Available Tools
8 toolscheck_docker_containersC
List running Docker containers and their status
Inputs: all.
execute_wsl_commandB
Execute a command in the WSL Kali Linux environment
Inputs: command (required), workdir.
generate_sbomC
Generate Software Bill of Materials for a Docker image using Syft
Inputs: image (required), format.
kubectl_get_logsC
Get logs from a Kubernetes pod
Inputs: pod_name (required), tail, container, namespace.
list_kubernetes_resourcesC
List Kubernetes resources (pods, services, deployments, etc.)
Inputs: resource_type (required), namespace.
run_security_scriptC
Run a custom security script from the scripts directory
Inputs: script_name (required), args.
scan_docker_imageC
Scan a Docker image for vulnerabilities using Trivy
Inputs: image (required), severity.
scan_kubernetes_clusterC
Scan Kubernetes cluster for security issues using Kubescape
Inputs: framework, namespace.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 8 tools
Most tools have distinct purposes, but execute_wsl_command is a generic escape hatch that can overlap with every specialized tool, especially run_security_script and the scanning/listing tools. An agent may reasonably choose execute_wsl_command instead of a purpose-built tool, creating ambiguity.
The tools mostly follow a snake_case verb_noun convention such as scan_docker_image, list_kubernetes_resources, and generate_sbom. The main deviation is kubectl_get_logs, which includes a tool prefix instead of starting with the verb.
Eight tools is well-scoped for a DevSecOps server covering execution, Docker scanning, Kubernetes scanning, listing resources, SBOM generation, and logs. Each tool has a reasonably clear place in the workflow.
The surface covers core DevSecOps operations across WSL command execution, Docker vulnerability scanning, SBOM generation, Kubernetes scanning, resource listing, container listing, and pod logs. Minor gaps remain, such as dedicated report retrieval or richer Kubernetes inspection, but generic command execution provides a workaround.
Maintenance
Related MCP Connectors
AI pentesting: run scans, triage vulnerabilities, review PRs, manage schedules and assets.
Security scanner for AI-written code: SAST, secrets, dependencies, IaC, containers and DAST.
Query your team's drift, vulnerability, and upgrade data from any AI assistant. OAuth 2.1, 51 tools.
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to execute penetration testing commands and security tools on Kali Linux remotely. Supports automated reconnaissance, vulnerability scanning, and CTF solving through integration with 25+ offensive security tools like nmap, gobuster, and nuclei.16-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform penetration testing and security assessments by exposing 60+ Kali Linux security tools including network scanning, web security testing, password cracking, exploitation frameworks, and OSINT capabilities through an AI-friendly interface.2MIT
- AlicenseNot gradedqualityDmaintenanceProvides a containerized Kali Linux environment that gives AI assistants access to a comprehensive suite of security and penetration testing tools. It enables automated vulnerability scanning, network reconnaissance, and secure command execution through the Model Context Protocol.26MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to run Kali Linux security tools in an isolated Docker container for tasks like network scanning, port checking, and service enumeration.79 npm1MIT