mamcp
Provides static analysis capabilities for .NET samples, including .NET metadata, suspicious framework APIs, P/Invoke, obfuscator hints, and #US user strings.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mamcp
MCP servers that let an LLM analyse malware the way an analyst does: unpack the delivery chain, read the code, detonate safely, and write an evidence-backed report.
mamcp(static): parses a sample and exposes granular, paginated tools to triage it, follow what it carries, and read its code through Ghidra's decompiler. It never runs the sample.mamcp-dynamic(dynamic): runs the sample in a sandbox and returns its behaviour in one normalised format. Built in: Speakeasy Windows emulation (no VM needed), CAPEv2, and a Linux container sandbox for ELF on any architecture. Other sandboxes plug in.
Formats: PE (incl. .NET), ELF, Mach-O, raw shellcode, Office documents (OLE, OOXML, RTF), PDF, LNK shortcuts, scripts (PowerShell, JScript, VBScript, batch, HTA, shell, Python) and Inno Setup installers, including inside zip, 7z, tar, gzip and ISO archives, nested or password-protected.
Install
You need:
Docker: Docker Desktop on macOS or Windows, Docker Engine on Linux. Give it at least 8 GB of memory (Docker Desktop → Settings → Resources); capa and FLOSS need several GB each on large samples.
An MCP client: Claude Code, Claude Desktop, Cursor, VS Code...
Windows: use WSL2. The launch scripts are bash.
git clone https://github.com/sudhanvarao28/malwareAnalysisMcpToolkit.git mamcp
cd mamcp
docker build -t mamcp . # ~2 GB with Ghidra, capa, FLOSS, YARA rules, Speakeasy; 10–20 min the first time
mkdir -p samplesThere's nothing to install on the host besides Docker: both servers run in
the image, launched by scripts/mamcp-docker.sh and scripts/mamcp-dynamic-docker.sh.
Related MCP server: Reverence
Connect your client
Claude Code: run claude in the mamcp folder. .mcp.json registers both
servers. Approve mamcp and mamcp-dynamic when Claude Code asks; if you
dismiss the prompt, the tools won't appear (run /mcp to check them). The
malware-analysis skill in .claude/skills/ loads automatically. Don't want
dynamic analysis? Don't approve mamcp-dynamic, or remove it from .mcp.json.
Other clients: add both servers with absolute paths:
// Claude Desktop: claude_desktop_config.json Cursor: .cursor/mcp.json
{
"mcpServers": {
"mamcp": { "command": "bash", "args": ["/path/to/mamcp/scripts/mamcp-docker.sh"] },
"mamcp-dynamic": { "command": "bash", "args": ["/path/to/mamcp/scripts/mamcp-dynamic-docker.sh"] }
}
}// VS Code: .vscode/mcp.json
{
"servers": {
"mamcp": { "type": "stdio", "command": "bash", "args": ["/path/to/mamcp/scripts/mamcp-docker.sh"] },
"mamcp-dynamic": { "type": "stdio", "command": "bash", "args": ["/path/to/mamcp/scripts/mamcp-dynamic-docker.sh"] }
}
}For agents that support Agent Skills, copy or link skills/malware-analysis/
into their skills folder (for Claude Code in other projects, ~/.claude/skills/).
It tells the agent when and how to use the tools. Clients without prompts or
skills can still use every tool: paste the text of the analyze_sample prompt
(src/mamcp/prompts.py) as instructions.
Analyse a sample
Put the sample in
samples/. Keep it zipped (the usualinfectedpassword is fine): mamcp unpacks archives in memory, and antivirus on your machine may quarantine an extracted sample.Ask in plain language, for example:
"Analyse sample.zip and write a report."
"Quick triage of invoice.zip: is it malicious, and what does it contact?"
"This installer is suspicious. What does it actually install, and what runs?"
Or run the full workflow as a prompt:
/mcp__mamcp__analyze_sample sample.zip(adddepth: quickfor triage only).
The agent works through the delivery chain (archive → document, shortcut,
script or installer → payload), reads the code, detonates in Speakeasy with no
network, extracts IOCs, writes and tests a YARA rule, and saves the report to
reports/<sha256-prefix>_<name>.md. The first deep run on a sample takes a
few minutes (capa, FLOSS and Ghidra); results are cached afterwards.
Nothing needs configuring for this. Configuration covers the extras: public hash lookups, your own YARA rules, CAPE and the Linux sandbox.
Update
git pull && docker build -t mamcp .Then restart your MCP client: running servers keep the old image until they restart.
Troubleshooting
Symptom | Fix |
The mamcp tools don't appear | Approve both servers ( |
capa or FLOSS "was killed (SIGKILL)" | Docker is out of memory: raise its memory limit to 8 GB or more |
New tools or fixes missing after an update | Restart the client after |
Your | The folder is mounted at start-up: restart the client after creating it |
An extracted sample vanished from | Your antivirus quarantined it: keep samples zipped, or exclude the folder |
| Add an API key to |
A Ghidra call says another instance is busy | Wait a minute and retry: another client is analysing the same sample |
Security
The servers run in a container with no network, a read-only root filesystem,
read-only sample and rule mounts, no capabilities, no-new-privileges and a
non-root user. Everything taken from a sample is escaped, length-capped and
marked as untrusted, so text in the sample can't pose as instructions. Tool
responses are size-capped. Read docs/THREAT_MODEL.md
for the boundaries and the risks that remain. In short: for targeted samples,
run mamcp inside a VM, and treat the model's verdict as a draft to check
against the evidence it cites.
Static tools (mamcp)
Tool | Purpose |
| Find and load samples; archives unpacked in memory ( |
| Archive or disk-image members, without loading them |
| Headers, hashes, timestamps, signatures, overlay, plain-language |
| Sections/segments with permissions and entropy; block entropy map |
| Imports tagged by behaviour (injection, network, crypto, anti-debug...) |
| PE resources with entropy and content type |
| .NET metadata, suspicious APIs, P/Invoke, obfuscator hints, #US strings |
| Strings with IOC tags, regex filter, pagination; hex dump at offset, VA or RVA |
| Capabilities mapped to ATT&CK and MBC; stack, tight and decoded strings |
| Community + your rules; check a new rule against the sample and a clean corpus |
| Office/RTF: VBA and XLM macros, auto-exec, VBA stomping, remote templates, DDE, embedded objects |
| Risky keywords, JavaScript (incl. in object streams), actions, URIs, embedded files, appended data |
| Shortcut command line, icon, window style, builder fingerprints (machine id, MAC) |
| Language, risky constructs, obfuscation signals, statically decoded layers (base64, |
| Inno Setup installers (incl. 7.x): files it installs, hash-verified against the installer's own record, the compiled |
| Load a file embedded in a document or PDF, or installed by an installer, as a sample of its own |
| Import and auto-analyse in Ghidra (background; shellcode via |
| Functions filterable by capability; C output; listings |
| Who calls what, call trees, which code uses a string |
| One call: everything cheap (or |
| Deduplicated, defanged IOCs from every source, including saved dynamic runs |
| STIX 2.1 bundle or MISP event with TLP marking |
Prompt: analyze_sample(target, depth) drives the full workflow and report template.
Dynamic tools (mamcp-dynamic)
Tool | Purpose |
| What public sandboxes already know about the hash (nothing is uploaded; needs API keys) |
| Available backends and what each can do |
| Load a sample, a file from inside an installer or document, or ( |
| Run it, optionally with fake C2 |
| Progress and a summary of the run |
| Drill down: API trace, DNS/HTTP/connections, files and registry, strings decoded in memory |
| Unpacked code and dropped files, saved under |
Read docs/DYNAMIC.md for the backends (Speakeasy, CAPE and Linux), choosing a sandbox for Windows or Linux samples, the safety defaults, and writing your own backend plugin.
Inflated samples (megabytes of zero padding to slip past size-limited
scanners) are flagged by get_overview, and FLOSS runs on a de-padded copy
with a byte-identical memory image.
Configuration
Settings come from MAMCP_* environment variables or ./mamcp.toml, which the
Docker scripts mount read-only. Copy mamcp.toml.example, which lists every
setting with its default. Environment variables win. Common ones:
Setting | Default | |
| 60000 | Per tool response; longer lists are trimmed with a note on how to paginate |
| 900 | Seconds |
| all installed | Which dynamic backends to enable |
| false | Opt-ins for dynamic analysis |
| Hash lookups ( | |
| CAPE backend: real Windows VMs | |
| Linux sandbox agent ( |
Hash lookups, CAPE and the Linux agent need network access from the dynamic
server's container: set MAMCP_SANDBOX_NETWORK=1 for it, either with
"env": {"MAMCP_SANDBOX_NETWORK": "1"} on the mamcp-dynamic entry in your
client's MCP config, or exported before starting the client. The sample itself still never gets real network unless you also
set allow_internet. Setting these up is covered in docs/DYNAMIC.md.
Your own YARA rules go in ./rules/. They're scanned with the bundled
YARA-Forge set, and mounted when the server starts, so restart it after
creating the directory. Known-clean binaries in ./goodware/ strengthen
test_yara_rule's false-positive check.
Custom rules
File | Rule | Covers |
|
| GreenCat / WEBC2 (APT1) backdoor: command table, fake "Invalid Hostname" idle page, usage strings |
| Its C2 |
Evaluation
evals/ scores mamcp against samples with known answers. The tools mode
checks the tools surface the expected IOCs, techniques and facts (no LLM).
The agent mode scores the reports an agent writes, plus turns and cost.
Use it before and after a change. See evals/README.md.
cp evals/cases.example.toml evals/cases.toml # then add your corpus
scripts/eval-in-docker.sh # tools mode
python evals/run.py agent # end to end with Claude Code (needs the dev install below)Development
python3 -m venv .venv && .venv/bin/pip install -e ".[dev,dynamic]"
scripts/fetch-rules.sh # capa-rules + YARA-Forge into .cache/rules (needs git, curl, unzip)
.venv/bin/pytest # add -m "not slow" to skip capa/FLOSS runs
scripts/test-in-docker.sh # full suite inside the image, including GhidraCI (.github/workflows/ci.yml) runs the fast suite on every push and pull
request, and the full suite inside the built image. Tests use benign inputs
only: pip's PE launchers, pythonnet's .NET DLL, a tiny C file compiled by
clang, and documents, archives and scripts built in code with the structures
malware uses. No malware lives in this repo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Scan PDFs, Office docs, and RAG files for malware exploits, macros, CVEs, and AI prompt injection.
12 Binary/Forensics MCP tools: entropy triage, ELF/PE/WASM disasm, PCAP, EXIF, SQLite, ZIP.
Signed sandbox verdicts on any artifact, plus an agent marketplace. No key, no signup, no payment.
Evidence-oriented REA + Ghidra static-analysis workflows, read-only PE32 and Delphi VMT tools.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely fetch malware samples, run isolated headless Ghidra static analysis, and retrieve decompiled function logic, imports, and strings through callable MCP tools.MIT
- AlicenseAqualityCmaintenanceGives MCP clients such as Claude Code and OpenCode a static-analysis toolbox for binaries, executables, DLLs, shared objects, and web-app code, covering file identification and hashing, string extraction, PE/ELF/Mach-O/WASM parsing, disassembly, Ghidra decompilation, YARA scanning, and JavaScript deobfuscation. All inspection is read-only and never executes the target.16MIT
- AlicenseAqualityBmaintenanceEnables AI agents to run read-only static reverse-engineering tasks — binary triage, symbol and import inventory, per-function decompilation, and Android native-lib analysis — with untrusted samples confined to a no-network bubblewrap chamber that never executes the target.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and CLI users to statically inspect any binary offline — identifying file type, architecture, imports, packing, embedded content and signatures — and to diff two files to see exactly what changed. It works on ELF, PE and Mach-O executables, firmware dumps and calibration files without ever running them, reporting observations and inferences with file offsets as evidence.104 npm1MIT