wazuh-mcp-soc

wazuh-mcp-soc

Enables natural-language security operations by connecting Wazuh SIEM to Claude Desktop via MCP, allowing querying of alerts, agents, vulnerabilities, and generating security reports with Slack integration.

Category
Visit Server

README

๐Ÿ” Wazuh SIEM ร— Claude Desktop โ€” Conversational SOC via MCP

A complete walkthrough of my hands-on cybersecurity project integrating a SIEM with an AI assistant to enable natural-language security operations.


๐ŸŽฏ Project Overview

This project demonstrates how AI can augment SOC operations by connecting Wazuh SIEM to Claude Desktop through the MCP (Model Context Protocol), allowing a security analyst to query the SIEM in natural language and receive instant, structured analysis โ€” without manually navigating dashboards.

Slack enrichment is handled both automatically (Wazuh native integration, level 7+ alerts) and on-demand (via Claude Desktop conversation).

What I accomplished:

  • โœ… Deployed Wazuh Manager + Indexer on Ubuntu Server VM
  • โœ… Connected Windows and Kali Linux agents to the Wazuh Manager
  • โœ… Built a Python MCP server exposing 5 tools to Claude Desktop
  • โœ… Enabled natural-language querying of alerts, agents, and vulnerabilities
  • โœ… Configured automatic Slack notifications for critical alerts (level 7+)
  • โœ… Added on-demand AI-enriched Slack reporting from Claude Desktop

๐Ÿ—๏ธ Architecture

[Physical Machine โ€” Windows 10 โ€” Claude Desktop]
        โ”‚
        โ”‚ stdio (local subprocess)
        โ–ผ
  wazuh_mcp_server.py  โ†โ”€โ”€ Python MCP Server
        โ”‚
        โ”œโ”€โ”€ HTTPS :55000 โ†’ Wazuh Manager API
        โ”œโ”€โ”€ HTTPS :9200  โ†’ Wazuh Indexer (OpenSearch)
        โ””โ”€โ”€ HTTPS        โ†’ Slack Webhook
        โ”‚
        โ–ผ
[VM Ubuntu Server โ€” Wazuh Manager + Indexer]
        โ–ฒ
        โ”‚ Logs / Heartbeat (port 1514)
        โ”œโ”€โ”€ [VM Windows โ€” Wazuh Agent]
        โ””โ”€โ”€ [VM Kali    โ€” Wazuh Agent]

๐Ÿ› ๏ธ Technical Implementation

Environment Setup

Host OS       : Windows 10 (Claude Desktop + Python MCP Server)
VM 1          : Ubuntu Server โ€” Wazuh Manager 4.11.2 + Wazuh Indexer
VM 2          : Windows 10   โ€” Wazuh Agent
VM 3          : Kali Linux   โ€” Wazuh Agent / Attack simulation
Hypervisor    : VMware

MCP Server โ€” 5 Tools Built

Tool Description
get_critical_alerts Fetch alerts filtered by severity and time range
get_agents_status List all agents with status, IP, OS, version
get_vulnerabilities CVEs detected per agent, filtered by severity
generate_security_report Aggregate alerts + agents + vulns into a full report
send_to_slack Post AI-enriched analysis to the SOC Slack channel

Natural Language Queries (Examples)

"Show me critical alerts from the last 24 hours"
"Which agents have unpatched critical vulnerabilities?"
"Generate a security report with recommendations"
"Send the critical alerts to Slack with an analysis"

Slack Integration

Automatic โ€” via Wazuh native integration in ossec.conf :

<integration>
  <name>custom-slack</name>
  <hook_url>https://hooks.slack.com/services/XXX/YYY/ZZZ</hook_url>
  <level>7</level>
  <alert_format>json</alert_format>
</integration>

On-demand โ€” via send_to_slack MCP tool called by Claude Desktop, posting an AI-generated summary with alert details, severity color coding, and timestamp directly to the SOC channel.

Claude Desktop Configuration

{
  "mcpServers": {
    "wazuh": {
      "command": "python",
      "args": ["C:\\wazuh-mcp\\wazuh_mcp_server.py"]
    }
  }
}

Network Ports Required

sudo ufw allow 55000/tcp   # Wazuh Manager API
sudo ufw allow 9200/tcp    # Wazuh Indexer (OpenSearch)
sudo ufw allow 1514/tcp    # Agent communication

๐Ÿ“Š Results & Findings

What Worked Well

  • โœ… Full natural-language SIEM querying in seconds
  • โœ… Real-time alert detection (SSH sudo usage, PAM sessions, brute-force attempts)
  • โœ… AI-generated security reports with structured recommendations
  • โœ… Dual Slack enrichment โ€” automatic + on-demand from Claude Desktop
  • โœ… Multi-agent visibility (Ubuntu Manager, Windows agent, Kali agent)

Key Lessons

  • MCP bridges the gap between complex security tools and conversational AI
  • Separating authentication systems (Wazuh API vs Indexer) is critical to avoid errors
  • AI enrichment reduces the time an analyst spends interpreting raw log data
  • Natural-language interfaces lower the barrier to entry for SOC operations

๐Ÿ”’ Security Notes

  • API account used with read-only scope (principle of least privilege)
  • Secrets managed via .env file โ€” never committed to version control
  • WAZUH_VERIFY_SSL=true recommended in production with valid certificates
  • Indexer port 9200 should be restricted to trusted IPs only in production

๐Ÿ› ๏ธ Skills Demonstrated

Technical Skills

  • SIEM deployment and configuration (Wazuh)
  • Python async development (httpx, MCP SDK)
  • REST API integration (JWT authentication, OpenSearch queries)
  • Multi-VM network configuration (VMware, bridged networking)
  • AI tool integration (Claude Desktop, MCP protocol)
  • Slack API (Incoming Webhooks, Block Kit formatting)

Security Skills

  • Alert triage and severity classification
  • Vulnerability management workflow
  • SOC operations and incident analysis
  • Security report generation

โš™๏ธ Installation

Prerequisites

  • Python 3.10+
  • Wazuh Manager + Indexer (Ubuntu Server)
  • Claude Desktop
  • Slack Incoming Webhook URL

Setup

git clone https://github.com/cisse-lalya/wazuh-mcp-soc.git
cd wazuh-mcp-soc
pip install -r requirements.txt
copy .env.example .env
notepad .env   # Fill in your Wazuh + Slack credentials

.env Configuration

WAZUH_API_URL=https://<WAZUH_VM_IP>:55000
WAZUH_API_USER=wazuh
WAZUH_API_PASSWORD=your_password

WAZUH_INDEXER_URL=https://<WAZUH_VM_IP>:9200
WAZUH_INDEXER_USER=admin
WAZUH_INDEXER_PASSWORD=your_password

WAZUH_VERIFY_SSL=false
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXX/YYY/ZZZ

Test Connection

python -c "from dotenv import load_dotenv; load_dotenv(); import asyncio; from wazuh_client import WazuhClient; c=WazuhClient(); print(asyncio.run(c.get_agents_status()))"

๐Ÿงฐ Tech Stack

Wazuh 4.11.2 ยท OpenSearch ยท Claude Desktop ยท MCP Protocol ยท Python 3.13 ยท httpx ยท Slack Webhooks ยท VMware ยท Ubuntu Server ยท Windows 10 ยท Kali Linux


๐Ÿ‘ค About Me

Cybersecurity student and Junior SOC Analyst, passionate about bridging network operations and security through automation and AI-driven tooling. This project reflects my approach to security: building practical, integrated solutions rather than studying tools in isolation.

Connect with me:

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured