CrowdSentinels AI

Security

AI threat hunting & incident response for Elasticsearch/OpenSearch with endpoint & network forensics.

Your AI app calls the CrowdSentinels AI MCP server, which does the security work and sends the result back to the chat.

About CrowdSentinels AI

CrowdSentinels AI is a community MCP server from thomasxm, filed in our directory under security. AI threat hunting & incident response for Elasticsearch/OpenSearch with endpoint & network forensics.

CrowdSentinels AI runs on your own machine: your AI app starts it with the command uvx crowdsentinel-mcp-server==0.6.0 and talks to it over standard input and output.

CrowdSentinels AI is listed in the official MCP registry as io.github.thomasxm/crowdsentinel-mcp-server, version 0.6.0.

At a glance

Publisher
thomasxm (community)
Runs
Locally on your machine
Install from
Python package on PyPI: crowdsentinel-mcp-server
Written in
Python
License
GPL-3.0
GitHub stars
204
Official MCP registry
io.github.thomasxm/crowdsentinel-mcp-server

How to set up CrowdSentinels AI

  1. Install uv on the machine that runs your AI app, because CrowdSentinels AI starts with uvx and fetches its Python package on first run.
  2. Check the CrowdSentinels AI README for keys or settings; the registry lists none that CrowdSentinels AI requires.
  3. Add CrowdSentinels AI to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the CrowdSentinels AI tools to confirm the connection.
  5. Run one read-only task with CrowdSentinels AI first, and keep your app asking before each tool call until the results look right.

CrowdSentinels AI compared with similar servers

  • Sap Data by w1ccc has fewer GitHub stars than CrowdSentinels AI (203 against 204); both are community servers, and both run locally.
  • Secops by securityfortech has more GitHub stars than CrowdSentinels AI (219 against 204); both are community servers, and both run locally.
  • Shell by tumf has fewer GitHub stars than CrowdSentinels AI (202 against 204); both are community servers, and both run locally.

Before you connect CrowdSentinels AI

  • Give CrowdSentinels AI its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each CrowdSentinels AI tool call until you trust what it does with them.
  • Treat text that CrowdSentinels AI fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for CrowdSentinels AI on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for CrowdSentinels AI

How marketing and sales teams put CrowdSentinels AI to work, by company size. Pick the size closest to yours and start CrowdSentinels AI on one use case.

Small business

  • A small business can use CrowdSentinels AI to check its domains, logins and site for common gaps before they cost a customer's trust.
  • Owners can ask CrowdSentinels AI whether a tool or vendor has known issues before connecting it to customer data.
  • CrowdSentinels AI runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can use CrowdSentinels AI to review what each connected app can access and remove keys nobody uses.
  • Security and web teams can connect CrowdSentinels AI to scan campaign sites and forms before launch, not after an incident.
  • Start CrowdSentinels AI on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run CrowdSentinels AI in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
  • Large orgs can use CrowdSentinels AI to keep evidence for audits, showing which agents reached which data and when.
  • CrowdSentinels AI is a community server, so have security review the code and pin a version before CrowdSentinels AI touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

CrowdSentinels AI README

From thomasxm/CrowdSentinels-AI-MCP on GitHub, shared under its GPL-3.0 license. Images are left out; the original has them.

README.md

CrowdSentinel MCP Server

AI-Powered Threat Hunting & Incident Response Framework

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)
# Install with pip
pip install crowdsentinel-mcp-server

# Or install with uv
uv pip install crowdsentinel-mcp-server

# Download detection rules, Chainsaw, and Sigma rules (one-time)
crowdsentinel setup

# Validate connector configuration and readiness (offline, no external calls)
crowdsentinel doctor

Optional extras:

# Velociraptor live endpoint forensics (adds 25 MCP tools)
pip install 'crowdsentinel-mcp-server[velociraptor]'

# Long-tail deobfuscation coverage via chepy (XOR, exotic encodings).
# The stdlib decoder core works without this - chepy only extends it.
pip install 'crowdsentinel-mcp-server[deobf]'

# Posture scanner + remediation (adds `crowdsentinel posture` CLI and the
# `crowdsentinel-posture-mcp-server` MCP server). See docs/POSTURE.md.
pip install 'crowdsentinel-mcp-server[posture]'

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:

# Required for network traffic analysis and cross-tool IoC correlation
sudo apt install tshark    # Debian/Ubuntu/Kali
sudo dnf install wireshark-cli  # Fedora/RHEL
brew install wireshark     # macOS
Run directly with uvx (no install needed)
# Elasticsearch 8.x (default)
uvx crowdsentinel-mcp-server

# Other backends
uvx crowdsentinel-mcp-server-es7   # Elasticsearch 7.x
uvx crowdsentinel-mcp-server-es9   # Elasticsearch 9.x
uvx opensearch-mcp-server          # OpenSearch 1.x/2.x/3.x
Install from source
git clone https://github.com/thomasxm/CrowdSentinels-AI-MCP.git
cd CrowdSentinels-AI-MCP
chmod +x setup.sh && ./setup.sh

# Or install everything, including all optional extras (deobf/chepy, velociraptor)
./setup.sh --full

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):

Component Size Notes
CrowdSentinel package 49 MB The server itself
- Bundled Sigma rules (src/rules/) 30 MB 6,060 pre-converted detection rules
- Elastic TOML rules (src/detection-rules/) 17 MB Original TOML format rules + hunting queries
- Python code (clients, tools, etc.) 2 MB Actual application code
Dependencies 64 MB All transitive deps
- cryptography 14 MB Largest dependency (TLS)
- elasticsearch 8.3 MB ES Python client
- pygments 5.2 MB Syntax highlighting
- pydantic_core 5 MB Validation engine
- opensearchpy 3.6 MB OpenSearch client
- Others (27 packages) ~28 MB mcp, fastmcp, httpx, anthropic, etc.
Core total 113 MB pip install crowdsentinel-mcp-server

Additional tools (via crowdsentinel setup):

Component Download Installed Notes
Chainsaw binary (v2.13.1) ~3 MB ~15 MB EVTX log analysis engine
Sigma rules (SigmaHQ) ~3 MB ~30 MB 3,000+ Sigma rules for Chainsaw
Chainsaw mappings - <1 MB Event log source mappings
Setup total ~6 MB ~46 MB Stored in ~/.crowdsentinel/

System dependency (via package manager):

Component Installed Install Command Notes
tshark + Wireshark libs ~132 MB sudo apt install tshark PCAP network analysis - required for cross-tool IoC correlation

Full installation summary:

Scenario Total Disk Space
Core only (pip install) ~113 MB
Core + setup (crowdsentinel setup) ~159 MB
Full platform (+ tshark) ~291 MB

Note: PyPI download size is only 8.9 MB (wheel) thanks to compression of the bundled detection rules.

Quick Start

1. Set environment variables
export ELASTICSEARCH_HOSTS="https://localhost:9200"
export ELASTICSEARCH_API_KEY="your_api_key"
# Or use username/password:
# export ELASTICSEARCH_USERNAME="elastic"
# export ELASTICSEARCH_PASSWORD="your_password"
export VERIFY_CERTS="false"
2. Connect to an MCP Client

CrowdSentinel works with any MCP-compatible AI agent. Choose your client below:

Claude Code (CLI)
claude mcp add crowdsentinel \
  -e ELASTICSEARCH_HOSTS="https://localhost:9200" \
  -e ELASTICSEARCH_API_KEY="your_api_key" \
  -e VERIFY_CERTS="false" \
  -- uvx crowdsentinel-mcp-server
Claude Desktop

Edit ~/.config/Claude/claude_desktop_config.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "crowdsentinel": {
      "command": "uvx",
      "args": ["crowdsentinel-mcp-server"],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_API_KEY": "your_api_key",
        "VERIFY_CERTS": "false"
      }
    }
  }
}
VS Code Copilot

Create .vscode/mcp.json in your workspace:

{
  "servers": {
    "crowdsentinel": {
      "command": "uvx",
      "args": ["crowdsentinel-mcp-server"],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_API_KEY": "your_api_key",
        "VERIFY_CERTS": "false"
      }
    }
  }
}

Then enable MCP in VS Code settings: "chat.mcp.enabled": true

Cursor

Create or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "crowdsentinel": {
      "command": "uvx",
      "args": ["crowdsentinel-mcp-server"],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_API_KEY": "your_api_key",
        "VERIFY_CERTS": "false"
      }
    }
  }
}
Roo Code (VS Code Extension)

Create .roo/mcp.json in your workspace:

{
  "mcpServers": {
    "crowdsentinel": {
      "command": "uvx",
      "args": ["crowdsentinel-mcp-server"],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_API_KEY": "your_api_key",
        "VERIFY_CERTS": "false"
      }
    }
  }
}

Or configure via Roo Code settings panel: Settings > MCP Servers > Add Server.

Codex CLI and Continue CLI

After ./setup.sh, one script adds CrowdSentinel and the Posture server to either client, or both, and removes them again:

export ELASTICSEARCH_HOSTS="https://localhost:9200"   # for the CrowdSentinel server;
export ELASTICSEARCH_API_KEY="your_api_key"          # without these, only Posture is added
./scripts/mcp-clients.sh add codex        # or: continue, both
./scripts/mcp-clients.sh remove both      # takes both servers out again

Codex is changed through codex mcp add/remove. For Continue, the script edits ~/.continue/config.yaml: it keeps a timestamped backup and touches only its own two entries. The CrowdSentinel server needs Elasticsearch to be reachable when the client starts it; the script warns if it is not.

5ire

In 5ire settings (v0.15.0+), add an MCP server with:

  • Command: uvx
  • Arguments: crowdsentinel-mcp-server
  • Environment Variables:
    • ELASTICSEARCH_HOSTS = https://localhost:9200
    • ELASTICSEARCH_API_KEY = your_api_key
    • VERIFY_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):

{
  "mcpServers": {
    "crowdsentinel": {
      "command": "uvx",
      "args": ["crowdsentinel-mcp-server"],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_API_KEY": "your_api_key",
        "VERIFY_CERTS": "false"
      }
    }
  }
}

SSE transport (for web-based clients):

crowdsentinel-mcp-server --transport sse --port 8001
# Connect to: http://localhost:8001/sse/

HTTP transport (for REST API clients):

crowdsentinel-mcp-server --transport streamable-http --port 8001
# Connect to: http://localhost:8001/mcp/
3. Or use the CLI directly
# Download rules and tools (one-time)
crowdsentinel setup

# Check cluster health
crowdsentinel health

# Hunt for threats
crowdsentinel hunt "powershell encoded" -i winlogbeat-*

# Run detection rules
crowdsentinel rules -p windows --tactic credential_access
crowdsentinel detect windows_builtin_win_alert_mimikatz_keywords_lucene -i winlogbeat-*

# Analyse PCAP files
crowdsentinel pcap overview capture.pcap
crowdsentinel pcap beaconing capture.pcap

# Hunt EVTX logs with Chainsaw
crowdsentinel chainsaw hunt /path/to/evtx/ --sigma-rules /path/to/sigma/

CLI Usage

CrowdSentinel provides a full CLI for threat hunting from the terminal:

pip install crowdsentinel-mcp-server
crowdsentinel setup    # Download rules, Chainsaw, Sigma (one-time)
crowdsentinel --help
Available Commands
Command Description Example
setup Download detection rules, Chainsaw, and Sigma rules crowdsentinel setup
health Show cluster health crowdsentinel health
indices List all indices crowdsentinel indices
hunt IR-focused threat hunt with IoC extraction crowdsentinel hunt "powershell" -i winlogbeat-*
eql Execute an EQL query crowdsentinel eql "process where process.name == 'cmd.exe'" -i winlogbeat-*
esql Execute an ES|QL query crowdsentinel esql "FROM logs-* | LIMIT 10"
detect Execute a detection rule by ID crowdsentinel detect win_susp_logon -i winlogbeat-*
rules List available detection rules crowdsentinel rules -p windows --tactic credential_access --type eql
schema Detect schema for an index pattern crowdsentinel schema -i winlogbeat-*
ioc Hunt for a specific Indicator of Compromise crowdsentinel ioc 203.0.113.42 --type ip -i winlogbeat-*
analyse Analyse search results from stdin (JSON) cat results.json | crowdsentinel analyse -c "context"
analyse --mcp AI agent analysis using all 139 MCP tools crowdsentinel hunt "query" | crowdsentinel analyse --mcp -c "context"
auth Manage LLM authentication for agent mode crowdsentinel auth login
pcap Analyse PCAP files (overview, beaconing, lateral movement) crowdsentinel pcap beaconing capture.pcap
chainsaw Hunt EVTX logs with Chainsaw and Sigma rules crowdsentinel chainsaw hunt /path/to/evtx/
doctor Validate connector configuration and readiness (offline - no external calls) crowdsentinel doctor
Output Formats

All commands support --output/-o with three formats:

crowdsentinel hunt "failed login" -i winlogbeat-* -o json     # Structured JSON (default)
crowdsentinel hunt "failed login" -i winlogbeat-* -o table    # Human-readable table
crowdsentinel hunt "failed login" -i winlogbeat-* -o summary  # Condensed summary
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:

# Option 1: Browser sign-in (ChatGPT subscription - no API billing)
crowdsentinel auth login

# Option 2: Anthropic (setup-token or API key)
crowdsentinel auth login --provider anthropic

# Option 3: Environment variable
export ANTHROPIC_API_KEY="sk-ant-..."   # or OPENAI_API_KEY

# Option 4: Local models (Ollama, vLLM - free)
crowdsentinel analyse --mcp --model-url http://localhost:11434/v1 --model llama3.1

# Check auth status
crowdsentinel auth status

Agent flags:

Flag Default Description
--mcp off Enable AI agent with MCP tools
--mcp-server NAME:CMD none Add external MCP server (e.g., VirusTotal)
--model auto-detect LLM model to use
--model-url none OpenAI-compatible API endpoint
--max-steps 30 Maximum tool calls
--timeout 300 Maximum seconds
Pipeline Examples

Deterministic analysis (no API key needed):

# Hunt then analyse
crowdsentinel hunt "powershell encoded" -i winlogbeat-* -o json | \
  crowdsentinel analyse -c "Encoded PowerShell commands" -o summary

# Investigate failed authentication attempts
crowdsentinel hunt "event.code:4625" -i winlogbeat-* -o json | \
  crowdsentinel analyse -c "Failed login brute force investigation" -o summary

# Triage process execution and privilege escalation
crowdsentinel hunt "event.code:4688 OR event.code:4672 OR event.code:1" -i winlogbeat-* -o json | \
  crowdsentinel analyse -c "Process execution and privilege escalation" -o summary

AI agent investigation (requires auth):

# Credential dumping investigation - agent hunts, analyses kill chain, checks adjacent stages
crowdsentinel hunt "mimikatz OR lsass OR procdump" -i winlogbeat-* -o json | \
  crowdsentinel analyse --mcp -c "Credential dumping tools investigation" --max-steps 15 -o summary

# Encoded PowerShell - full IR workflow with kill chain and adjacent stage hunting
crowdsentinel hunt "powershell -enc OR FromBase64String" -i winlogbeat-* -o json | \
  crowdsentinel analyse --mcp -c "Full IR workflow: encoded PowerShell" --max-steps 30 -o table

# Process execution with detection rules
crowdsentinel hunt "event.code:4688" -i winlogbeat-* -o json | \
  crowdsentinel analyse --mcp -c "Execute detection rules against process creation" --max-steps 20 -o summary

# PCAP beaconing - agent generates IoCs and maps to kill chain
crowdsentinel pcap beaconing capture.pcap -o json | \
  crowdsentinel analyse --mcp -c "Investigate beaconing for C2 infrastructure" --max-steps 10 -o summary

# Anti-forensics investigation
crowdsentinel hunt "event.code:1102" -i winlogbeat-* -o json | \
  crowdsentinel analyse --mcp -c "Security log cleared - anti-forensics" --max-steps 10 -o summary

# With external MCP server (e.g., VirusTotal)
crowdsentinel hunt "powershell" -i winlogbeat-* -o json | \
  crowdsentinel analyse --mcp --mcp-server "vt:uvx virustotal-mcp-server" \
  -c "Check IoCs against VirusTotal" -o summary

Key Features

139 MCP Tools

Threat hunting, detection rules, forensics, endpoint collection, network analysis, cross-correlation, command deobfuscation, and IoC enrichment - all accessible via natural language

6,060 Detection Rules

Pre-built Lucene, EQL & ES|QL rules with automatic MITRE ATT&CK mapping

Investigation State

Persistent IoC tracking across tools and sessions with cross-source correlation and FIFO storage

4 Security Frameworks
  • Cyber Kill Chain (7 stages)
  • Pyramid of Pain (6 levels)
  • Diamond Model (4 vertices)
  • MITRE ATT&CK (automatic mapping)
5 Data Sources + Threat Intel
  • Elasticsearch / OpenSearch (SIEM)
  • Velociraptor (live endpoint forensics)
  • osquery (local host forensics)
  • EVTX logs (Chainsaw + Sigma)
  • PCAP files (Wireshark/TShark)
  • IoC enrichment (Shodan, VirusTotal, AbuseIPDB, ThreatFox)
  • MISP (export events, search attributes)

Architecture

CrowdSentinel (threat hunting and incident response) and Posture (scan and patch) are two platforms, each with its own MCP server. They work together through Elasticsearch and three main links: a handoff of hosts to check, an IR hold on hosts under investigation, and an activity index so hunts don't mistake Posture's scans for an attacker.

Text version of the CrowdSentinel MCP server, with the roadmap backends
┌─────────────────────────────────────────────────────────────────┐
│                 LLM Client / Claude Code CLI                    │
└─────────────────────────────┬───────────────────────────────────┘
                              │ MCP Protocol (stdio/SSE/HTTP)
                              │ HTTP: Origin validation (anti DNS-rebinding)
                              │       + transport-level audit logging
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│                    CrowdSentinel MCP Server                     │
│  ┌───────────────┐ ┌───────────────┐ ┌───────────────────────┐  │
│  │  139 Tools    │ │ 6,060 Rules   │ │ Security Frameworks   │  │
│  │ - Hunting     │ │ - Lucene      │ │ - Cyber Kill Chain    │  │
│  │ - Detection   │ │ - EQL         │ │ - Pyramid of Pain     │  │
│  │ - Forensics   │ │ - ES|QL       │ │ - Diamond Model       │  │
│  │ - Endpoint    │ │               │ │ - MITRE ATT&CK        │  │
│  │ - Network     │ ├───────────────┤ │                       │  │
│  │ - Enrichment  │ │ Schema        │ │ 9 MCP Resources       │  │
│  │ - Correlation │ │ Registry      │ │ (DFIR knowledge base) │  │
│  │ - Deobfuscate │ │ (data-driven) │ │                       │  │
│  └───────────────┘ └───────────────┘ └───────────────────────┘  │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │              Investigation State (Persistent)               ││
│  │    Cross-source IoC sharing, auto-capture, STIX 2.1 export  ││
│  └─────────────────────────────────────────────────────────────┘│
└─────┬──────────┬──────────┬──────────────┬─────────────┬────────┘
      │          │          │              │             │
      ▼          ▼          ▼              ▼             ▼
┌───────────┐ ┌──────────┐ ┌────────┐ ┌───────────┐ ┌───────────┐
│Elastic-   │ │Velocirap-│ │osquery │ │ Chainsaw  │ │ Wireshark │
│search/    │ │tor       │ │(local  │ │(EVTX/     │ │  (PCAP)   │
│OpenSearch │ │(EDR/DFIR)│ │ host)  │ │ Sigma)    │ │ (Network) │
│  (SIEM)   │ │(Endpoint)│ │        │ │(Offline)  │ │           │
└───────────┘ └──────────┘ └────────┘ └───────────┘ └───────────┘
                          │
  ┌───────────────────────┼───────────────────────┐
  ▼                       ▼                       ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────────────────┐
│ Shodan        │ │  VirusTotal   │ │  AbuseIPDB + ThreatFox    │
│ InternetDB    │ │     (v3)      │ │  + MISP (export/search)   │
│  (free/no key)│ │  (free tier)  │ │  (free tier)              │
└───────────────┘ └───────────────┘ └───────────────────────────┘
                          │
                          ▼ (Roadmap)
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│    Splunk     │ │     Wazuh     │ │     Zeek      │
│               │ │  (EDR/XDR)    │ │   (NSM/IDS)   │
└───────────────┘ └───────────────┘ └───────────────┘

What's Included

Tool Categories (139 Tools)
Category Tools Description
Elasticsearch Core 19 Index, document, cluster, alias, data stream, raw API operations
Threat Hunting 8 Attack pattern detection, kill-chain stage hunting, timeframe hunts, anomaly detection
EQL & ES|QL Hunting 11 Event-sequence queries, ES|QL pipes, saved hunt history, capability detection
Asset Discovery & Schema Intelligence 12 Index discovery, data-driven schema detection (ECS, Sysmon, auditd, Zeek, CloudTrail…), smart search
IoC Analysis & Deobfuscation 6 IoC extraction, encoded-command decoding, kill-chain mapping, investigation reports
Detection Rules 9 6,060 rule library - list, execute, validate, suggest, batch execution
Investigation Prompts 5 Fast triage spine - 10 critical IR questions
Chainsaw (EVTX) 5 Sigma rule hunting, iterative IoC discovery
Wireshark (PCAP) 11 Network forensics, beaconing, lateral movement detection, traffic decoding
Threat Intelligence 5 IoC enrichment (Shodan, VirusTotal, AbuseIPDB, ThreatFox) + MISP export/search
Investigation State 10 Persistent IoCs, cross-tool sharing, STIX 2.1 export, reporting
Velociraptor (Endpoint) 25 Live forensic artefact collection - processes, network, persistence, execution evidence, MFT, SRUM
osquery (Local Host) 4 SQL-based local host forensics - processes, sockets, users, ad-hoc queries
Cross-Source Correlation 5 SIEM ↔ endpoint pivots, IoC-driven endpoint hunts, unified timelines, time correlation
Workflow Guidance & Status 4 Next-step guidance, progressive disclosure, system status, storage cleanup

Velociraptor tools register when VELOCIRAPTOR_API_CONFIG is set; osquery tools register when a local osqueryi binary is present; the 10 high-risk write tools are hidden when DISABLE_HIGH_RISK_OPERATIONS=true.

Security Frameworks
Framework Purpose
Cyber Kill Chain Hunt by attack stage (7 stages), predict adversary's next move
Pyramid of Pain Prioritise IoCs by difficulty for attackers to change (6 levels)
Diamond Model Map adversary, capability, infrastructure, victim relationships
MITRE ATT&CK Automatic technique mapping for all detections
Detection Rules (6,060 Rules)
Type Count Source Description
Lucene 1,966 Sigma-converted Fast pattern matching queries
EQL 3,963 Sigma-converted + Elastic Event sequences and correlations
ES|QL 131 Elastic TOML rules Pipe-based query language (ES 8.11+)

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 deobf extra (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
Posture: Scan and Patch Hosts (optional)

After the hunt, crowdsentinel posture finds what is wrong with the hosts involved (missing security updates, weak configuration on Linux, FreeBSD and Windows, Active Directory exposures) and patches them, from the CLI or its own MCP server (crowdsentinel-posture-mcp-server).

Guard rails:

  • Scope first - nothing is contacted until a person imports the rules of engagement; OT/ICS is always excluded
  • A person approves what matters - when an AI asks (over MCP, or through the gate on the CLI), patch plans, scope imports, IR-hold acknowledgements, tokens and setup need an approver's SSH signature (ideally a FIDO key) over exactly what will happen; on the controller's own CLI these stay administrator actions
  • IR wins - hosts under investigation are never touched without a person's acknowledgement (with approver keys set, a signed grant that expires)

Install (needs Python 3.11+):

# Add the posture extra on top of the main package
pip install 'crowdsentinel-mcp-server[posture]'

# Or install from the source tree with the shared setup script
./setup.sh --with posture

First run - the guided wizard:

# Writes scope.yaml + setup.answers.yaml, imports the scope on your confirmation,
# and sets up the controller - one box or a whole CIDR fleet.
crowdsentinel posture quickstart

# Sanity-check what is installed
crowdsentinel posture doctor

CLI usage:

# Scan one host (or the whole scope) and view findings
crowdsentinel posture scan start --scope scope.yaml
crowdsentinel posture findings query --severity high

# Plan a fix, then a person signs it, then apply
crowdsentinel posture remediate plan --finding-id <id>
crowdsentinel posture remediate approve <plan-id>      # approver's SSH-signed grant
crowdsentinel posture remediate apply <plan-id>

# Export the findings
crowdsentinel posture export --format sarif  # also: xml, html, json

Run the posture MCP server:

# stdio transport (for MCP clients that spawn the server)
crowdsentinel-posture-mcp-server --transport stdio

# streamable-http transport (for remote clients)
crowdsentinel-posture-mcp-server --transport streamable-http --host 127.0.0.1 --port 8002

Add it to an MCP client (Claude Code, Codex, Continue - one script adds or removes both the IR and posture servers):

./scripts/mcp-clients.sh add codex        # or: claude, continue, both
./scripts/mcp-clients.sh remove both

Read docs/POSTURE.md before using it, in particular where the approval boundary is in user mode and system mode.

Configuration

Environment Variables
# Connection (required - choose one)
ELASTICSEARCH_HOSTS="https://localhost:9200"       # Self-hosted
# OR
ELASTICSEARCH_CLOUD_ID="deployment:base64..."      # Elastic Cloud

# Authentication - choose one (in priority order):
ELASTICSEARCH_BEARER_TOKEN="service_token_here"    # Service/bearer token
ELASTICSEARCH_API_KEY="your_api_key"               # API key (recommended)
ELASTICSEARCH_USERNAME="elastic"                   # Basic auth
ELASTICSEARCH_PASSWORD="your_password"

# TLS / Certificate verification
VERIFY_CERTS="true"                                # Verify against system CA bundle
# VERIFY_CERTS="/path/to/ca.crt"                   # Verify against custom CA certificate
# ELASTICSEARCH_CA_CERT="/path/to/ca.crt"          # Explicit CA certificate path
# ELASTICSEARCH_CLIENT_CERT="/path/to/client.crt"  # Client certificate (mTLS)
# ELASTICSEARCH_CLIENT_KEY="/path/to/client.key"   # Client private key (mTLS)

# Options
REQUEST_TIMEOUT="30"                               # Request timeout in seconds
DISABLE_HIGH_RISK_OPERATIONS="true"                # Block all write operations

# HTTP/SSE transport security (stdio unaffected)
# MCP_ALLOWED_ORIGINS="https://app.example.com"    # Extra allowed Origins (comma-separated); loopback always allowed

# Velociraptor endpoint forensics (optional - enables 25 extra tools)
# VELOCIRAPTOR_API_CONFIG="/path/to/api_client.yaml"

# Threat Intelligence (optional - Shodan InternetDB works without any key)
VIRUSTOTAL_API_KEY="your_vt_key"                   # Free: 500 lookups/day
ABUSEIPDB_API_KEY="your_abuse_key"                 # Free: 1,000 lookups/day
THREATFOX_API_KEY="your_tf_key"                    # Free: unlimited

# MISP Integration (optional - offline JSON export works without a server)
MISP_URL="https://misp.example.org"                # MISP instance URL
MISP_API_KEY="your_misp_key"                       # MISP API key (40-char hex)
# MISP_SSL_VERIFY="true"                           # Set "false" for self-signed (dev only)

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, set ELASTICSEARCH_CA_CERT to your CA certificate path.

Production Configuration Examples
Elastic Cloud
ELASTICSEARCH_CLOUD_ID="my-deployment:dXMtY2VudHJhbC0x..."
ELASTICSEARCH_API_KEY="your_cloud_api_key"
VERIFY_CERTS="true"
Self-Hosted with Custom CA
ELASTICSEARCH_HOSTS="https://es-cluster.internal:9200"
ELASTICSEARCH_API_KEY="your_api_key"
ELASTICSEARCH_CA_CERT="/etc/elasticsearch/certs/ca.crt"
VERIFY_CERTS="true"
Mutual TLS (mTLS)
ELASTICSEARCH_HOSTS="https://es-cluster.internal:9200"
ELASTICSEARCH_CA_CERT="/etc/elasticsearch/certs/ca.crt"
ELASTICSEARCH_CLIENT_CERT="/etc/elasticsearch/certs/client.crt"
ELASTICSEARCH_CLIENT_KEY="/etc/elasticsearch/certs/client.key"
VERIFY_CERTS="true"
Development / Testing (insecure)
ELASTICSEARCH_HOSTS="http://localhost:9200"
ELASTICSEARCH_USERNAME="elastic"
ELASTICSEARCH_PASSWORD="test123"
VERIFY_CERTS="false"

This configuration is not suitable for production. Use API keys with TLS in production environments.

Transport Modes
Mode Use Case Command
stdio (default) MCP clients (Claude Code, etc.) Auto-configured by setup.sh
SSE Web/streaming clients --transport sse --port 8000
HTTP REST API access --transport streamable-http

The HTTP transports are hardened at the transport layer:

  • Origin validation (anti DNS-rebinding) - browser requests are rejected unless their Origin is loopback or listed in MCP_ALLOWED_ORIGINS (comma-separated; * alone disables the check). Requests without an Origin header - 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):

DISABLE_HIGH_RISK_OPERATIONS="true"

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
You: Hunt for brute force attacks in the last hour

CrowdSentinel: Searching for failed authentication attempts...
[Calls hunt_by_timeframe with attack_types=["brute_force"]]

Found 47 failed login attempts from 3 source IPs targeting the "admin" account.
Top sources:
- 192.168.1.105: 28 attempts
- 10.0.0.42: 15 attempts
- 172.16.0.8: 4 attempts
Example 2: Investigate a Suspicious Host
You: Show me all activity on host DESKTOP-ABC123 in the last 24 hours

CrowdSentinel: Generating a forensic timeline for that host...
[Calls get_host_activity_timeline]

Timeline shows:
- 09:15: User "jsmith" logged in (Event 4624)
- 09:17: PowerShell executed encoded command
- 09:18: New scheduled task created "WindowsUpdate"
- 09:22: Outbound connection to 203.0.113.42:443
- 09:25: LSASS memory access detected
Example 3: Kill Chain Analysis
You: We found C2 beaconing. What should we hunt for next?

CrowdSentinel: Hunting adjacent kill chain stages...
[Calls hunt_adjacent_stages with current_stage="COMMAND_AND_CONTROL"]

Looking backwards (Installation stage):
- Found scheduled task persistence on 3 hosts
- Registry Run key modifications detected

Looking forwards (Actions on Objectives):
- Lateral movement to 2 additional hosts via SMB
- Credential dumping attempts detected
Example 4: Network Traffic Analysis
You: Analyse this PCAP for C2 beaconing

CrowdSentinel: Checking for regular connection intervals...
[Calls detect_beaconing on the PCAP file]

Detected beaconing pattern:
- Host: 192.168.1.50 → 203.0.113.100:443
- Interval: 60 seconds (±2s jitter)
- Duration: 4 hours
- Confidence: HIGH

Recommend blocking 203.0.113.100 and investigating 192.168.1.50.

Read the rest of the CrowdSentinels AI README on GitHub

Questions about CrowdSentinels AI

What is the CrowdSentinels AI MCP server?

AI threat hunting & incident response for Elasticsearch/OpenSearch with endpoint & network forensics. CrowdSentinels AI is maintained by thomasxm on GitHub at thomasxm/CrowdSentinels-AI-MCP, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the CrowdSentinels AI MCP server?

Add CrowdSentinels AI to your AI app's MCP config with the command uvx crowdsentinel-mcp-server==0.6.0. In Claude Code, run claude mcp add --transport stdio crowdsentinels-ai -- uvx crowdsentinel-mcp-server==0.6.0. To run CrowdSentinels AI this way you need uv installed.

Does CrowdSentinels AI need an API key?

The registry lists no required keys for CrowdSentinels AI. Check the CrowdSentinels AI README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is CrowdSentinels AI an official MCP server?

No. CrowdSentinels AI is a community server maintained by thomasxm. Community servers can be excellent; read the code and the open issues before you give CrowdSentinels AI access to company data.

What license is CrowdSentinels AI under?

CrowdSentinels AI is released under the GPL-3.0 license, according to its GitHub repository. The license covers the code of CrowdSentinels AI; the service it connects to has its own terms.