sigma-mcp-server

v0.3.1
sigma-mcp-server Checked 23 hours ago Published 7 days ago

MCP server for Sigma detection engineering: create, validate and search Sigma rules, and build and test processing pipelines with pySigma

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_rules Search Rules

Search the SigmaHQ rule repository for rules similar to a detection idea. Use this before writing a new rule to find out whether SigmaHQ already covers the behaviour, and to learn from similar rules. Matching is by keyword (case-insensitive, at least three characters each): title matches rank highest, then tags, then description, logsource, field names and file path. Passing a rule ID returns that rule first.

ParameterTypeDescription
query *stringSpace-separated keywords, e.g. ``"psexec lateral movement"``, ``"lsass memory dump"`` or ``"attack.t1003"``.
max_resultsintegerNumber of results to return (1–50).

get_rule Get Rule

Return the full YAML of a rule from the SigmaHQ repository.

ParameterTypeDescription
rule_id *stringThe rule's ``id`` (UUID) or its ``path`` as returned by ``search_rules``.

get_logsource_statistics Get Logsource Statistics

Show how often each logsource and its fields are used in SigmaHQ rules. Use this to decide which logsources and fields a processing pipeline must support, or which field names rules for a logsource typically use.

ParameterTypeDescription
logsource_filterstringCase-insensitive substring of the logsource key, e.g. ``"windows"`` or ``"process_creation"``. Empty for all.
max_fieldsintegerNumber of most frequent fields to list per logsource.

update_sigma_repository Update Sigma Repository

Download the latest SigmaHQ rules and rebuild the rule index. The update runs in the background and this tool returns at once. The previous index stays usable until the new one is ready. Call ``get_index_status`` to follow the progress.

get_index_status Get Index Status

Report the state of the SigmaHQ rule index.

validate_pipeline Validate Pipeline

Validate a Sigma processing pipeline with pySigma. This is the canonical way to check a pipeline; call it after every change and fix all errors before using the pipeline.

ParameterTypeDescription
pipeline_yaml *stringComplete processing pipeline in YAML format (top-level keys such as ``name``, ``priority``, ``vars``, ``transformations``, ``postprocessing``, ``finalizers``).

apply_pipeline Apply Pipeline

Show what processing pipelines do to a Sigma rule. Use this to check field mappings and other transformations against real rules without a SIEM backend. Several pipelines are applied in the order of their ``priority`` (lowest first), as sigma-cli does.

ParameterTypeDescription
pipeline_yamls *arrayThe processing pipelines to apply, each a complete YAML document.
rule_yaml *stringOne or more Sigma rules in YAML (multiple documents and correlation rules are allowed).

analyze_pipeline_coverage Analyze Pipeline Coverage

Measure how well a processing pipeline covers the SigmaHQ rules. The pipeline is run with pySigma on probe rules for every logsource in the SigmaHQ rule index, and for every field that logsource's rules commonly use.

ParameterTypeDescription
pipeline_yaml *stringThe processing pipeline in YAML format.
field_thresholdnumberOnly fields used by at least this share of a logsource's rules are checked (0–1, default 0.05).
logsource_filterstringCase-insensitive substring of logsource keys (``product/category/service``) to restrict the analysis to.
max_logsourcesintegerNumber of logsources to list in detail, most used first (the summary always counts all).

validate_rule Validate Rule

Validate Sigma rules using the configured pySigma validators. Accepts a single rule or several YAML documents separated by ``---``, including correlation rules together with the rules they reference. Fresh validator instances are created for every call; within one call they check all rules, so uniqueness checks work across them. This is the canonical way to validate Sigma rules — do not use pytest, shell commands, or any external test runner for validation.

ParameterTypeDescription
rule_yaml *stringComplete Sigma rule(s) in YAML format.
exclusionsValidators to skip for this call only, instead of the stored exclusions.
validator_namesValidators to use for this call only, instead of the ones stored with ``configure_validators`` (``null`` = stored configuration, by default all validators).

configure_validators Configure Validators

Configure which pySigma validators are used for rule validation. The configuration is stored in the MCP session and persists for all subsequent ``validate_rule`` calls within the same session. Over HTTP, clients without a session (protocol 2026-07-28) cannot keep it between calls; pass ``validator_names`` and ``exclusions`` to ``validate_rule`` instead.

ParameterTypeDescription
exclusionsValidator identifiers to exclude. Applied after ``validator_names`` filtering, so validators can be excluded even when ``validator_names`` is ``null``.
validator_namesExplicit allow-list of validator identifiers to use. Pass ``null`` / ``None`` to use *all* available validators (the default after a fresh session start).

generate_uuid Generate Uuid

Generate a unique UUID (version 4) for a Sigma rule ID. Returns a new universally unique identifier in standard format (e.g. ``12345678-1234-5678-1234-567812345678``). Use this tool when creating a new Sigma rule to ensure the rule has a valid, unique ``id`` field.

get_logsource_info Get Logsource Info

Suggest Sigma logsources for an activity, with fields, event IDs and tips. Call this before drafting a rule to choose the logsource and field names. Generic categories (e.g. ``process_creation``) are usually preferable to a specific service and event ID.

ParameterTypeDescription
activity_description *stringWhat should be detected, e.g. ``"scheduled task created via schtasks"`` or ``"4624 logon from new IP"``.
max_resultsintegerNumber of logsources to return (1–10).

suggest_rule_filename Suggest Rule Filename

Suggest a file name for a Sigma rule following the SigmaHQ conventions. The name is the logsource prefix SigmaHQ requires (for example ``proc_creation_win_`` or ``win_security_``) followed by the title in lower case with underscores, at most 90 characters, ending in ``.yml``. For several YAML documents the first title and the first logsource are used.

ParameterTypeDescription
rule_yaml *stringThe rule in YAML format.

list_resources List Resources

List all available resources and resource templates. Returns JSON with resource metadata. Static resources have a 'uri' field, while templates have a 'uri_template' field with placeholders like {name}.

read_resource Read Resource

Read a resource by its URI. For static resources, provide the exact URI. For templated resources, provide the URI with template parameters filled in. Returns the resource content as a string. Binary content is base64-encoded.

ParameterTypeDescription
uri *stringThe URI of the resource to read