search
Full-text search across all detection fields (name, description, query, MITRE IDs, tags, CVEs, analytic stories, process names, file paths, registry paths)
limitqueryrequiredsource_type
io.github.MHaggisPublished by GitHub account MHaggisv3.3.4Updated Nov 5, 2026
Search security detections across Sigma, Splunk, Elastic, KQL, Sublime, CQL and Jamf with ATT&CK.
Indexes local Sigma, Splunk, Elastic, KQL, Sublime, CQL and Jamf detection rules so an assistant can search them and analyze MITRE ATT&CK coverage.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
An MCP (Model Context Protocol) server that lets LLMs query a unified database of Sigma, Splunk ESCU, Elastic, KQL, Sublime (Sublime Security and delivr.to), and CrowdStrike CQL security detection rules.
New here? Start with the Setup Guide -- covers macOS, Windows (WSL & native), and Linux step by step.
Want it hosted? Skip the install entirely: Hosted MCP Setup Guide
Local (full power) — the npm package you're looking at. Runs on your machine, indexes your own detection repos, exposes all 81 tools. You need Node.js and ~10 minutes.
Hosted (zero setup) — a Streamable HTTP server at detect.michaelhaag.org/api/mcp/mcp. Sign up, generate a token, paste one URL into your MCP client. ~25 read-only tools, always in sync with the latest content, 200 calls/day free. Read on for quick-install buttons.
[Install Local MCP in Cursor] [Install Local MCP in VS Code] [Install Local MCP in VS Code Insiders]
Claude Code (CLI one-liner):
Claude Desktop — add to claude_desktop_config.json:
OpenAI Codex (CLI):
After install, configure env vars (
SIGMA_PATHS,SPLUNK_PATHS, etc.) to point at your detection repos. See the Setup Guide for full details.
sdmcp_YOUR_TOKEN_HERE in the resulting config with the token you just generated.[Install Hosted MCP in Cursor] [Install Hosted MCP in VS Code] [Install Hosted MCP in VS Code Insiders]
Claude Code (CLI one-liner):
Claude Desktop (via mcp-remote — Desktop doesn't speak remote HTTP natively yet):
OpenAI Codex (CLI):
See the Hosted MCP Setup Guide for the full table of clients, the complete tool inventory, and troubleshooting tips.
The web chat supports Free, Pro/Admin, and BYOK (Bring Your Own Key) routing. You can also see the active model at the top of the chat UI.
nvidia/nemotron-3-super-120b-a12b:freenvidia/nemotron-3-super-120b-a12b:freenousresearch/hermes-3-llama-3.1-405b:freemeta-llama/llama-3.3-70b-instruct:freeopenai/gpt-oss-120b:freeUses app-managed OpenRouter routing with your Preferred Model setting in /account:
If you set your own API key(s), routing priority is:
sk-ant-...) -> claude-sonnet-4-6-20250514 via Anthropicsk-...) -> gpt-5.4 via OpenAIsk-or-...) -> uses the same Preferred Model mapping table aboveIf multiple keys are present, the first match in that order is used.
Or clone and build: git clone https://github.com/MHaggis/Security-Detections-MCP.git && cd Security-Detections-MCP && npm install && npm run build
Configure env vars to point at your detection repos:
See the Setup Guide for full per-client config examples (Cursor, VS Code, Claude Desktop, WSL).
Download all sources with sparse checkout (rules only, not full repos):
81 tools total including pattern learning, template generation, knowledge graph, dynamic tables, and autonomous analysis. See the Tools Reference for the complete list.
11 pre-built expert workflows. Just ask by name:
Pairs with mitre-attack-mcp for complete threat coverage analysis. Install both:
npm test builds a disposable SQLite index and requires SIGMA_PATHS,
SPLUNK_PATHS, and STORY_PATHS to point to the cloned content described above.
The database lifecycle and content tests never modify your normal user cache.
For checks without external content, run npm run test:platform,
npm run test:jamf, and npm run test:mcp.
Set DETECTIONS_DB_PATH to select a separate database for server instances or
automation; otherwise the normal ~/.cache/security-detections-mcp/detections.sqlite
location is used.
Apache 2.0
The automatic release guide covers npm trusted publishing, the CI-to-release pipeline, MCP Registry updates, and failed-run recovery.
Source: README.md at commit 0df47c0
Full-text search across all detection fields (name, description, query, MITRE IDs, tags, CVEs, analytic stories, process names, file paths, registry paths)
limitqueryrequiredsource_typeGet a single detection by its ID
idrequiredsource_typeGet the original YAML content for a detection
idrequiredsource_typeList all detections with pagination. Use for browsing the detection index.
limitoffsetList detections filtered by source type
limitoffsetsource_typerequiredList detections that map to a specific MITRE ATT&CK technique
limitoffsettechnique_idrequiredList Sigma detections filtered by logsource (category, product, or service)
limitoffsetproductservicecategoryList detections filtered by severity level
levelrequiredlimitoffsetList detections that cover a specific CVE vulnerability
limitcve_idrequiredoffsetList Splunk detections that belong to a specific analytic story (e.g., "Ransomware", "Data Destruction")
limitstoryrequiredoffsetList detections that reference a specific process name (e.g., "powershell.exe", "w3wp.exe", "cmd.exe")
limitoffsetprocess_namerequiredList detections by type (TTP, Anomaly, Hunting, Correlation)
limitoffsetdetection_typerequiredList detections that use a specific data source (e.g., "Sysmon", "Windows Security", "process_creation")
limitoffsetdata_sourcerequiredList detections by MITRE ATT&CK tactic (e.g., "execution", "persistence", "credential-access")
limitoffsettacticrequiredList KQL detections filtered by category (e.g., "Defender For Endpoint", "Azure Active Directory", "Threat Hunting")
limitoffsetcategoryrequiredList KQL detections filtered by tag (e.g., "ransomware", "hunting", "ti-feed")
tagrequiredlimitoffsetList KQL detections that use a specific Microsoft data source (e.g., "DeviceProcessEvents", "SigninLogs", "EmailEvents")
limitoffsetdata_sourcerequiredGet statistics about the indexed detections and stories
Takes no parameters.
Get ONLY unique MITRE technique IDs (lightweight - no full detection data). Use this for Navigator layer generation or coverage analysis.
tacticseveritysource_typeGet coverage analysis with stats by tactic, top covered techniques, and weak spots. Returns summary data, not raw detections. Use this instead of listing detections and processing manually.
source_typeIdentify detection gaps based on a threat profile (ransomware, apt, initial-access, persistence, credential-access, defense-evasion). Returns prioritized gaps with recommendations.
source_typethreat_profilerequiredGet detection suggestions for a specific technique. Returns existing detections, required data sources, and detection ideas.
source_typetechnique_idrequiredGenerate a MITRE ATT&CK Navigator layer JSON from detection coverage. Returns valid Navigator JSON ready for import at https://mitre-attack.github.io/attack-navigator/. Filter by source, tactic, or severity.
namerequiredtacticseveritydescriptionsource_typeAnalyze procedure-level coverage for a MITRE technique. Goes beyond "we cover T1059.001" to show WHICH specific behaviors/procedures your detections actually catch (e.g., encoded commands, download cradles, AMSI bypass). Shows covered and uncovered procedures with detection names.
source_typetechnique_idrequiredinclude_query_snippetsCompare procedure-level detection coverage across sources for a technique. Shows which source catches which specific behaviors — two orgs can both tag T1059.001 but detect completely different procedures. Returns a matrix of source × procedure.
sourcestechnique_idrequiredGet a lightweight list of detection names and IDs matching a search query. Returns ONLY name, id, source, mitre_ids - no queries or raw yaml. Use this when you need a simple list.
limitqueryrequiredsource_typeCompare detection coverage between sources (Sigma vs Splunk vs Elastic vs KQL) for a topic. Returns a clean breakdown with counts and names per source.
topicrequiredlimit_per_sourceGet quick counts of detections by source for a topic. Returns just the numbers, no detection details.
topicrequiredList detections whose NAME matches a pattern, grouped by source. Returns just name + ID pairs.
patternrequiredsource_typeCompare detections across sources, tactics, or techniques for a given topic. Returns breakdown by source, tactic, and severity.
topicrequiredGet a lightweight coverage summary (~200 bytes) with tactic percentages. Use this for quick overviews instead of full analyze_coverage.
source_typeGet just the top 5 gaps (~300 bytes) for a threat profile. Use this for quick gap checks.
threat_profilerequiredGet just the detection count for a technique (~50 bytes). Use this for quick coverage checks.
technique_idrequiredAnalyze detection coverage against a specific threat actor. Shows which of the actor's known MITRE ATT&CK techniques have detections, coverage percentage, and prioritized gaps. Requires STIX data (ATTACK_STIX_PATH env var).
actor_namerequiredsource_typeinclude_navigator_layerList all known MITRE ATT&CK threat actors with aliases and technique counts. Requires STIX data (ATTACK_STIX_PATH env var).
limitsearchCompare detection coverage across multiple threat actors. Shows shared technique gaps and unique risks per actor. Requires STIX data (ATTACK_STIX_PATH env var).
actor_namesrequiredsource_typeGet full threat actor dossier: description, aliases, known techniques, software employed, and detection coverage status. Requires STIX data (ATTACK_STIX_PATH env var).
actor_namerequiredSearch analytic stories by narrative, description, or name. Stories provide rich context about threat campaigns and detection strategies.
limitqueryrequiredGet detailed information about a specific analytic story by name
namerequiredList all analytic stories with pagination
limitoffsetList analytic stories by category (e.g., "Malware", "Adversary Tactics", "Abuse")
limitoffsetcategoryrequiredSave a query result for quick retrieval later. Useful for caching frequently needed data.
datarequirednamerequiredquery_typerequiredttl_minutesRetrieve a previously saved query result by name.
namerequiredList all saved queries, optionally filtered by type.
query_typeForce re-index all detections and stories from configured paths. WARNING: This is a destructive operation that deletes the current index.
confirmskip_elicitationSave a reusable query template with {{placeholders}}. Templates can contain SQL queries or tool-chain definitions for future execution.
namerequiredtemplaterequireddescriptionExecute a saved query template with the provided parameters. Returns the query results.
namerequiredparamsList all saved query templates with their names, descriptions, and usage statistics.
limitsort_byGet the full details of a saved query template including the template string and parameters.
namerequiredDelete a saved query template by name.
namerequiredCreate a new custom table to store analysis data. Use this to persist findings, research results, or any structured data you want to retrieve later. Pre-built tables available: gap_analyses, source_comparisons, threat_actor_profiles, detection_recommendations
namerequiredcolumnsrequireddescriptionrequiredInsert a row of data into a dynamic table. Data is validated against the table schema.
datarequiredrow_idtable_namerequiredQuery data from a dynamic table with optional filtering, sorting, and pagination. Filter examples: - Exact match: {"status": "completed"} - LIKE match: {"name": "%ransomware%"} - Multiple conditions: {"status": "pending", "priority": "high"}
limitwhereoffsetselectorder_bytable_namerequiredList all dynamic tables created by the LLM, including pre-built analysis tables and their statistics.
include_prebuiltRemove a dynamic table and all its data. Use with caution - this is irreversible.
confirmrequiredtable_namerequiredGet detailed schema information and statistics for a dynamic table.
table_namerequiredCreate a knowledge entity representing a security concept. Use this to build the knowledge graph with threat actors, techniques, detections, campaigns, tools, vulnerabilities, and data sources. Entity types: - threat_actor: APT groups, criminal gangs (e.g., "APT29", "STORM-0501") - technique: MITRE ATT&CK techniques (e.g., "T1059.001 PowerShell") - detection: Security detection rules (e.g., "Suspicious PowerShell Execution") - campaign: Attack campaigns (e.g., "SolarWinds Compromise") - tool: Attack tools or malware (e.g., "Cobalt Strike", "Mimikatz") - vulnerability: CVEs (e.g., "CVE-2024-1234") - data_source: Log sources (e.g., "Windows Security Events")
namerequiredentity_typerequiredCreate a relationship between two entities WITH reasoning explaining WHY they're connected. This is the core of tribal knowledge - capturing not just the connection but the insight behind it. Relation types: - uses: Threat actor uses technique/tool (e.g., APT29 uses Cobalt Strike) - targets: Threat actor targets sector/system - detects: Detection covers technique - covers: Detection provides coverage for technique - mitigates: Control mitigates technique - exploits: Campaign exploits vulnerability - attributed_to: Campaign attributed to threat actor - depends_on: Detection depends on data source - related_to: General relationship IMPORTANT: The reasoning field is critical - explain WHY this connection exists.
reasoningrequiredto_entityrequiredconfidencefrom_entityrequiredrelation_typerequiredAdd a fact or observation about an entity. Observations capture point-in-time knowledge that can be queried later. Examples: - "APT29 has been active since at least 2008" - "This detection has high false positives in development environments" - "T1059.001 is commonly used for initial access in ransomware"
sourceconfidenceentity_namerequiredobservationrequiredRemove an entity from the knowledge graph. This also removes all relations and observations associated with the entity.
namerequiredRemove a specific observation by its ID. Use open_entity first to find observation IDs.
observation_idrequiredSearch across all knowledge types: entities, relations, observations, decisions, and learnings. Uses full-text search to find relevant tribal knowledge. Search examples: - "PowerShell execution" - Find everything related to PowerShell - "credential theft" - Find credential-related knowledge - "APT29" - Find all knowledge about this threat actor
limitqueryrequiredRead the entire knowledge graph or a filtered subgraph. Returns entities, relations, and observations. Use this to: - Get an overview of all stored knowledge - Filter by entity type to focus on specific concepts - Understand the structure of captured tribal knowledge
limitentity_typeGet complete information about a specific entity including all its relations and observations. This is the detailed view of a single knowledge node.
namerequiredRecord WHY a significant decision was made. This is the gold of tribal knowledge - capturing the reasoning process so future agents can understand past decisions. Decision types: - gap_identified: A detection gap was found - detection_recommended: A specific detection was recommended - coverage_mapped: Coverage was analyzed and mapped - priority_assigned: A priority decision was made - false_positive_tuning: FP tuning recommendation - threat_assessment: Threat level assessment - data_source_selected: Data source was chosen IMPORTANT: Be detailed in the reasoning - this helps future analysis.
contextrequiredoutcomedecisionrequiredreasoningrequiredsession_iddecision_typerequiredentities_involvedStore a pattern or insight derived from analysis for future reference. Learnings are reusable knowledge that can help future sessions. Learning types: - detection_pattern: A pattern for writing effective detections - gap_pattern: A recurring type of detection gap - user_preference: User preferences for analysis style - false_positive_pattern: Common FP patterns to avoid - threat_pattern: Recurring threat behaviors - correlation_insight: Insights about technique correlations - data_quality_insight: Insights about data source quality Examples: - "STORM-0501 consistently uses native tools before deploying ransomware" - "Detections for T1059.001 need process parent filtering to reduce FPs" - "User prefers prioritizing detections by MITRE tactic stage"
titlerequiredinsightrequiredevidenceapplicationslearning_typerequiredGet past decisions relevant to the current context. Uses full-text search to find tribal knowledge that applies to your current analysis. Use this to: - See how similar situations were handled before - Understand reasoning behind past recommendations - Maintain consistency with previous decisions
limitsession_idcontext_queryrequireddecision_typeGet applicable learnings for the current task. Returns patterns and insights that may help with the current analysis. Use this to: - Apply proven patterns to new situations - Remember user preferences - Avoid known pitfalls
limittask_queryrequiredmark_appliedlearning_typeAutomatically analyze detection coverage, identify gaps across threat profiles, and store findings for future reference. This tool: 1. Runs coverage analysis across all detections 2. Identifies gaps for specified threat profiles (ransomware, apt, etc.) 3. Stores results in the gap_analyses dynamic table 4. Logs decisions about significant findings in the knowledge graph Use this for comprehensive, stored analysis that persists across sessions.
session_idanalysis_namestore_resultsthreat_profilesGenerate a comprehensive gap report comparing detection coverage across sources (Sigma, Splunk ESCU, Elastic, KQL) and threat profiles. This tool: 1. Analyzes all threat profiles for gaps 2. Compares detection coverage across different sources 3. Creates prioritized recommendations based on severity and coverage 4. Stores the complete report in dynamic tables Use this for executive-level reporting on detection posture.
session_idreport_namecompare_sourcespriority_tacticsinclude_recommendationsAutonomously compare detection coverage across different sources (Sigma, Splunk ESCU, Elastic, KQL) with detailed reasoning and analysis. This tool: 1. Compares detection counts and coverage across all available sources 2. Analyzes technique-level coverage differences between sources 3. Identifies which source has best coverage for specific tactics/techniques 4. Provides reasoned recommendations for source selection 5. Stores comparison results and logs decision reasoning Use this to understand the strengths/weaknesses of different detection sources and make informed decisions about which to use.
session_idfocus_tactictechniques_to_compareinclude_quality_analysisRequest LLM-enhanced analysis of security detection data using MCP sampling. This tool leverages MCP sampling to request the client's LLM to analyze security data with expert reasoning. Unlike the auto_* tools that perform direct analysis, this tool asks the LLM to provide contextual insights. Note: Requires client to support MCP sampling capability. If not supported, falls back to structured data output. Use cases: - Get expert reasoning about coverage gaps - Generate detection recommendations with context - Compare sources with nuanced analysis - Understand threat profile implications
techniquesanalysis_typerequiredcustom_contextthreat_profileCheck if MCP sampling is available for LLM-enhanced analysis. Sampling allows the server to request LLM completions from the client, enabling richer autonomous analysis. Not all MCP clients support this feature. Use this tool to check capability before using llm_enhanced_analysis.
Takes no parameters.
Get common query patterns for a MITRE technique based on existing detections. Returns SPL structure, common fields, macros used, and example queries. Use this before writing a detection to learn the conventions.
source_typetechnique_idrequiredGet available fields for a Splunk data model with usage examples. Use this to understand what fields are available when writing a detection query.
data_modelrequiredGet common Splunk macros and their usage patterns. Essential for writing detections that follow repository conventions.
filterFind existing detections similar to what you want to create. Use this to learn from existing detection logic and structure.
limitdescriptionrequiredsource_typetechnique_idGenerate a detection template based on technique, learned patterns, and conventions. Returns YAML structure ready for customization.
platformdata_modeldescriptionrequiredtechnique_idrequireddetection_typeGenerate RBA (Risk-Based Alerting) structure for a detection based on learned patterns and best practices.
severityrequireddescriptionrequireddetection_typerequiredfields_availableExtract and store patterns from all indexed detections. Run this to populate the pattern database for template generation.
forceStore user preference or correction to improve future suggestions. Call this when user modifies generated content to build tribal knowledge.
contextoriginalrequiredcorrectedrequiredfeedback_typerequired80% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
Declare a license in the repository or the registry entry.
claude mcp add security-detections -- npx -y security-detections-mcp{ "mcpServers": { "security-detections": { "command": "npx", "args": ["-y", "security-detections-mcp"] } }}codex mcp add security-detections -- npx -y security-detections-mcpclaude mcp add --transport http security-detections https://detect.michaelhaag.org/api/mcp/mcp --header "Authorization: Bearer sdmcp_YOUR_TOKEN_HERE"{ "mcpServers": { "security-detections": { "command": "npx", "args": [ "-y", "mcp-remote", "https://detect.michaelhaag.org/api/mcp/mcp", "--header", "Authorization: Bearer sdmcp_YOUR_TOKEN_HERE" ] } }}export SDMCP_TOKEN="sdmcp_YOUR_TOKEN_HERE" && codex mcp add security-detections --url https://detect.michaelhaag.org/api/mcp/mcp --bearer-token-env-var SDMCP_TOKENnpx -y security-detections-mcpmkdir -p detections && cd detectionsgit clone --depth 1 --filter=blob:none --sparse https://github.com/SigmaHQ/sigma.git && cd sigma && git sparse-checkout set rules rules-threat-hunting && cd ..git clone --depth 1 --filter=blob:none --sparse https://github.com/splunk/security_content.git && cd security_content && git sparse-checkout set detections stories && cd ..git clone --depth 1 --filter=blob:none --sparse https://github.com/elastic/detection-rules.git && cd detection-rules && git sparse-checkout set rules && cd ..git clone --depth 1 https://github.com/Bert-JanP/Hunting-Queries-Detection-Rules.git kql-bertjanpgit clone --depth 1 https://github.com/jkerai1/KQL-Queries.git kql-jkerai1git clone --depth 1 --filter=blob:none --sparse https://github.com/sublime-security/sublime-rules.git && cd sublime-rules && git sparse-checkout set detection-rules && cd ..git clone --depth 1 --filter=blob:none --sparse https://github.com/delivr-to/detections.git delivr-detections && cd delivr-detections && git sparse-checkout set sublime-rules && cd ..git clone --depth 1 https://github.com/ByteRay-Labs/Query-Hub.git cql-hubYou: "Run apt-threat-emulation for APT29"→ Technique-by-technique coverage, gaps, and purple team test plan{ "mcpServers": { "security-detections": { "command": "npx", "args": ["-y", "security-detections-mcp"], "env": { "SIGMA_PATHS": "/path/to/sigma/rules" } }, "mitre-attack": { "command": "npx", "args": ["-y", "mitre-attack-mcp"], "env": { "ATTACK_DOMAIN": "enterprise-attack" } } }}npm install && npm run build && npm test