YaraFlux is a specialized tool that helps AI assistants identify and understand digital threats by giving them a high-powered magnifying glass for computer files. It works by using "YARA rules," which are essentially descriptive patterns that help identify specific types of malware or suspicious code. By connecting this server to an AI like Claude, users can simply provide a file or a link, and the AI can automatically determine if the content matches any known threat signatures, making security analysis much more accessible to everyone. Beyond basic scanning, this MCP server provides a comprehensive toolkit for managing security signatures and performing deeper forensics. It features 19 integrated tools that allow an AI to create, update, and validate YARA rules on the fly. It can extract hidden strings from binary files, provide hexadecimal views for low-level inspection, and even import community-driven rules from the ThreatFlux repository. This functionality transforms a standard AI conversation into a sophisticated security workspace capable of detailed file metadata extraction and threat hunting. For developers and security engineers, YaraFlux offers a robust, modular architecture designed to bridge the gap between Large Language Models and professional-grade security engines. It supports flexible storage backends, ranging from local file systems to S3-compatible solutions, and ensures secure operations through JWT authentication and containerized execution. By exposing standardized tools for rule compiling and scanning, it enables developers to build automated, intelligent security workflows where the AI can handle the heavy lifting of pattern matching and data analysis at scale.
Category: Developer Tools & Code Intelligence
Tags: cybersecurity, forensics, malware, threat-hunting, yara
bash # Pull the latest Docker image docker pull threatflux/yaraflux-mcp-server:latest # Run the container docker run -p 8000:8000 \ -e JWT_SECRET_KEY=your-secret-key \ -e ADMIN_PASSWORD=your-admin-password \ -e DEBUG=true \ threatflux/yaraflux-mcp-server:latest Option B: Building Docker from Source bash git clone https://github.com/ThreatFlux/YaraFlux.git cd YaraFlux/ docker build -t yaraflux-mcp-server:latest . docker run -p 8000:8000 \ -e JWT_SECRET_KEY=your-secret-key \ -e ADMIN_PASSWORD=your-admin-password \ -e DEBUG=true \ yaraflux-mcp-server:latest Option C: Installation from Source (Python 3.13+) bash git clone https://github.com/ThreatFlux/YaraFlux.git cd YaraFlux/ make install make runclaude_desktop_config.json file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS): json { "mcpServers": { "yaraflux-mcp-server": { "command": "docker", "args": [ "run", "-i", "--rm", "--env", "JWT_SECRET_KEY=your-secret-key", "--env", "ADMIN_PASSWORD=your-admin-password", "--env", "DEBUG=true", "--env", "PYTHONUNBUFFERED=1", "threatflux/yaraflux-mcp-server:latest" ], "disabled": false, "autoApprove": [ "scan_url", "scan_data", "list_yara_rules", "get_yara_rule" ] } } }list_yara_rules: List available rules with filtering options. - get_yara_rule: Get a specific rule's content and metadata. - validate_yara_rule: Validate YARA rule syntax. - add_yara_rule: Create a new YARA rule. - update_yara_rule: Update an existing YARA rule. - delete_yara_rule: Delete a YARA rule. - import_threatflux_rules: Import rules from the ThreatFlux GitHub repository. Scanning Tools - scan_url: Scan content from a URL with specified YARA rules. - scan_data: Scan provided data (base64 encoded). - get_scan_result: Retrieve detailed results from a previous scan. File Management - upload_file: Upload a file for analysis or scanning. - get_file_info: Get metadata about an uploaded file. - list_files: List uploaded files with pagination and sorting. - delete_file: Delete an uploaded file. - extract_strings: Extract ASCII/Unicode strings from a file. - get_hex_view: Get hexadecimal view of file content. - download_file: Download an uploaded file. Storage Management - get_storage_info: Get storage usage statistics. - clean_storage: Remove old files to free up space.import_threatflux_rules tool to pull in the latest community signatures and scan_data to perform an instant analysis. The AI can then interpret the YARA matches, explain what specific malware family the file belongs to, and suggest containment steps. Example: 1. User: "I found this suspicious .exe in an email. Can you check it for malware?" (Uploads file) 2. AI: Uses upload_file to store the sample, then scan_data against the ThreatFlux rule repository. 3. AI: "The scan matched the Emotet_Banker_Loader rule. Based on the hex strings found by get_hex_view, this file is designed to inject code into explorer.exe. You should isolate the source machine immediately." ---validate_yara_rule to check for syntax errors and scan_data to test the rule against the sample in real-time. If the rule fails, the AI can use extract_strings to see how the file content is actually represented (ASCII vs. Unicode) and suggest fixes. Example: 1. User: "Help me write a rule to detect this specific ransomware note." 2. AI: Uses extract_strings on the provided sample to find unique phrases. 3. AI: Generates a rule and runs validate_yara_rule. If it passes, it runs scan_data to confirm a match. 4. AI: "The rule is ready. I've optimized the regex to handle both ASCII and Wide string formats found in the sample." ---Part of MCP Servers