Skip to main content
Glama
Malware Analysis MCP Server

Malware Analysis MCP Server

by SaeidSec

Advanced Malware Analysis MCP Server

Advanced Malware Analysis Banner

CI

A professional, modular, and secure Model Context Protocol (MCP) server providing real-time threat intelligence and malware sample metadata for AI assistants (like Claude, Cursor, and Windsurf).

It integrates MalwareBazaar, VirusTotal, and Telegram, along with 10+ offline analysis and crypto utilities, enabling AI models to autonomously aid in defensive malware research.

🔒 Security First: This server provides metadata and IOCs only. The downloading of live malware binaries is permanently disabled by design. Path traversal protections ensure safe local file hashing.


🌟 Capabilities

  • Real-Time Threat Intel: Query MalwareBazaar for recent samples, info by hash, or tags.

  • VirusTotal Integration: Pull analysis stats, reputation, and file types with built-in API rate limiting.

  • Advanced IOC Extraction: Extract and defang/refang IPs, Domains, URLs, Hashes, and Emails from unstructured text.

  • YARA generation: Ask the AI to generate a template YARA rule based on a sample's exact signatures.

  • Offline Crypto Lab: AES-GCM encryption (PBKDF2 600k iterations), SHA256/MD5 hashing, Shannon entropy analysis, and Hexdumps.

  • Alerting: Dispatch findings directly to a Telegram channel.

  • Secure Local Hashing: safely compute the SHA256 of local files to check against threat databases, strictly chrooted to allowed directories.


Related MCP server: Google Threat Intelligence MCP Server

🚀 A-to-Z Installation & Deployment Guide

This server works with any standard MCP client. Below are instructions for building the project and deploying it either to Claude Desktop (Mac/Windows) or testing it visually on Linux/Ubuntu using the MCP Inspector.

Step 1: Prerequisites & Build

Ensure you have Node.js (v18 or newer) installed on your machine.

# 1. Clone the repository
git clone https://github.com/SaeidSec/Malware-Analysis-MCP-server.git
cd Malware-Analysis-MCP-server

# 2. Install dependencies
npm install

# 3. Build the TypeScript files
npm run build

Step 2: Obtain API Keys

  • MB_AUTH_KEY (Required): Get your free Auth-Key at auth.abuse.ch.

  • VT_API_KEY (Optional): VirusTotal API for vt_lookup. The free tier works perfectly (the server handles the 4 requests/minute limit).

  • TG_BOT_TOKEN & TG_CHAT_ID (Optional): Telegram bot token and chat ID for the send_alert tool.

  • ALLOWED_SCAN_DIRS (Highly Recommended): A comma-separated list of absolute paths (e.g., /home/user/Downloads,/tmp/malware). This strictly limits the check_local_file tool to prevent the AI from arbitrarily hashing personal files.


Deployment Option A: Claude Desktop (Mac / Windows)

Claude Desktop is currently the most popular way to use MCP servers.

  1. Open your Claude Desktop config file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. Add the server configuration, pointing to your local built dist/index.js:

{
  "mcpServers": {
    "malware-analysis-mcp": {
      "command": "node",
      "args": [
        "/absolute/path/to/Malware-Analysis-MCP-server/dist/index.js"
      ],
      "env": {
        "MB_AUTH_KEY": "YOUR_ABUSECH_AUTH_KEY",
        "VT_API_KEY": "YOUR_VT_API_KEY",
        "ALLOWED_SCAN_DIRS": "/Users/name/Downloads,/tmp/malware"
      }
    }
  }
}
  1. Restart Claude Desktop completely. You can now prompt Claude to use your new threat intelligence tools!


Deployment Option B: Linux / Ubuntu (Web GUI via MCP Inspector)

Since Claude Desktop does not have an official Linux client yet, the best way to deploy and test the server on Ubuntu is using Anthropic's official MCP Inspector.

  1. Create your environment variable file from the example:

cp example.env .env
nano .env # Add your API keys here
  1. Run the MCP server directly into the Inspector:

npx -y @modelcontextprotocol/inspector node dist/index.js
  1. Open the provided http://localhost:5173 link in your web browser and click Connect. You will be presented with a beautiful UI where you can visually test tools like get_recent or extract_iocs manually.


🛠️ Available MCP Tools

Threat Intelligence

  • get_recent - Fetch latest MalwareBazaar entries

  • get_info - Fetch precise sample metadata by SHA256

  • get_taginfo - Fetch samples by tag (e.g., "TrickBot")

  • virustotal_lookup - VT V3 detection stats and reputation

  • suggest_analysis_blogs - Links to Malpedia, MITRE, and writeups

Advanced Analysis

  • extract_iocs - Pulls domains, IPs, MS5/SHA256, Emails from text

  • bulk_hash_check - Check multiple hashes against MalwareBazaar at once

  • threat_summary - Generates a curated Markdown report for a specific sample

  • generate_yara_template - Creates a starting point for YARA rules based on metadata

  • defang_iocs / refang_iocs - Safe IOC sharing (e.g., 1[.]1[.]1[.]1)

  • check_local_file - Securely hash a local file and query VT/MB

Offline Lab Utilities

  • Encoding: base64_encode, base64_decode, url_encode, url_decode, hex_encode, hex_decode

  • Compression: gzip_compress, gzip_decompress

  • Crypto: aes_gcm_encrypt, aes_gcm_decrypt, hash_text

  • Analysis: entropy (Shannon), hexdump_text

Alerting

  • send_alert - Push message to Telegram (TG_BOT_TOKEN and TG_CHAT_ID env vars required)


🔒 Security Architecture

  1. No Live Binaries: The get_file tool is disabled. The server cannot be tricked into executing or saving payload binaries.

  2. Path Traversal Protection: Requests to check_local_file are resolved, normalized, and strictly checked against ALLOWED_SCAN_DIRS.

  3. Hardened Crypto: The AES implementation uses PBKDF2 with 600,000 iterations (OWASP 2023 standard) and 16-byte random salts.

  4. Rate Limiting: Protects your free-tier VirusTotal API key from accidental exhaustion by looping LLMs.

  5. Streaming Hashing: Memory-safe streaming is used for hashing local files, preventing gigabyte-scale OOM crashes.


🧑‍💻 Development

# Install dependencies
npm install

# Run typechecker
npm run typecheck

# Build the project
npm run build

# Run in dev mode
npm run dev

See CONTRIBUTING.md for full guidelines.

License

MIT License. See LICENSE for details.

Available Tools

29 tools
aes_gcm_decryptD

Inputs: envelope (required), password (required).

aes_gcm_encryptD

Inputs: password (required), salt, text.

base64_decodeD

Inputs: base64.

base64_encodeD

Inputs: text.

bulk_hash_checkD

Inputs: hashes (required).

check_local_fileD

Inputs: path (required), vt.

defang_iocsD

Inputs: text (required).

entropyD

Inputs: text.

extract_iocsD

Inputs: text (required), defang_output.

generate_yara_templateD

Inputs: rule_name (required), hash, author, description.

get_fileD

Inputs: no named parameters.

get_infoD

Inputs: hash (required).

get_recentD

Inputs: limit, selector.

get_taginfoD

Inputs: tag (required), limit.

gzip_compressD

Inputs: text.

gzip_decompressD

Inputs: base64.

hash_textD

Inputs: alg (required), text.

helpD

Inputs: no named parameters.

hex_decodeD

Inputs: hex.

hexdump_textD

Inputs: text, limitBytes.

hex_encodeD

Inputs: text.

refang_iocsD

Inputs: text (required).

send_alertD

Inputs: message (required), useMarkdown.

suggest_analysis_blogsD

Inputs: hash, signature.

threat_summaryD

Inputs: hash (required).

url_decodeD

Inputs: text.

url_encodeD

Inputs: text.

virustotal_lookupD

Inputs: hash (required).

vt_lookupD

Inputs: hash (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.5/5.0

    Scored across 29 tools

    Disambiguation2/5

    Several tools have vague or overlapping purposes, especially get_recent, get_info, get_taginfo, virustotal_lookup, and vt_lookup. The lack of descriptions makes it hard to distinguish similar-sounding intel lookup and generic retrieval tools from one another.

    Naming Consistency3/5

    Most names use snake_case, which is readable, but the set mixes verb_noun patterns with noun-only names like entropy and hexdump_text. Abbreviation inconsistency between virustotal_lookup and vt_lookup weakens predictability.

    Tool Count2/5

    At 29 tools, the server is heavy for a malware analysis utility surface and includes apparent duplication. The encoding, compression, hashing, and crypto operations could likely be grouped or reduced.

    Completeness4/5

    The tool set broadly covers threat intel lookup, local file checks, encoding, hashing, entropy, IOC handling, YARA templating, and alerting. It lacks obvious dynamic analysis or sandbox detonation capabilities, but the core analysis utility surface is fairly comprehensive.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to execute malware analysis tools on a REMnux system via Docker, SSH, or local connections. It provides automated file-type analysis, structured tool discovery, and security guardrails for streamlined malware investigation.
      12
      1,035 npm
      141
      GPL 3.0
    • F
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to access Google's Threat Intelligence suite for file analysis, indicator of compromise searches, and reputation checking. It supports both local and cloud-based deployments for investigating campaigns, threat actors, and malware families.
      36
      4
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to perform digital forensics analysis including memory analysis, file metadata inspection, and threat-intelligence lookups.
      8 npm
      ISC