
Crowdsentinel Mcp Server
io.github.thomasxm由 GitHub 帳號 thomasxm 發布v0.6.0更新於 Nov 3, 2026
AI threat hunting & incident response for Elasticsearch/OpenSearch with endpoint & network forensics
概覽
在本機執行的 MCP 伺服器,讓 AI 助理在 Elasticsearch/OpenSearch 及端點、網路鑑識資料上進行威脅獵捕與事件應變。
- 可以做什麼
- 檢索與查詢 Elasticsearch/OpenSearch 的索引、文件、叢集、別名與資料流,並執行 EQL 與 ES|QL 查詢
- 依攻擊模式、攻擊鏈階段或時間範圍進行威脅獵捕,執行或列出內建偵測規則並對應 MITRE ATT&CK
- 擷取並解碼入侵指標,包括編碼的 PowerShell 與 base64 內容,並對應到攻擊鏈等框架
- 以 Chainsaw 與 Sigma 規則分析 EVTX 日誌、以 Wireshark/TShark 分析 PCAP 流量、以 osquery 檢查本機
- 透過 Velociraptor 蒐集端點即時鑑識資料,並在 SIEM、端點與網路來源之間交叉關聯
- 透過威脅情報服務與 MISP 充實指標,並保存持續性調查狀態、匯出 STIX 2.1
- 適用情境
- 適合資安分析師與事件應變人員用自然語言請助理查詢 SIEM、研判告警、執行偵測規則,並在端點與網路證據間橫向追查。最適合已運行 Elasticsearch 或 OpenSearch 且具備資安事件資料的團隊。
- 執行需求
- 以 Python 套件形式在本機執行(pip 或 uvx),需要 Elasticsearch 或 OpenSearch 端點(ELASTICSEARCH_HOSTS 或 ELASTICSEARCH_CLOUD_ID),並提供一組憑證:ELASTICSEARCH_API_KEY、ELASTICSEARCH_BEARER_TOKEN,或 ELASTICSEARCH_USERNAME 搭配 ELASTICSEARCH_PASSWORD。選用功能另需 tshark 以分析 PCAP、一次性下載 Chainsaw 與 Sigma 規則,以及威脅情報與 MISP 各自的金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Crowdsentinel Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
CrowdSentinel MCP Server
AI-Powered Threat Hunting & Incident Response Framework
[PyPI] [PyPI Downloads] [Python] [License] [MCP] [Tools] [Rules]
MCP Official Registry · PyPI Package
Open-source threat hunting orchestrator connecting LLMs to enterprise security data via Model Context Protocol (MCP)
Quick Start · Installation · CLI Usage · Features · Architecture · Documentation · Examples
Warning This project is in active development and intended for security testing, research, and educational purposes only. It is not production-ready. Do not deploy in production environments. APIs, tool interfaces, and data formats may change without notice. Use at your own risk.
Demo
https://github.com/user-attachments/assets/0d0381f0-5b68-43b2-8630-19ec130885b2
What is CrowdSentinel?
CrowdSentinel transforms traditional SIEM querying into intelligent, framework-driven investigations using natural language. It serves as a unified security intelligence layer that connects large language models to enterprise security data sources, enabling:
- Natural Language Threat Hunting — Query Elasticsearch using plain English
- AI-Guided Investigation Workflows — Built-in prompts guide agents through proper IR methodology
- Persistent Investigation State — Memory-managed IoC tracking, forensic timelines, and cross-query correlation that survives across sessions (8GB FIFO storage)
- Cross-Tool IoC Correlation — IoCs discovered in one tool are automatically available to all others
- Multi-Source Analysis — Elasticsearch, EVTX logs (Chainsaw), PCAP files (Wireshark), live endpoint forensics (Velociraptor), local host forensics (osquery)
- Velociraptor Endpoint Forensics — 25 MCP tools for live artefact collection (processes, network, persistence, execution evidence, NTFS MFT, SRUM, remote EVTX) with automatic IoC extraction
- Encoded-Command Deobfuscation — Automatically peels base64/UTF-16LE/gzip/hex layers off encoded commands (e.g. PowerShell
-EncodedCommand) so C2 addresses hidden inside them surface as IoCs - Adaptive Schema Intelligence — Data-driven schema registry (ECS, Sysmon, Windows Security, auditd, Zeek, Packetbeat, AWS CloudTrail) adapts hunts to each index's field conventions
- DFIR Knowledge Resources — 9 MCP resources exposing investigation playbooks, Pyramid of Pain reference, and cross-correlation guidance directly to connected AI agents
- Standalone CLI — Full threat hunting from the terminal without an MCP client
Installation
Install from PyPI (recommended)
Optional extras:
Detection rules (6,060 Lucene + EQL + ES|QL) are bundled with the package — no download needed. The setup command downloads additional tools:
- Chainsaw binary for EVTX analysis
- 3,000+ Sigma rules for Chainsaw
Downloaded tools are stored in ~/.crowdsentinel/ and persist across package upgrades.
System dependency for PCAP analysis:
Run directly with uvx (no install needed)
Install from source
The setup script will:
- Install dependencies (pipx, uv, Claude Code CLI if needed)
- Bundle 6,060 detection rules and download Chainsaw binary
- Prompt for Elasticsearch credentials (never hardcoded)
- Configure the MCP server with Claude Code
- Validate your connection
With --full, every optional extra is installed too, so all 139 MCP tools have their dependencies available — the recommended mode for a production-ready server.
Installed Size
CrowdSentinel bundles 6,060 detection rules and integrates with external analysis tools. Below is the full disk space breakdown so you can plan accordingly.
Core package (via pip or uvx):
Additional tools (via crowdsentinel setup):
System dependency (via package manager):
Full installation summary:
Note: PyPI download size is only 8.9 MB (wheel) thanks to compression of the bundled detection rules.
Quick Start
1. Set environment variables
2. Connect to an MCP Client
CrowdSentinel works with any MCP-compatible AI agent. Choose your client below:
Claude Code (CLI)
Claude Desktop
Edit ~/.config/Claude/claude_desktop_config.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
VS Code Copilot
Create .vscode/mcp.json in your workspace:
Then enable MCP in VS Code settings: "chat.mcp.enabled": true
Cursor
Create or edit ~/.cursor/mcp.json:
Roo Code (VS Code Extension)
Create .roo/mcp.json in your workspace:
Or configure via Roo Code settings panel: Settings > MCP Servers > Add Server.
5ire
In 5ire settings (v0.15.0+), add an MCP server with:
- Command:
uvx - Arguments:
crowdsentinel-mcp-server - Environment Variables:
ELASTICSEARCH_HOSTS=https://localhost:9200ELASTICSEARCH_API_KEY=your_api_keyVERIFY_CERTS=false
Note: 5ire v0.14.0 has known MCP compatibility issues. Use v0.15.0+ for reliable operation.
Any MCP Client (Generic)
stdio transport (default — works with most clients):
SSE transport (for web-based clients):
HTTP transport (for REST API clients):
3. Or use the CLI directly
CLI Usage
CrowdSentinel provides a full CLI for threat hunting from the terminal:
Available Commands
Output Formats
All commands support --output/-o with three formats:
Agent Mode (--mcp)
The analyse --mcp flag replaces deterministic analysis with an AI agent that autonomously uses all 139 MCP tools to investigate. The agent follows the 4-phase IR methodology: hunt, analyse, correlate, report.
Authentication:
Agent flags:
Pipeline Examples
Deterministic analysis (no API key needed):
AI agent investigation (requires auth):
Key Features
Architecture
What's Included
Tool Categories (139 Tools)
Velociraptor tools register when
VELOCIRAPTOR_API_CONFIGis set; osquery tools register when a localosqueryibinary is present; the 10 high-risk write tools are hidden whenDISABLE_HIGH_RISK_OPERATIONS=true.
Security Frameworks
Detection Rules (6,060 Rules)
Platforms: Windows, Linux, macOS, Cloud (AWS/Azure/GCP), Network, Identity
Log Sources: PowerShell, Sysmon, Security Events, Process Creation, Audit logs
Encoded-Command Deobfuscation
Real intrusions hide C2 addresses and URLs inside encodings the SIEM stores verbatim — most commonly PowerShell -EncodedCommand (base64 of UTF-16LE), but also FromBase64String, base64→gzip, bare base64, and hex blobs. CrowdSentinel decodes these layers automatically during IoC extraction and via the dedicated decode_command tool, so the inner indicators surface instead of staying buried:
- Zero extra dependencies — the decoder core uses only the Python standard library (
base64/zlib/codecs/binascii) - Optional long tail — install the
deobfextra (pip install 'crowdsentinel-mcp-server[deobf]') to add chepy for XOR and exotic encodings; its absence degrades gracefully - Provenance — every decode records its recipe (e.g.
base64->utf-16le) for the IR report - Safe by design — decode-only (nothing is executed), with depth and output-size bounds so a decompression bomb cannot hang the server
Configuration
Environment Variables
Security Warning: Never use
VERIFY_CERTS="false"or plain-text passwords in production. Use API keys or service tokens with TLS certificate verification enabled. For self-signed certificates, setELASTICSEARCH_CA_CERTto your CA certificate path.
Production Configuration Examples
Elastic Cloud
Self-Hosted with Custom CA
Mutual TLS (mTLS)
Development / Testing (insecure)
This configuration is not suitable for production. Use API keys with TLS in production environments.
Transport Modes
The HTTP transports are hardened at the transport layer:
- Origin validation (anti DNS-rebinding) — browser requests are rejected unless their
Originis loopback or listed inMCP_ALLOWED_ORIGINS(comma-separated;*alone disables the check). Requests without anOriginheader — every non-browser MCP client — are unaffected. - Audit logging — every HTTP exchange is logged at the transport boundary (JSON-RPC method, tool name, body size, path), including requests the tool layer never sees, such as unknown tools or protocol errors. Logs are metadata-only, memory-bounded, and sanitised against log forgery.
Disabling Write Operations
For read-only access (recommended for production):
This hides destructive tools: create_index, delete_index, index_document, delete_document, delete_by_query, create_data_stream, delete_data_stream, put_alias, delete_alias, general_api_request
Usage Examples
Example 1: Hunt for Brute Force Attacks
Example 2: Investigate a Suspicious Host
Example 3: Kill Chain Analysis
Example 4: Network Traffic Analysis
Example 5: CLI Threat Hunt
Compatibility
For Developers
Project Structure
Design Patterns
Adding a New Tool
- Create client method in
src/clients/common/your_module.py:
- Add to SearchClient in
src/clients/common/client.py:
- Create tool wrapper in
src/tools/your_tools.py:
- Register in server in
src/server.py:
Running Tests
The test suite is a bottom-up pyramid (see tests/README.md): hermetic unit tests, then live tiers that spin up a real Elasticsearch (via testcontainers) and the real MCP server.
Live tiers are opt-in (--run-integration / --run-api / --run-e2e / --run-system), so plain pytest tests/ stays fast and hermetic.
Local Testing Environment
Default credentials (testing only):
- Elasticsearch:
elastic/test123 - OpenSearch:
admin/admin
Roadmap
See CHANGELOG.md for detailed version history.
Velociraptor Integration (Live Endpoint Forensics)
CrowdSentinel integrates with Velociraptor for live endpoint forensic artefact collection. When configured, 25 additional MCP tools and 5 cross-correlation tools become available.
Setup
The API client config is generated from the Velociraptor server:
Available Tools
Cross-Source IoC Sharing
IoCs extracted from Velociraptor artefacts are automatically captured into the active investigation alongside SIEM, Chainsaw, and Wireshark findings. Use get_shared_iocs to retrieve the combined indicator set for cross-source correlation.
DFIR Knowledge Resources
9 MCP resources provide structured investigation reference data directly to connected AI agents:
Documentation
User Guides
Feature Guides
Developer Guides
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Licence
GNU General Public Licence v3.0 — See LICENSE for details.
Cyber Range
CrowdSentinel ships with a companion crowdsentinel-range — a fully ephemeral AWS lab that generates ground-truth-labeled attack telemetry so you can investigate real detections rather than synthetic data.
Current range (v1) — 2-host AWS lab
3 commands to go from zero to hunting:
Demo: 73,328 events triaged in ~40 seconds — 2 shellcode payloads decoded, C2 IP extracted from raw bytes, full IR report with 19 MITRE techniques.
Future range (v2) — enterprise AD environment
The next range generation targets full Active Directory kill-chain coverage: initial access → lateral movement → domain compromise, with a network security monitor layer, runtime security instrumentation, centralised vulnerability management, and deception infrastructure. Inspired by DetectionLab, Ludus, and SimuLand.
v2 target capabilities:
Design references: DetectionLab (Sysmon+WEF+Splunk convergence), Ludus (modular Proxmox/Ansible, VLAN segmentation), SimuLand (multi-domain AD forest, cloud-native), SANS FOR508 (artifact-first DFIR workflow), Falco (CO-RE eBPF probe architecture, kernel module fallback).
Acknowledgements
CrowdSentinel stands on the shoulders of outstanding open-source projects. Thank you to all of their maintainers and contributors.
Protocol & server framework
- Model Context Protocol — the protocol connecting LLMs to tools, by Anthropic
- FastMCP — the Python MCP server framework this project is built on
Analysis engines & forensic tools
- Chainsaw — EVTX log analyser by WithSecure Labs
- Velociraptor — live endpoint forensics and DFIR platform by Velocidex/Rapid7
- osquery — SQL-powered host instrumentation by the osquery Foundation
- Wireshark / TShark — network protocol analysis by the Wireshark Foundation
- Chepy — CyberChef-like decoding library powering optional long-tail deobfuscation
- sqlglot — SQL parser used to safely validate osquery queries
Detection content
- Sigma / SigmaHQ — the community detection rule standard and rule corpus
- Elastic detection-rules — Elastic's prebuilt EQL/ES|QL detection rules
- Community-contributed Sigma and custom rules
Data platforms & threat intelligence
- Elasticsearch and OpenSearch Python clients
- MISP / PyMISP — open-source threat intelligence platform and client
- stix2 — OASIS STIX 2.1 library for structured IoC export
- Shodan InternetDB, VirusTotal, AbuseIPDB, and abuse.ch ThreatFox — IoC enrichment services with free tiers
Development & testing
- testcontainers-python — real Elasticsearch containers for the live test tiers
- pytest, Ruff, Bandit — test runner, linting, and SAST
Methodology frameworks
- Cyber Kill Chain (Lockheed Martin), Pyramid of Pain (David J. Bianco), Diamond Model (Caltagirone, Pendergast & Betz), MITRE ATT&CK
來源:README.md,提交 bfca612
工具
0版本歷史
1- v0.6.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分