CyberSec MCP
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., "@CyberSec MCPrun an nmap scan on 172.28.0.10 and summarize open ports"
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.
CyberSec MCP ๐ก๏ธ
An enterprise-grade Model Context Protocol (MCP) server that enables AI agents to execute cybersecurity tools through strictly controlled, containerized sandboxes with target allowlisting, argument sanitization, hard timeouts, and immutable audit logs.
๐ Core Security Philosophy
The LLM never gets arbitrary shell access.
It only interacts through strictly typed, registered MCP tools. Every single tool execution request passes through the Validation โ Policy Gate โ Disposable Sandbox Container โ Structured JSON Parser โ Immutable Audit Logger pipeline before any response reaches the AI.
Related MCP server: OmniBridge MCP Server
๐ Architecture
graph TD
Agent["AI Agent (Claude / Cursor / IDE)"] -->|JSON-RPC / stdio| MCP["MCP Server (server/main.py)"]
MCP --> Registry["Tool Registry (server/tools/registry.py)"]
Registry --> Tool["BaseTool Pipeline (server/tools/base.py)"]
subgraph "Defensive Guardrails"
Tool --> Val["1. Input Sanitization & Validation"]
Val --> Policy["2. Policy Engine (Allowlists & Blocked Flags)"]
Policy --> Risk["Risk Engine & Operator Approval"]
end
subgraph "Container Sandbox Isolation"
Risk --> Sandbox["3. Sandbox Manager (server/sandbox/manager.py)"]
Sandbox --> Docker["Docker Backend"]
Docker -.-> NmapBox["Nmap Sandbox (Read-Only FS, Non-Root)"]
Docker -.-> WebBox["Web & DNS Sandbox (Curl, Dig, Gobuster)"]
Docker -.-> AnalysisBox["Analysis Sandbox (Air-Gapped: Network None)"]
end
subgraph "Structured Telemetry & Audit"
Docker --> Parsers["4. Output Parsers (XML / Regex to JSON)"]
Parsers --> StructuredJSON["Structured JSON Findings"]
Tool --> Audit["5. Audit Logger (aiosqlite)"]
Audit --> SQLite[("SQLite Database audit.db")]
end
StructuredJSON --> Agent๐ ๏ธ Registered Tools
Tool | Risk Level | Sandbox Image | Network Isolation | Description |
| MEDIUM |
|
| Port scanning, service fingerprinting, and version detection. |
| LOW |
|
| Queries DNS records ( |
| LOW |
|
| WHOIS domain registration and registrar discovery. |
| LOW |
|
| HTTP header inspection, security header audit, and server profiling. |
| MEDIUM |
|
| Path and endpoint discovery using wordlists via |
| LOW |
|
| MD5, SHA1, and SHA256 file hashing inside an unnetworked sandbox. |
๐ MCP Resources & Prompts
Resources
audit://recent: Inspect the latest cybersecurity tool executions.audit://session/{session_id}: Review the complete forensic audit trail for an investigation.policy://rules: Read current security policies and target allowlists.
Prompts
investigate_target: Guided multi-phase reconnaissance workflow (DNS โ Nmap โ HTTP โ Directory Scan โ Summary).quick_recon: Fast passive/semi-passive discovery prompt.web_assessment: Web application security posture & header audit prompt.
๐ Getting Started
1. Prerequisites
Python 3.11+
Docker Engine installed and running
2. Installation
Clone and install dependencies:
git clone https://github.com/allalg/CyberSec-MCP.git
cd CyberSec-MCP
pip install -e ".[dev]"3. Build Sandbox Images
make build-sandboxesOr manually:
docker build -t cybersec-mcp/nmap:latest sandboxes/nmap
docker build -t cybersec-mcp/web-tools:latest sandboxes/web
docker build -t cybersec-mcp/analysis:latest sandboxes/analysis4. Running the Isolated Test Lab (Optional)
Start a local, deliberately vulnerable environment for safe testing:
make lab-upTargets 172.28.0.10 (Web) and 172.28.0.20 (SSH) will become accessible for testing.
๐ Connecting to AI Agents
Add to your Claude Desktop or Cursor MCP configuration (mcp.json):
{
"mcpServers": {
"cybersec": {
"command": "python",
"args": ["-m", "server.main"],
"cwd": "/path/to/CyberSec-MCP",
"env": {
"LOG_LEVEL": "INFO",
"AUDIT_DB_PATH": "audit.db",
"MAX_CONCURRENT_SANDBOXES": "3"
}
}
}
}๐งช Testing
Run the full pytest suite:
pytest -vAll 35 unit and integration tests validate:
Pydantic models and data validation
Input sanitization & shell injection rejection
Policy engine allowlist and blocked flag enforcement
Output parsers (Nmap XML, dig, whois, curl, gobuster)
Sandbox manager concurrency and profile isolation
Asynchronous SQLite audit logging
โ๏ธ License
Released under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Pay-per-call cybersecurity for AI agents: vuln scans, threat intel, compliance, code security.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Context and control for any AI. Agent identity, scoped access, and proof across tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides sandboxed code execution for AI agents with support for Python, JavaScript, and shell commands. Includes comprehensive safety features like destructive pattern blocking, timeout protection, and restricted file access for secure production use.11 npm40 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceProvides isolated sandbox environments for AI agents to execute code securely, generating signed receipts for every execution to ensure auditability and trust.24 npm4MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to safely execute commands, run tests, and modify project files inside disposable, policy-enforced Docker sandboxes that are isolated from the host machine and its credentials.15MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to safely run commands, install dependencies, test, and modify code inside disposable, policy-enforced Docker sandboxes isolated from the host, returning results and diffs.15MIT