search
Full-text search across all detection fields (name, description, query, MITRE IDs, tags, CVEs, analytic stories, process names, file paths, registry paths)
limitquery必填source_type
io.github.MHaggis由 GitHub 帳號 MHaggis 發布v3.3.4更新於 Nov 5, 2026
Search security detections across Sigma, Splunk, Elastic, KQL, Sublime, CQL and Jamf with ATT&CK.
為本機 Sigma、Splunk、Elastic、KQL、Sublime、CQL 與 Jamf 偵測規則建立索引,讓助理搜尋規則並分析 MITRE ATT&CK 覆蓋情形。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
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.
來源:README.md,提交 0df47c0
Full-text search across all detection fields (name, description, query, MITRE IDs, tags, CVEs, analytic stories, process names, file paths, registry paths)
limitquery必填source_typeGet a single detection by its ID
id必填source_typeGet the original YAML content for a detection
id必填source_typeList all detections with pagination. Use for browsing the detection index.
limitoffsetList detections filtered by source type
limitoffsetsource_type必填List detections that map to a specific MITRE ATT&CK technique
limitoffsettechnique_id必填List Sigma detections filtered by logsource (category, product, or service)
limitoffsetproductservicecategoryList detections filtered by severity level
level必填limitoffsetList detections that cover a specific CVE vulnerability
limitcve_id必填offsetList Splunk detections that belong to a specific analytic story (e.g., "Ransomware", "Data Destruction")
limitstory必填offsetList detections that reference a specific process name (e.g., "powershell.exe", "w3wp.exe", "cmd.exe")
limitoffsetprocess_name必填List detections by type (TTP, Anomaly, Hunting, Correlation)
limitoffsetdetection_type必填List detections that use a specific data source (e.g., "Sysmon", "Windows Security", "process_creation")
limitoffsetdata_source必填List detections by MITRE ATT&CK tactic (e.g., "execution", "persistence", "credential-access")
limitoffsettactic必填List KQL detections filtered by category (e.g., "Defender For Endpoint", "Azure Active Directory", "Threat Hunting")
limitoffsetcategory必填List KQL detections filtered by tag (e.g., "ransomware", "hunting", "ti-feed")
tag必填limitoffsetList KQL detections that use a specific Microsoft data source (e.g., "DeviceProcessEvents", "SigninLogs", "EmailEvents")
limitoffsetdata_source必填Get statistics about the indexed detections and stories
無需輸入參數。
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_profile必填Get detection suggestions for a specific technique. Returns existing detections, required data sources, and detection ideas.
source_typetechnique_id必填Generate 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.
name必填tacticseveritydescriptionsource_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_id必填include_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_id必填Get 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.
limitquery必填source_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.
topic必填limit_per_sourceGet quick counts of detections by source for a topic. Returns just the numbers, no detection details.
topic必填List detections whose NAME matches a pattern, grouped by source. Returns just name + ID pairs.
pattern必填source_typeCompare detections across sources, tactics, or techniques for a given topic. Returns breakdown by source, tactic, and severity.
topic必填Get 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_profile必填Get just the detection count for a technique (~50 bytes). Use this for quick coverage checks.
technique_id必填Analyze 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_name必填source_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_names必填source_typeGet full threat actor dossier: description, aliases, known techniques, software employed, and detection coverage status. Requires STIX data (ATTACK_STIX_PATH env var).
actor_name必填Search analytic stories by narrative, description, or name. Stories provide rich context about threat campaigns and detection strategies.
limitquery必填Get detailed information about a specific analytic story by name
name必填List all analytic stories with pagination
limitoffsetList analytic stories by category (e.g., "Malware", "Adversary Tactics", "Abuse")
limitoffsetcategory必填Save a query result for quick retrieval later. Useful for caching frequently needed data.
data必填name必填query_type必填ttl_minutesRetrieve a previously saved query result by name.
name必填List 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.
name必填template必填descriptionExecute a saved query template with the provided parameters. Returns the query results.
name必填paramsList 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.
name必填Delete a saved query template by name.
name必填Create 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
name必填columns必填description必填Insert a row of data into a dynamic table. Data is validated against the table schema.
data必填row_idtable_name必填Query 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_name必填List 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.
confirm必填table_name必填Get detailed schema information and statistics for a dynamic table.
table_name必填Create 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")
name必填entity_type必填Create 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.
reasoning必填to_entity必填confidencefrom_entity必填relation_type必填Add 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_name必填observation必填Remove an entity from the knowledge graph. This also removes all relations and observations associated with the entity.
name必填Remove a specific observation by its ID. Use open_entity first to find observation IDs.
observation_id必填Search 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
limitquery必填Read 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.
name必填Record 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.
context必填outcomedecision必填reasoning必填session_iddecision_type必填entities_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"
title必填insight必填evidenceapplicationslearning_type必填Get 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_query必填decision_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_query必填mark_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_type必填custom_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.
無需輸入參數。
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_id必填Get available fields for a Splunk data model with usage examples. Use this to understand what fields are available when writing a detection query.
data_model必填Get 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.
limitdescription必填source_typetechnique_idGenerate a detection template based on technique, learned patterns, and conventions. Returns YAML structure ready for customization.
platformdata_modeldescription必填technique_id必填detection_typeGenerate RBA (Risk-Based Alerting) structure for a detection based on learned patterns and best practices.
severity必填description必填detection_type必填fields_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.
contextoriginal必填corrected必填feedback_type必填已滿足適用檢查項的 80%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
請在儲存庫或註冊中心條目中宣告授權條款。
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