Chainsaw MCP Server
Wraps Chainsaw to triage Windows EVTX and forensic artefacts without pulling raw logs into context, exposing MCP tools for analysis, hunting, rule management, and result handling.
Inspect server status, evidence roots, installed rule counts, and list evidence files by path or pattern.
Analyse EVTX coverage/metadata, detect log time and EventRecordID gaps, build shimcache timelines with optional Amcache enrichment, and analyse SRUM databases.
Hunt evidence with Sigma and Chainsaw rules, search events by keyword, regex, or tau expressions, and dump complete record streams to JSON.
Pivot process lineage from a Sysmon ProcessGuid across explicitly scoped evidence and an exact host.
Manage detection rules: count, search, read, lint, save custom rules, delete custom rules, and inspect Sigma mappings.
Work with stored results via server-minted handles: page, summarise, discover fields, group detections by unique event, stream oversized rows/text chunks, export CSV/JSONL/text, list, and delete results.
Optionally send selected result rows to TypeSafe Jev (external API, disabled by default) for advisory classification and prioritisation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Chainsaw MCP Server triage the EVTX logs in evidence and summarize the suspicious detections"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chainsaw-mcp
An MCP server that wraps Chainsaw, the Windows forensic artefact hunting tool, so an agent can triage EVTX event logs, hunt with Sigma and Chainsaw rules, detect log tampering, and author new detection rules without ever pulling raw logs into its context.
Chainsaw release pinned: v2.16.5. MCP spec: 2026-07-28. Python mcp SDK 2.x.
Deploy as a self-contained Docker image and work remotely over authenticated HTTP. Evidence can come from read-only host/NFS/SMB mounts or resumable uploads. Investigation commands can be planned before execution or exported from recorded results for replay.
What you get
Area | Tools |
Scope |
|
Remote evidence |
|
Custody records |
|
Reproducibility |
|
Hunt |
|
Process pivots |
|
Anti-forensics / timelines |
|
Results (server-minted handles) |
|
Signed downloads |
|
Event grouping / oversized rows |
|
Rules |
|
Optional Jev assessment |
|
Resources: chainsaw://rules/{kind}/{path}, chainsaw://mappings/{name},
chainsaw://results/{handle}, chainsaw://docs/rule-format, chainsaw://config.
Prompts: triage_evtx, pivot_on_indicator, author_rule.
Hunts, searches and dumps write JSONL to CHAINSAW_OUTPUT_DIR and return a
res_<hex16> handle plus an aggregate summary and a small preview. Everything else is
paged or grouped through that handle, which keeps the server stateless in the MCP sense
while letting the agent work on tens of thousands of detections.
Pages and exports enforce encoded-JSON byte budgets with resumable offsets; previews are projected rather than full records. EVTX coverage and gap details are handle-backed. Summaries distinguish rule matches from unique source events. See result delivery and continuation.
For mounted evidence and handoffs, use signed evidence manifests and validation to record file integrity, scope and custody declarations, then preserve the signed records in the case store. These tools support custody documentation; they do not establish a complete custody history or authenticate the declared operator.
For formal incident reports, interim updates or post-incident reviews, use
$chainsaw-reporting. It reinforces triage with
a Markdown report template,
evidence and replay-export guidance, and
primary-source reporting references.
The implicit default mapping repairs Security 4688 Image translation to
NewProcessName while preserving Sysmon behavior. It derives a private cached mapping
only for the recognized pinned upstream mapping (SHA-256 checked); explicit/custom mapping
selections remain unchanged. The derived file lives under CHAINSAW_OUTPUT_DIR/.mappings/,
is content-addressed and is never swept with expired results. chainsaw_get_mapping
reports routing preconditions and translations.
Related MCP server: Windows Forensics MCP Server
Quick start
First configure TLS certificates, a bearer token and transfer signing keys using
signed and encrypted file transfer setup, then run
docker compose up --build -d.
Connect to https://127.0.0.1:18098/mcp with an Authorization: Bearer <token> header
and the configured certificate trust. The remote listener rejects plaintext HTTP.
The image includes Chainsaw, rules and mappings; it runs as a non-root user, mounts
evidence read-only, and persists uploads, rules and results in a named volume.
See Docker and remote access for remote hostnames, NFS/SMB mounts,
uploads, authentication and the upload/download client. See
reproducibility for replay scripts and planned commands.
For local development or stdio clients:
uv sync # creates .venv with mcp, httpx, pyyaml, dev tools
uv run chainsaw-mcp-bootstrap # downloads v2.16.5 bundle, verifies sha256,
# installs vendor/chainsaw/{chainsaw,rules,sigma,mappings}
mkdir -p evidence && cp -r /path/to/evtx evidence/
uv run chainsaw-mcp --check # prints status JSON
uv run chainsaw-mcp # stdio transport
uv run chainsaw-mcp --transport streamable-http --host 127.0.0.1 --port 18098 --path /mcpClaude Code registration (stdio):
claude mcp add chainsaw -- uv --directory /path/to/chainsaw-mcp run chainsaw-mcpConfiguration is by environment variables; see .env.example. Evidence paths passed to
tools must resolve inside CHAINSAW_EVIDENCE_ROOTS (default ./evidence) or the verified
upload root. Existing evidence is never modified; uploads publish new files only after
signature, size and checksum verification.
Transport security: streamable HTTP always runs with DNS-rebinding protection. The bind
host, localhost and 127.0.0.1 are accepted as Host headers; add more with
MCP_ALLOWED_HOSTS (comma-separated, host or host:*) and browser origins with
MCP_ALLOWED_ORIGINS. Set MCP_AUTH_TOKEN_FILE or MCP_AUTH_TOKEN to protect the endpoint.
Remote HTTP requires authentication and native TLS (MCP_TLS_CERT_FILE, MCP_TLS_KEY_FILE).
The transfer client signs uploads and verifies downloads using independently trusted Ed25519
keys; local stdio does not need a token or TLS. See SECURITY.md and
Docker deployment.
The server makes no outbound network calls except the bootstrap download and, when
explicitly enabled, chainsaw_jev_triage.
Jev result triage
chainsaw_jev_triage classifies and prioritizes selected result rows using
TypeSafe Jev. It returns source row indexes,
probabilities and confidence, flags uncertain assessments, and preserves the evidence.
The feature is disabled by default. Enable it with CHAINSAW_JEV_ENABLED=true and either
CHAINSAW_JEV_BWS_SECRET_ID or an injected TYPESAFE_API_KEY. BWS lookup reads the key
only when the tool is called; credentials never appear in status or result output.
Preview a small page with chainsaw_result_page, then call chainsaw_jev_triage with
the same handle, offset, limit and fields. Selected fields are sent to TypeSafe; omitting
fields sends complete selected rows, including the server-side evidence file path. The
tool makes one request for up to 10 rows,
returns advisory scores, and does not automatically run after hunts. See
Jev setup and workflow for configuration, limits and examples.
Deployment
Docker Compose is the primary remote deployment: setup and operations. The image starts without runtime downloads and supports both mounts and remote uploads.
An existing alternative runs streamable HTTP as a hardened systemd user unit
bound to a private address (a Tailscale IP is the default). deploy/deploy-node.sh ships
a clean, committed tree to a host named by CHAINSAW_DEPLOY_NODE and
CHAINSAW_DEPLOY_USER, syncs the venv, bootstraps Chainsaw if missing, renders the unit
for that host, health-checks the endpoint and rolls back automatically on failure. The
unit is sandboxed and capped at 4 GiB of memory (MCP_MEMORY_MAX) and 512 tasks. The
manual procedure, the unit's sandboxing and the Jev enablement steps are in
docs/deployment.md.
Layout
src/chainsaw_mcp/ server, tools/, rules catalog, mapping repair, result store + byte budgets, bootstrap, CLI
Dockerfile self-contained non-root HTTP image with Chainsaw, rules and source/licence notices
compose.yaml authenticated service, read-only evidence, persistent state
tests/ unit tests (no binary needed; the workflow partition test needs Node), integration/ (needs vendor + samples), fixtures/ (pinned scenario manifest)
docs/ tool reference (generated), result-handle contract, multi-step workflows, Jev setup, deployment
scripts/ quality-check.sh, integration-check.sh, gen-tool-docs.py, check-tool-docs.py, check-package.py, mcp-health.py (endpoint probe)
deploy/ deploy-node.sh (ship over ssh), install-node.sh (target-side install + rollback), render-unit.sh, reference unit
.agents/skills/ agent skills: chainsaw-triage, chainsaw-rule-authoring, chainsaw-reporting
.claude/workflows/ Claude Code workflow scripts (evtx-triage, rule-authoring-loop)
.claude/skills/ Claude Code operator skill (/chainsaw)
skills/research/ portable agent skill (frontmatter + markdown), ready to copy into any skills directory
custom-rules/ analyst-authored Chainsaw rules saved by chainsaw_save_ruleDevelopment
bash scripts/quality-check.sh # the CI unit gate: locked sync, ruff, mypy, pytest with coverage, docs drift, bash -n, build
bash scripts/integration-check.sh # the CI integration gate: bootstraps Chainsaw, pins evidence/EVTX-ATTACK-SAMPLES, runs -m integration
bash scripts/container-check.sh # build image and exercise the remote workflow (requires Docker)
uv run pytest # unit tests only
uv run ruff check . && uv run ruff format --check .
uv run mypy # src/chainsaw_mcp, check_untyped_defs
uv run python scripts/gen-tool-docs.py > docs/tools.md # after changing a tool signature, docstring, resource or docs/_result-handles.md
uv run python scripts/check-tool-docs.py # the drift check CI runs.github/workflows/quality.yml runs
both scripts on every push and pull request with pinned action revisions. quality-check.sh fails below 70 % branch coverage and when
docs/tools.md drifts from the live tool schema. docs/tools.md is generated and embeds
docs/_result-handles.md, so edit those sources rather than the generated file.
integration-check.sh fails if any integration test is skipped, so a missing binary or
sample tree can never pass silently. tests/test_workflow_partition.py executes the real
evtx-triage.js in Node and is skipped when node is not on PATH.
Sample evidence lives under evidence/ (gitignored), one directory per public set:
Directory | Source | Contents |
|
| 278 attack-technique files; the integration tests pin this set |
|
| 293 attack files grouped by ATT&CK tactic and technique |
| per-OS | benign goodware logs for false-positive and negative testing |
Contributing and security
See CONTRIBUTING.md for the development workflow and SECURITY.md for the threat model and how to report a vulnerability.
Licence
This server is MIT. The container bundles GPL-3.0 Chainsaw and DRL 1.1 Sigma rules, retaining their licences and the Chainsaw source archive. See third-party notices.
Available Tools
26 toolschainsaw_analyse_evtxChainsaw: EVTX overviewA
Summarise EVTX channel, provider and event-ID coverage, including missing metadata.
Runs native analysis and a streamed dump pass. The inline per_file list is a bounded preview; page handle for full files, coverage_handle for identity counts, and diagnostics.handle for all runner messages. Missing Channel in ETW is not evidence of corruption, and successful exit does not establish complete parsing.
Inputs: paths (required), skip_errors.
chainsaw_analyse_gapsChainsaw: log gap analysisA
Detect chronological or EventRecordID discontinuities for investigation.
Curated or filtered samples naturally contain gaps; these are not proof of deletion. Correlate with acquisition history and Security 1102 / System 104.
Inputs: paths (required), limit, to_time, timezone, +5 more.
chainsaw_analyse_shimcacheChainsaw: shimcache timelineA
Build an execution timeline from the shimcache with optional Amcache enrichment.
Wraps chainsaw analyse shimcache. Output is CSV stored under a result handle;
the preview holds the first rows. Use chainsaw_result_export for the full file.
Inputs: system_hive (required), preview, patterns, amcache_hive, +1 more.
chainsaw_analyse_srumChainsaw: SRUM analysisA
Analyse the System Resource Usage Monitor (SRUM) database.
Wraps chainsaw analyse srum. Output is stored under a result handle; use
chainsaw_result_export for the complete text.
Inputs: srum_db (required), software_hive (required), stats_only, preview_bytes.
chainsaw_delete_ruleChainsaw: delete custom ruleADestructiveIdempotent
Delete a custom rule. Bundled Chainsaw and Sigma rules cannot be deleted.
Inputs: name (required).
chainsaw_dumpChainsaw: dump recordsA
Convert every record in the evidence to JSON under a result handle.
Wraps chainsaw dump. Use it when a hunt or search has narrowed the scope to one
or two files and you need the complete record stream; page through the handle.
Inputs: paths (required), fields, preview, extension, +2 more.
chainsaw_get_mappingChainsaw: read a mappingARead-onlyIdempotent
Describe a Sigma-to-event-log mapping file: groups, filters, field translations.
Mappings decide which Sigma logsources apply to which Windows events. Read this when a Sigma rule you expect is not firing.
Inputs: name, include_yaml.
chainsaw_get_ruleChainsaw: read a ruleARead-onlyIdempotent
Read one rule's YAML and parsed summary, or list a rule directory.
Inputs: kind (required), path (required).
chainsaw_huntChainsaw: hunt with detection rulesA
Hunt evidence with Sigma and Chainsaw detection rules.
Runs chainsaw hunt over the given paths, stores every detection as JSONL under a
server-minted result handle, and returns aggregate counts (by rule, level, host,
channel, event ID, hour) with a small preview. Prefer this over reading raw events.
Inputs: paths (required), kinds, sigma, fields, +13 more.
chainsaw_jev_triageChainsaw: assess results with JevA
Send selected result rows to TypeSafe Jev for advisory classification and priority.
EXTERNAL DATA TRANSFER: sends the selected evidence fields to api.typesafe.ai. Requires CHAINSAW_JEV_ENABLED=true and credentials. One bounded API request per call, no retries. Returns source row indexes, probabilities and confidence; invalid answers fail only their source row, with both scores null and a named error; invalid response containers reject the batch. Each assessment lists all uncertain_reasons: insufficient_context, low_classification_confidence, low_priority_confidence or validation_failed. uncertain is true when reasons exist. Scores are model judgments, not confirmed findings. Review the original evidence before acting. Evidence and stored results are unchanged.
Inputs: handle (required), limit, fields, offset, +1 more.
chainsaw_lint_rulesChainsaw: lint rulesARead-onlyIdempotent
Validate rules with chainsaw lint and report which files fail to load and why.
Run it after chainsaw_save_rule, or on a Sigma sub-tree to see unsupported modifiers.
Inputs: tau, kind, path.
chainsaw_list_evidenceChainsaw: list evidenceARead-onlyIdempotent
List artefact files below an evidence path with sizes and types.
Use it to scope a hunt: pick directories or individual .evtx files instead of hunting an entire mount. Follow next_offset until null for a complete inventory; the evidence tree must remain unchanged between pages.
Inputs: path, limit, offset, pattern.
chainsaw_process_lineageChainsaw: pivot process lineageA
Pivot process GUIDs in explicitly scoped original evidence, including unmatched events.
Supply files from one investigation (not a shared evidence root) and an exact host. Each hop queries process/parent GUIDs; output is capped and reports incomplete traversal.
Inputs: paths (required), computer (required), process_guid (required), preview, +3 more.
chainsaw_result_chunkChainsaw: read result text chunksBRead-onlyIdempotent
Read UTF-8 text chunks of a file or oversized JSON row. Resume next_byte_offset.
Inputs: handle (required), max_bytes, row_offset, byte_offset.
chainsaw_result_deleteChainsaw: delete a resultADestructiveIdempotent
Delete a stored result and its metadata. Evidence files are never touched.
Inputs: handle (required).
chainsaw_result_eventsChainsaw: group detections by eventBRead-onlyIdempotent
Page unique source-qualified events, retaining every associated rule match.
Inputs: handle (required), limit, fields, offset, +1 more.
chainsaw_result_exportChainsaw: export a resultARead-onlyIdempotent
Render a stored result as CSV or JSONL text for reports or other tools.
Large results are capped by rows and encoded response bytes; resume next_offset. CSV pages repeat their header. For stored text files resume next_byte_offset; those UTF-8 chunks may split records and must be concatenated before parsing.
Inputs: handle (required), fields, format, offset, +3 more.
chainsaw_result_fieldsChainsaw: result fieldsARead-onlyIdempotent
Discover the field paths present in a result so you can project or group on them.
Returns each dotted path with how many sampled rows carry it and an example value.
Inputs: handle (required), sample.
chainsaw_result_listChainsaw: list resultsBRead-onlyIdempotent
List stored result handles, newest first, with tool, inputs and row counts.
Inputs: limit, offset, max_bytes.
chainsaw_result_pageChainsaw: page a resultARead-onlyIdempotent
Read a page of rows from a stored result, optionally projected and filtered.
Rows are chainsaw detections (hunt) or raw documents (search, dump). Iterate with next_offset until it is null.
Inputs: handle (required), limit, where, fields, +2 more.
chainsaw_result_summaryChainsaw: summarise a resultARead-onlyIdempotent
Aggregate a stored result without paging through it.
Use the default overview to understand a hunt, then group by specific event fields (users, processes, source IPs, logon IDs) to build pivots for chainsaw_search.
Inputs: handle (required), top, where, group_by.
chainsaw_rule_statsChainsaw: rule statisticsARead-onlyIdempotent
Count installed Chainsaw, Sigma and custom rules by level and status, plus mappings.
Also lists the Sigma collections present; pass those names to chainsaw_hunt's sigma_collections when you want threat-hunting or emerging-threat rules included.
Inputs: no named parameters.
chainsaw_save_ruleChainsaw: save custom ruleADestructive
Save an analyst-authored Chainsaw rule into the custom rules directory.
Saved rules are hunted with extra_rules=['custom']. The file is linted before the result is returned; a failing lint still leaves the file in place so it can be fixed with another save using overwrite=true.
Inputs: name (required), yaml_text (required), lint, overwrite.
chainsaw_searchChainsaw: search eventsA
Search evidence for keywords, regular expressions, or tau field expressions.
Runs chainsaw search; each matching document is stored under a result handle and
summarised by host, channel, event ID and hour. Use tau expressions to pivot on a
specific field (for example a LogonId, process GUID, or user) after a hunt.
Inputs: paths (required), tau, fields, preview, +10 more.
chainsaw_search_rulesChainsaw: search rulesARead-onlyIdempotent
Find detection rules by keyword, ATT&CK tag, level, status or logsource.
Use it to explain a detection name from a hunt, to check coverage for a technique, or to pick a sub-tree for a focused hunt. Returns rule URIs readable as resources.
Inputs: tag, kinds, level, limit, +5 more.
chainsaw_statusChainsaw: server statusARead-onlyIdempotent
Report server configuration, chainsaw version, rule counts and evidence roots.
Call this first to learn which evidence roots and rule sets are available, and whether the chainsaw binary is installed.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Tools are largely distinguished by artifact type and action: EVTX/gap/shimcache/SRUM analyses, hunt/search/dump, rule management, and result management. Some overlap exists among result_page, result_events, result_export, and result_chunk, but the descriptions clarify their distinct purposes.
All tools use a consistent chainsaw_ prefix and snake_case, making the server easy to navigate. The suffixes mix verb_noun patterns (e.g., chainsaw_delete_rule, chainsaw_analyse_evtx) with noun-first patterns (e.g., chainsaw_rule_stats, chainsaw_result_list), a minor deviation from a strict convention.
At 26 tools, the surface is on the heavy side, with eight result_* tools alone. However, the domain is broad—evidence scoping, hunting, multiple artifact analyses, rule lifecycle, and result paging/export—so the count is borderline rather than clearly excessive.
The set covers evidence listing, hunt/search/dump, targeted artifact analyses, rule reading/searching/saving/deleting/linting/stats, and result listing/paging/chunking/exporting/deleting. Minor gaps include no explicit rule update beyond overwrite-on-save and no analysis tools beyond Chainsaw's supported artifact set.
Maintenance
Related MCP Connectors
Search log events, investigate anomalies, and manage cases in your Knowledge Grid tenant.
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Agent safety guardrail audit, delivered per API call as an atom service on Conduit Atoms.
Ingest and search LogsLoom logs from coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides programmatic access to ingest and query Windows event logs (especially Sysmon logs), enabling security monitoring, incident response, and log analysis automation.5MIT
- AlicenseBqualityBmaintenanceEnables AI-assisted Windows digital forensics analysis including parsing Windows Event Logs (EVTX), analyzing registry hives (SAM, SYSTEM, SOFTWARE), and remotely collecting artifacts via WinRM with built-in security queries and forensic reference data.5527MIT
- FlicenseBqualityDmaintenanceEnables context-aware EVTX hunting with process lineage tracing and rarity baselining to surface real threats from security logs, transforming raw alerts into actionable kill chain intelligence.31-
- AlicenseAqualityDmaintenanceEnables MCP clients to run Hayabusa detection scans over Windows event log (.evtx) files for forensic analysis and threat hunting.2MIT