--- license: cc-by-nc-4.0 tags: - mcp - cursor - claude-desktop - sre - ast-guard - apple-mlx - mac-ready - security - agent-highway - zero-risk - spitzenprodukt size_categories: - n<1K task_categories: - text-generation language: - en - de pretty_name: Destructive CLI Bash & PowerShell Safety Interceptor MCP --- # ๐Ÿ›ฃ๏ธ Destructive CLI Bash & PowerShell Safety Interceptor MCP > **Official Turnkey Model Context Protocol (MCP) Guard & Fine-Tuning Suite (FAANG v2.5 Gold Standard)** --- > ### โš–๏ธ Dual-Licensing & Fair-Use Compliance Notice > * **Community & Evaluation License (`CC-BY-NC-4.0`):** This evaluation repository is **100% free** for academic research, education, personal experimentation, and local evaluation. > * **Commercial & Enterprise License:** Any integration into commercial software, SaaS applications, proprietary models, or corporate pipelines requires a valid commercial license from [emgena.com/trainingslager](https://emgena.com/trainingslager?product=destructive_cli_bash_powershell_safety_interceptor_mcp&coupon=LAUNCH20). > * **Developer Tooling & Regulatory Clarification:** Client-side deterministic policy control software only. Emgena provides no financial, legal, medical, or custodian services. > * **Launch Discount:** Use code **`LAUNCH20`** at checkout for 20% off all commercial tiers (Single, Team, Enterprise). --- ## ๐Ÿ“ฆ What is Included in this Package This repository contains the **full 500-sample verified dataset** and in-IDE guardrails: 1. **Parquet & JSONL Datasets (`destructive_cli_bash_powershell_safety_interceptor_mcp.parquet`, `chatml_format.jsonl`):** - 500 verified multi-turn trajectories across 30 production incidents. - **100% AST Invariance:** Zero syntax errors (validated via `ast.parse()`). 2. **Deterministic MCP Engine (`server.py` & `server_free.py`):** - Zero-dependency stdio engine (<0.15ms latency, 100% offline). - Compatible with **Cursor IDE**, **Claude Desktop**, and **VS Code**. 3. **Dual Fine-Tuning Recipes:** - **Apple Silicon Mac (`train_mlx.py`):** Native LoRA fine-tuning for M1/M2/M3/M4 unified memory in 15 minutes. - **Nvidia CUDA (`train_lora_unsloth.py`):** 4-bit QLoRA fine-tuning on RTX 4090 / 5090 / Colab. 4. **Active AST Tools:** - `execute_tool('ast_parse_shell_command')`: Parses Bash and PowerShell command strings into structured AST before execution. - `execute_tool('block_dangerous_recursions')`: Blocks destructive patterns like rm -rf /, format, mkfs, dd, and system reboot commands. - `execute_tool('require_human_in_the_loop_for_destructive')`: Forces explicit developer interactive approval before executing high-impact commands. - `execute_tool('whitelist_safe_developer_commands')`: Maintains zero-overhead fast-path whitelist for common commands (git status, pytest, ls). - `execute_tool('detect_obfuscated_command_piping')`: Detects base64-encoded or piped curl-to-bash execution strings designed to evade rules. - `execute_tool('enforce_working_directory_boundary')`: Ensures commands cannot operate outside designated project workspace folder. - `execute_tool('simulate_command_filesystem_impact')`: Performs dry-run check predicting how many files would be altered by command. - `execute_tool('export_destructive_command_incident_log')`: Exports audit log of all intercepted commands and prevented system damage. --- ## ๐Ÿš€ Quickstart: Apple Silicon Fine-Tuning (MLX) ```bash pip install mlx mlx-lm python train_mlx.py ``` --- ## ๐Ÿ’ป Quickstart: Cursor IDE & Claude Desktop MCP Setup Add the following to your `.cursor/mcp.json` or `claude_desktop_config.json`: ```json { "mcpServers": { "destructive_cli_bash_powershell_safety_interceptor_mcp": { "command": "python", "args": ["server.py"] } } } ``` --- ## โš–๏ธ License & Commercial Deployment Distributed under **Creative Commons Attribution-NonCommercial 4.0 International (`CC-BY-NC-4.0`)**. For commercial enterprise deployment rights, BGB ยง 97 UrhG indemnification, and EU AI Act Annex IV audit certificates, visit: ๐Ÿ‘‰ **[emgena.com/trainingslager](https://emgena.com/trainingslager?product=destructive_cli_bash_powershell_safety_interceptor_mcp&coupon=LAUNCH20)**