YaraFlux MCP 服务器 logo

YaraFlux MCP 服务器

Organization
ThreatFlux

A yara based MCP Server

PublisherThreatFlux
RepositoryYaraFlux
LanguagePython
Forks
6
Stars
23
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    YaraFlux MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    23 stars and 6 forks from the linked repository.

YaraFlux MCP Server

GitHub release (latest by date) CI codecov Codacy Badge License: MIT Python Version FastAPI MCP Code style: black

A Model Context Protocol (MCP) server for YARA scanning, providing LLMs with capabilities to analyze files with YARA rules.

📋 Overview

YaraFlux MCP Server enables AI assistants to perform YARA rule-based threat analysis through the standardized Model Context Protocol interface. The server integrates YARA scanning with modern AI assistants, supporting comprehensive rule management, secure scanning, and detailed result analysis through a modular architecture.

🧩 Architecture Overview

+------------------------------------------+
|              AI Assistant                |
+--------------------+---------------------+
                    |
                    | Model Context Protocol
                    |
+--------------------v---------------------+
|              YaraFlux MCP Server         |
|                                          |
|  +----------------+    +---------------+ |
|  | MCP Server     |    | Tool Registry | |
|  +-------+--------+    +-------+-------+ |
|          |                     |         |
|  +-------v--------+    +-------v-------+ |
|  | YARA Service   |    | Storage Layer | |
|  +----------------+    +---------------+ |
|                                          |
+------------------------------------------+
          |                   |
 +-----------------+  +---------------+
 | YARA Engine     |  | Storage       |
 | - Rule Compiling|  | - Local FS    |
 | - File Scanning |  | - MinIO/S3    |
 +-----------------+  +---------------+

YaraFlux follows a modular architecture that separates concerns between:

  • MCP Integration Layer: Handles communication with AI assistants
  • Tool Implementation Layer: Implements YARA scanning and management functionality
  • Storage Abstraction Layer: Provides flexible storage options
  • YARA Engine Integration: Leverages YARA for scanning and rule management

For detailed architecture diagrams, see the Architecture Documentation.

✨ Features

  • 🔄 Modular Architecture

    • Clean separation of MCP integration, tool implementation, and storage
    • Standardized parameter parsing and error handling
    • Flexible storage backend with local and S3/MinIO options
  • 🤖 MCP Integration

    • 19 integrated MCP tools for comprehensive functionality
    • Optimized for Claude Desktop integration
    • Direct file analysis from within conversations
    • Compatible with latest MCP protocol specification
  • 🔍 YARA Scanning

    • URL and file content scanning
    • Detailed match information with context
    • Scan result storage and retrieval
    • Performance-optimized scanning engine
  • 📝 Rule Management

    • Create, read, update, delete YARA rules
    • Rule validation with detailed error reporting
    • Import rules from ThreatFlux repository
    • Categorization by source (custom vs. community)
  • 📊 File Analysis

    • Hexadecimal view for binary analysis
    • String extraction with configurable parameters
    • File metadata and hash information
    • Secure file upload and storage
  • 🔐 Security Features

    • JWT authentication for API access
    • Non-root container execution
    • Secure storage isolation
    • Configurable access controls

🚀 Quick Start

Using Docker Image

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
### Using Docker building from source

```bash
# Clone the repository
git clone https://github.com/ThreatFlux/YaraFlux.git
cd YaraFlux/

# Build the Docker image
docker build -t 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 \
  yaraflux-mcp-server:latest

Installation from Source

bash
# Clone the repository
git clone https://github.com/ThreatFlux/YaraFlux.git
cd YaraFlux/

# Install dependencies (requires Python 3.13+)
make install

# Run the server
make run

Dependency Locking

Docker images and the CI vulnerability scan install from requirements-lock.txt and requirements-dev-lock.txt — hash-pinned locks compiled from pyproject.toml (constrained by requirements.txt). pyproject.toml is the single source of truth for dependencies: runtime ones under dependencies, development ones under the dev extra (pip install -e ".[dev]"). After changing dependencies there or in requirements.txt, regenerate the locks:

bash
make lock-requirements

Commit the updated lock files with your change; CI fails if they drift from pyproject.toml.

🧩 Claude Desktop Integration

YaraFlux is designed for seamless integration with Claude Desktop through the Model Context Protocol.

  1. Build the Docker image:
bash
docker build -t yaraflux-mcp-server:latest .
  1. Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
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"
      ]
    }
  }
}
  1. Restart Claude Desktop to activate the server.

🛠️ Available MCP Tools

YaraFlux exposes 19 integrated MCP tools:

Rule Management Tools

  • list_yara_rules: List available YARA rules with filtering options
  • get_yara_rule: Get a specific YARA rule's content and metadata
  • validate_yara_rule: Validate YARA rule syntax with detailed error reporting
  • 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 ThreatFlux GitHub repository

Scanning Tools

  • scan_url: Scan content from a URL with specified YARA rules
  • scan_data: Scan provided data (base64 encoded) with specified rules
  • get_scan_result: Retrieve detailed results from a previous scan

File Management Tools

  • 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 Tools

  • get_storage_info: Get storage usage statistics
  • clean_storage: Remove old files to free up storage space

📚 Documentation

Comprehensive documentation is available in the docs/ directory:

🗂️ Project Structure

yaraflux_mcp_server/
├── src/
│   └── yaraflux_mcp_server/
│       ├── app.py                 # FastAPI application
│       ├── auth.py                # JWT authentication and user management
│       ├── config.py              # Configuration settings loader
│       ├── models.py              # Pydantic models for requests/responses
│       ├── mcp_server.py          # MCP server implementation
│       ├── utils/                 # Utility functions package
│       │   ├── __init__.py        # Package initialization
│       │   ├── error_handling.py  # Standardized error handling
│       │   ├── param_parsing.py   # Parameter parsing utilities
│       │   └── wrapper_generator.py # Tool wrapper generation
│       ├── mcp_tools/             # Modular MCP tools package
│       │   ├── __init__.py        # Package initialization
│       │   ├── base.py            # Base tool registration utilities
│       │   ├── file_tools.py      # File management tools
│       │   ├── rule_tools.py      # YARA rule management tools
│       │   ├── scan_tools.py      # Scanning tools
│       │   └── storage_tools.py   # Storage management tools
│       ├── storage/               # Storage implementation package
│       │   ├── __init__.py        # Package initialization
│       │   ├── base.py            # Base storage interface
│       │   ├── factory.py         # Storage client factory
│       │   ├── local.py           # Local filesystem storage
│       │   └── minio.py           # MinIO/S3 storage
│       ├── routers/               # API route definitions
│       │   ├── __init__.py        # Package initialization
│       │   ├── auth.py            # Authentication API routes
│       │   ├── files.py           # File management API routes
│       │   ├── rules.py           # YARA rule management API routes
│       │   └── scan.py            # YARA scanning API routes
│       ├── yara_service.py        # YARA rule management and scanning
│       ├── __init__.py            # Package initialization
│       └── __main__.py            # CLI entry point
├── docs/                          # Documentation
├── tests/                         # Test suite
├── Dockerfile                     # Docker configuration
├── entrypoint.sh                  # Container entrypoint script
├── Makefile                       # Build automation
├── pyproject.toml                 # Project metadata, runtime deps, and the `dev` extra
├── requirements.txt               # Core dependency floors (also constrains the locks)
├── requirements-lock.txt          # Hash-pinned runtime lock (Docker build + security scan)
└── requirements-dev-lock.txt      # Hash-pinned runtime + dev lock (test image + security scan)

🧪 Development

Local Development

bash
# Set up development environment
make dev-setup

# Run tests
make test

# Code quality checks
make lint
make format
make security-check

# Generate test coverage report
make coverage

# Run development server
make run

CI/CD Workflows

This project uses GitHub Actions for continuous integration and deployment:

  • CI Tests: Runs on every push and pull request to main and develop branches

    • Runs tests, formatting, linting, and type checking
    • Builds and tests Docker images
    • Uploads test coverage reports to Codecov
  • Version Auto-increment: Automatically increments version on pushes to main branch

    • Updates version in pyproject.toml, setup.py, and Dockerfile
    • Creates git tag for new version
  • Publish Release: Triggered after successful version auto-increment

    • Builds Docker images for multiple stages
    • Generates release notes from git commits
    • Creates GitHub release with artifacts
    • Publishes Docker images to Docker Hub

These workflows ensure code quality and automate the release process.

Status Checks

The following status checks run on pull requests:

  • ✅ Format Verification: Ensures code follows Black and isort formatting standards
  • ✅ Lint Verification: Validates code quality and compliance with coding standards
  • ✅ Test Execution: Runs the full test suite to verify functionality
  • ✅ Coverage Report: Ensures sufficient test coverage of the codebase

🌐 API Documentation

Interactive API documentation available at:

For detailed API documentation, see API Reference.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

💖 Donate or Ask for Features

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "threatflux-yaraflux": {
      "command": "npx",
      "args": [
        "-y",
        "yaraflux_mcp_server"
      ]
    }
  }
}

Use YaraFlux MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once YaraFlux MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add YaraFlux MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the YaraFlux MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "threatflux-yaraflux": {
      "command": "npx",
      "args": [
        "-y",
        "yaraflux_mcp_server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the YaraFlux MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the YaraFlux MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use YaraFlux MCP 服务器 to help me with this task?
YaraFlux MCP 服务器
Sure. I read it.
Here is what I found using YaraFlux MCP 服务器.

Frequently asked questions

What is the YaraFlux MCP 服务器 MCP server used for?

YaraFlux MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use YaraFlux MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use YaraFlux MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use YaraFlux MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With YaraFlux MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect YaraFlux MCP 服务器 MCP to TypingMind?

YaraFlux MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does YaraFlux MCP 服务器 MCP provide in TypingMind?

YaraFlux MCP 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use YaraFlux MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If YaraFlux MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇