mcp-hayabusa

mcp-hayabusa

Analyze Windows event logs (EVTX files) using Hayabusa, with tools to scan EVTX files for detections and list Hayabusa detection rules.

Category
Visit Server

README

mcp-hayabusa

Project layout

  • server.py — the MCP server entry point; both tools are defined here
  • requirements.txt — Python dependencies (mcp, pyyaml)
  • hayabusa/ — the Hayabusa binary, rule set, and config, installed by scripts/download_hayabusa.py (gitignored; not checked in)
  • scripts/download_hayabusa.py — downloads the latest Hayabusa release for the current platform and extracts it into hayabusa/
  • samples/ — sample EVTX files for manual testing (e.g. sysmon_lsass_mimikatz.evtx)
  • .mcp.json — registers the hayabusa MCP server (python server.py) for this project
  • .claude/settings.json — allowlists (enabledMcpjsonServers) the server defined in .mcp.json so Claude Code doesn't prompt for approval on every session

Setup and running locally

pip install -r requirements.txt
python scripts/download_hayabusa.py   # installs hayabusa/ (binary + rules), if not present

The server is launched by Claude Code via .mcp.json (python server.py, stdio transport) — there's no separate "start the server" step when working through Claude Code. To run/debug it standalone, python server.py starts it directly.

There is no formal test suite (no pytest config) — verify behavior by calling the tools directly, e.g.:

python -c "from server import scan_evtx; print(scan_evtx('samples/sysmon_lsass_mimikatz.evtx'))"
python -c "from server import get_hayabusa_rules; print(get_hayabusa_rules(keyword='mimikatz'))"

Note: an already-running MCP connection does not pick up server.py edits — reconnect/restart the MCP server (e.g. /mcp reconnect in Claude Code) to see code changes reflected in tool calls.

MCP tools

scan_evtx(evtx_path, min_severity="informational", rule_filter="", output_format="summary", max_results=0)

Runs hayabusa json-timeline against a single EVTX file and returns structured JSON detections.

  • Invokes the binary with -L (JSONL output), -w (no interactive wizard), -q/-N/-K (quiet, no summary table, no color codes), -C (clobber output file), -b (disable Level abbreviations) — output is written to a temp file and parsed line by line.
  • min_severity is post-filtered in Python against SEVERITY_LEVELS (informational < low < medium < high < critical), not passed to Hayabusa as a CLI flag. LEVEL_ALIASES maps abbreviated Level values back to full names as a defensive fallback.
  • rule_filter is a case-insensitive substring match against each finding's RuleTitle.
  • output_format="summary" (default) trims each finding to SUMMARY_FIELDS (Timestamp, RuleTitle, Level, Computer, Channel, EventID, RecordID, RuleID); "full" returns every field Hayabusa produced, including Details and ExtraFieldInfo.
  • max_results truncates the returned list after severity/rule filtering; the response's total_findings still reports the full filtered count so callers can tell when results were capped.
  • Scans time out after SCAN_TIMEOUT_SECONDS (600s).

get_hayabusa_rules(keyword="", max_results=100)

Lists Hayabusa's bundled Sigma/built-in detection rules by parsing every YAML file under hayabusa/rules/**/*.yml (~5000 files). Useful for discovering rule titles (to feed into scan_evtx's rule_filter) or understanding what a rule detects before scanning.

  • Parsed rule metadata (id, title, level, status, description, tags, logsource, path) is cached in _rules_cache for the life of the process — the first call takes several seconds (full YAML parse), subsequent calls are near-instant. The cache is invalidated only by restarting the server.
  • keyword is a case-insensitive substring match against title, description, rule ID, and tags.
  • max_results defaults to 100 (there are thousands of rules); 0 means no limit. Response includes total_rules, total_matched, and returned_count.
  • Malformed rule YAML, or files without a title field, are silently skipped.

Error handling conventions

Both tools return _error(message) — {"success": false, "error": "..."} — rather than raising, for: invalid enum/range arguments (min_severity, output_format, negative max_results), missing/non-file evtx_path, missing Hayabusa binary or rules directory, non-zero Hayabusa exit code, missing output file, malformed JSONL output line, subprocess timeout, and OSError/ FileNotFoundError when invoking the binary. Successful responses always include "success": true.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured