Wazuh MCP Server logo

Wazuh MCP Server

Organization
gensecaihq

Production-grade MCP server for Wazuh SIEM — 55 security tools for alert triage, threat hunting, vulnerability management, compliance (PCI DSS, GDPR, HIPAA, NIST CSF, ISO 27001) and active response. Connect Claude or any LLM to your SOC. OAuth 2.1, RBAC, multi-cluster, air-gap ready.

Publishergensecaihq
RepositoryWazuh-MCP-Server
LanguagePython
Forks
64
Stars
237
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Wazuh MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    237 stars and 64 forks from the linked repository.

🛡️ Wazuh MCP Server

Talk to your SIEM in plain language.

Query alerts, hunt threats, triage vulnerabilities, and run active responses across your entire Wazuh deployment — through natural conversation with any AI assistant.

CI Security Audit Release License: MIT

Python 3.11+ MCP 2026-07-28 Wazuh 4.8.0–4.14.7 GHCR image Stars

55 security tools · dual-era MCP (2026-07-28 + legacy) · multi-cluster · fully air-gappable · production-hardened

Quick Start · Tools · Security · Docs · Changelog · Upgrading


What This Does

Your Wazuh SIEM generates thousands of alerts, vulnerability findings, and agent events daily. Investigating them means juggling dashboards, writing API queries, and manually correlating data across tools.

This MCP server turns that workflow into a conversation:

You:    "Show me critical alerts from the last hour"
AI:     [calls get_wazuh_alerts] Found 3 critical alerts:
        1. SSH brute force from 10.0.1.45 → agent-003 (Rule 5712, Level 10)
        2. Rootkit detection on agent-007 (Rule 510, Level 12)
        3. FIM change /etc/shadow on agent-001 (Rule 550, Level 10)

You:    "Block that source IP on agent-003"
AI:     [calls wazuh_block_ip] Blocked 10.0.1.45 via firewall-drop on agent-003.

You:    "Which agents have unpatched critical CVEs?"
AI:     [calls get_wazuh_critical_vulnerabilities] 3 agents with critical vulnerabilities...

It works with Claude Desktop, Open WebUI + Ollama (fully local, air-gapped), mcphost, or any MCP-compliant client.


Works With Cloud AND Local LLMs

This is a standard MCP tool server. It doesn't care what LLM you use — it just executes tools and returns results.

ModeLLMClientData leaves your network?
CloudClaude, GPT, etc.Claude Desktop, any MCP clientYes (to LLM provider)
LocalLlama, Qwen, Mistral via OllamaOpen WebUI, mcphost, IBM/mcp-cliNo. Fully air-gappable.

For security teams that can't send SIEM data to cloud APIs (compliance, air-gapped networks, data sovereignty), the local mode with Ollama keeps everything on-premises. Both modes coexist — same server, same tools, same API.

Quick Start: Local LLM with mcphost

bash
# 1. Start the MCP server
docker compose up -d

# 2. Install mcphost (Go binary, no dependencies)
go install github.com/mark3labs/mcphost@latest

# 3. Configure
cat > ~/.mcphost.yml << 'EOF'
mcpServers:
  wazuh:
    type: remote
    url: http://localhost:3000/mcp
    headers: ["Authorization: Bearer ${env://MCP_API_KEY}"]
EOF

# 4. Chat with your SIEM using a local model
export MCP_API_KEY="your-key-from-server-logs"
mcphost --model ollama/qwen2.5:7b

Quick Start: Multi-User SOC with Open WebUI

Open WebUI v0.6.31+ connects to our /mcp endpoint natively. Add it as an MCP tool server in Admin Settings, and your entire team gets AI-powered SIEM analysis with conversation history, RBAC, and a web UI.


55 Security Tools

Every tool is validated, rate-limited, scope-checked, and audit-logged.

CategoryToolsWhat They Do
Alerts (5)get_wazuh_alerts get_wazuh_alert_summary get_alerts_aggregated analyze_alert_patterns search_security_eventsQuery, filter, search, and aggregate alert data via the Indexer. Timestamps accept ISO 8601 or relative date math (now-24h); get_alerts_aggregated summarizes a whole period with no document limit
Agents (6)get_wazuh_agents get_wazuh_running_agents check_agent_health get_agent_processes get_agent_ports get_agent_configurationMonitor agent status, running processes, open ports, and configs
Vulnerabilities (3)get_wazuh_vulnerabilities get_wazuh_critical_vulnerabilities get_wazuh_vulnerability_summaryQuery CVEs by severity, agent, and package
Security Analysis (6)analyze_security_threat check_ioc_reputation search_external_context perform_risk_assessment get_top_security_threats generate_security_reportThreat analysis, IOC lookup, optional web context, risk scoring, security reports
Compliance (6)run_compliance_check get_iso27001_dashboard get_iso27001_control_detail get_iso27001_gap_analysis get_iso27001_alerts get_sca_policy_checksCompliance scoring for PCI-DSS, HIPAA, SOX, GDPR, NIST, and ISO 27001:2022 (Annex A control mapping, gap analysis, SCA detail)
System (10)get_wazuh_statistics get_wazuh_cluster_health get_wazuh_cluster_nodes get_wazuh_rules_summary search_wazuh_manager_logs get_wazuh_manager_error_logs get_wazuh_log_collector_stats get_wazuh_remoted_stats get_wazuh_weekly_stats validate_wazuh_connectionCluster health, rules, manager logs, stats, connectivity
Active Response (9)wazuh_block_ip wazuh_isolate_host wazuh_kill_process wazuh_disable_user wazuh_quarantine_file wazuh_firewall_drop wazuh_host_deny wazuh_active_response wazuh_restartBlock IPs, isolate hosts, kill processes, quarantine files
Verification (5)wazuh_check_blocked_ip wazuh_check_agent_isolation wazuh_check_process wazuh_check_user_status wazuh_check_file_quarantineVerify active response actions took effect
Rollback (5)wazuh_unisolate_host wazuh_enable_user wazuh_restore_file wazuh_firewall_allow wazuh_host_allowUndo active response actions

The 14 state-changing tools (Active Response + Rollback) require the wazuh:write scope; everything else needs only wazuh:read. ISO 27001 also adds an iso27001_assessment guided prompt (5 prompts total).


Quick Start

Prerequisites

  • Docker 20.10+ with Compose v2
  • Wazuh 4.8.0–4.14.7 with API access enabled

Deploy

bash
git clone https://github.com/gensecaihq/Wazuh-MCP-Server.git
cd Wazuh-MCP-Server
cp .env.example .env

Edit .env:

env
WAZUH_HOST=your-wazuh-server
WAZUH_USER=your-api-user
WAZUH_PASS=your-api-password
bash
docker compose up -d
curl http://localhost:3000/health

Pre-built image

A multi-arch image (amd64/arm64) is published to GitHub Container Registry on every release and on every push to main:

bash
docker pull ghcr.io/gensecaihq/wazuh-mcp-server:latest   # main branch
docker pull ghcr.io/gensecaihq/wazuh-mcp-server:4.3.0    # pinned release
bash
docker run -d --name wazuh-mcp-server --env-file .env -p 3000:3000 \
  ghcr.io/gensecaihq/wazuh-mcp-server:latest

Connect Claude Desktop

  1. Settings → Connectors → Add custom connector
  2. URL: https://your-server/mcp
  3. Add Bearer token in Advanced settings

Detailed setup: Claude Integration Guide


Security

This server sits between an LLM and your SIEM. Security is not optional.

LayerWhat It Does
RBACPer-tool scope enforcement, fail-closed: a token with no scope claim gets read-only, never write. The 14 state-changing tools (active response + rollback) require wazuh:write, which is opt-in (MCP_API_KEY_SCOPES="wazuh:read wazuh:write"). Authless mode is read-only unless AUTHLESS_ALLOW_WRITE=true.
Audit LoggingEvery destructive tool call (block IP, isolate host, kill process) is logged with client ID, session, timestamp, and full arguments.
Output SanitizationCredentials, tokens, and API keys in alert full_log fields are redacted before reaching the LLM. Prevents credential leakage through AI responses.
Input ValidationEvery parameter validated: regex agent IDs, ipaddress module for IPs, shell metacharacter blocking for active response, Elasticsearch Query DSL (no string interpolation).
Rate LimitingPer-principal sliding window (keyed on the authenticated client + trusted-proxy IP), with a short retry-after backoff — seconds until the oldest request leaves the window, not a fixed multi-minute block.
Circuit BreakersWazuh API failures trigger fail-fast for 60s, auto-recover. Single trial in HALF_OPEN state.
Log SanitizationGlobal filter redacts passwords, tokens, secrets from all server logs.
Container HardeningNon-root user, read-only filesystem, CAP_DROP ALL, no-new-privileges.
bash
# Generate a secure API key
python -c "import secrets; print('wazuh_' + secrets.token_urlsafe(32))"

Configuration

Required

VariableDescription
WAZUH_HOSTWazuh Manager hostname or IP
WAZUH_USERAPI username
WAZUH_PASSAPI password

Optional

VariableDefaultDescription
ENVIRONMENTdevelopmentproduction enforces stricter checks (see below)
WAZUH_PORT55000Manager API port
WAZUH_VERIFY_SSLtrueVerify the Manager's TLS certificate
MCP_HOST0.0.0.0Server bind address
MCP_PORT3000Server port
AUTH_MODEbeareroauth, bearer, or none
AUTH_SECRET_KEYauto (dev only)JWT signing key. Required when ENVIRONMENT=production (the server refuses to start without it) — set the same value on every instance
MCP_API_KEYauto (dev only)Pre-set API key (wazuh_…)
MCP_API_KEY_SCOPESwazuh:readScopes for MCP_API_KEY. Add wazuh:write to enable active-response tools
AUTHLESS_ALLOW_WRITEfalseAllow active response in authless mode
ALLOWED_ORIGINShttps://claude.ai,...CORS origins (comma-separated)
TRUSTED_PROXIES—Proxy IPs to trust for X-Forwarded-For (correct per-client rate limiting behind a proxy)
REDIS_URL—Redis URL for multi-instance session storage
RESPONSE_FORMATjsonWire format for alert/event/vulnerability results: json or gcf (see below)

Response encoding (GCF)

Alert, security-event, and vulnerability tools return uniform record collections under a data.affected_items array. Setting RESPONSE_FORMAT=gcf encodes those responses as a Graph Compact Format generic wire instead of JSON, factoring the repeated field names into a single header so the response uses fewer tokens when it crosses the LLM boundary.

It is opt-in, lossless, and every response stays complete (a format change only, no cross-turn deduplication, so no alert is ever omitted). If encoding fails — or the encoder isn't installed — the tool falls back to JSON. It composes with the existing compact field-projection parameter.

The encoder is one zero-dependency package (pinned exact). Install it directly, or via the gcf extra from a source checkout:

bash
pip install gcf-python==2.5.1        # direct
pip install ".[gcf]"                 # or, from a clone of this repo

Production note: the server listens over plain HTTP — terminate TLS at a reverse proxy or load balancer. OAuth knobs (OAUTH_ENABLE_DCR — off by default, OAUTH_*_TTL) and rate-limit tuning (RATE_LIMIT_REQUESTS, RATE_LIMIT_WINDOW) are in the Configuration Guide.

Wazuh Indexer (for alert search + vulnerabilities)

VariableDefaultDescription
WAZUH_INDEXER_HOST—Indexer hostname (an http:// prefix selects plain HTTP)
WAZUH_INDEXER_PORT9200Indexer port
WAZUH_INDEXER_USER—Indexer username
WAZUH_INDEXER_PASS—Indexer password
WAZUH_INDEXER_SSLtrueUse HTTPS for the Indexer (set false for a plain-HTTP OpenSearch node)
WAZUH_INDEXER_VERIFY_SSLtrueVerify the Indexer's TLS certificate
YDC_API_KEY—Optional You.com API key. Enables the search_external_context tool
YDC_BASE_URLhttps://ydc-index.ioOptional You.com Search API base URL
YDC_VERIFY_SSLtrueVerify You.com TLS certificates independently of Wazuh
WAZUH_CLUSTERS_FILE./config/clusters.jsonOptional multi-cluster topology file (see below)
WAZUH_AR_FIREWALL_UNDO_COMMAND—Custom active-response command that removes a firewall-drop block. Required for wazuh_firewall_allow — stock Wazuh can't unblock via the API
WAZUH_AR_HOSTDENY_UNDO_COMMAND—Custom active-response command that removes a hosts.deny block. Required for wazuh_host_allow

Full reference: Configuration Guide

Multi-Cluster (optional)

Managing several Wazuh deployments? Drop a clusters.json next to your config (see config/clusters.json.example) and every tool gains an optional cluster_id argument plus a list_wazuh_clusters tool:

  • No clusters.json → single-cluster behavior from env vars, exactly as before.
  • With clusters.json → named clusters, each with its own Manager (and optionally Indexer) credentials; "${ENV_VAR}" values are resolved from the environment so secrets stay out of the file. The env-configured cluster remains reachable as default.
  • Cross-Cluster Search → point clusters at a shared OpenSearch CCS coordinator and set ccs_prefix (the remote-cluster name); alert/vulnerability queries become eu:wazuh-alerts-*. An entry with "ccs_prefix": "*" gives you an all pseudo-cluster that searches every remote cluster at once.

API Endpoints

EndpointMethodDescription
/mcpPOST/GET/DELETEMCP Streamable HTTP (recommended)
/sseGETLegacy Server-Sent Events
/healthGETLiveness probe — 200 while the process is up (no dependency checks; use for the container healthcheck)
/readyGETReadiness probe — checks Wazuh Manager/Indexer reachability; 503 when a dependency is down
/metricsGETPrometheus metrics
/auth/tokenPOSTExchange API key for JWT (bearer mode)
/.well-known/oauth-authorization-serverGETOAuth 2.0 discovery (oauth mode)
/.well-known/oauth-protected-resourceGETOAuth protected-resource metadata, RFC 9728 (oauth mode)
/docsGETOpenAPI documentation

Architecture

src/wazuh_mcp_server/
├── server.py           # MCP protocol + 55 tool handlers
├── config.py           # Environment-based configuration
├── auth.py             # JWT + API key authentication
├── oauth.py            # OAuth 2.0 with Dynamic Client Registration
├── security.py         # Rate limiting, CORS, input validation
├── monitoring.py       # Prometheus metrics, structured logging
├── resilience.py       # Circuit breakers, retries, graceful shutdown
├── session_store.py    # Pluggable sessions (in-memory + Redis)
└── api/
    ├── wazuh_client.py    # Wazuh Manager REST API client
    └── wazuh_indexer.py   # Wazuh Indexer (Elasticsearch) client

Take It Further: Autonomous Agentic SOC

Combine this MCP server with Wazuh Autopilot to build an agentic Security Operations Center.

While this server gives you conversational access to Wazuh, Autopilot runs an eleven-agent AI SOC team on top of it around the clock — a seven-stage reactive pipeline (triage → correlation → investigation → response) plus four proactive specialists (vulnerability management, threat intel, threat hunting, detection engineering). Every containment action is gated behind two-tier human approval. Runs on OpenClaw, Hermes, or NVIDIA NemoClaw.

Manual SOC:    Alert → Analyst reviews → Hours → Response
Agentic SOC:   Alert → AI triages → Seconds → Response ready for approval

Explore Wazuh Autopilot


Documentation

GuideDescription
Claude IntegrationClaude Desktop setup and authentication
ConfigurationFull configuration reference
Advanced FeaturesHA, serverless, compact mode
API DocumentationPer-tool documentation
SecuritySecurity hardening guide
TroubleshootingCommon issues and solutions
OperationsDeployment, monitoring, maintenance

Contributing

We welcome contributions. See Issues for bugs and feature requests, Discussions for questions.


License

MIT


Acknowledgments


Contributors

AvatarUsernameContributions
@alokemajumder💻 Code, 🐛 Issues, 🔀 PRs, 💬 Discussions
@Karibusan💻 Code, 🐛 Issues, 🔀 PRs
@gensecai-dev💻 Code, 🔀 PRs, 💬 Discussions
@aiunmukto💻 Code, 🔀 PRs
@andrzej-piotrowski-pl💻 Code, 🔀 PRs
@kanylbullen💻 Code, 🔀 PRs
@lucascruzb💻 Code, 🔀 PRs
@lwsinclair💻 Code, 🔀 PRs
@mouse-value-add💻 Code, 🔀 PRs
@SiM22💻 Code, 🔀 PRs
@blackwell-systems🔀 PRs
@DrRSatzteil🔀 PRs
@MilkyWay88🔀 PRs
@taylorwalton🔀 PRs
@cbassonbgroup🐛 Issues
@cybersentinel-06🐛 Issues
@daod-arshad🐛 Issues
@mamema🐛 Issues
@marcolinux46🐛 Issues
@matveevandrey🐛 Issues
@punkpeye🐛 Issues
@tonyliu9189🐛 Issues
@Uberkarhu🐛 Issues
@bl4ck5w4n07💬 Discussions
@gnix45💬 Discussions
@hackdefendr💬 Discussions
@melmasry1987💬 Discussions
@Vasanth120v💬 Discussions
@wqfh💬 Discussions

Legend: 💻 Code · 🐛 Issues · 🔀 Pull Requests · 💬 Discussions

Auto-updated by GitHub Actions

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "gensecaihq-wazuh-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Use Wazuh MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Wazuh MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Wazuh MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Wazuh MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "gensecaihq-wazuh-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "Wazuh-MCP-Server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Wazuh MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Wazuh MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Wazuh MCP Server to help me with this task?
Wazuh MCP Server
Sure. I read it.
Here is what I found using Wazuh MCP Server.

Option 2: Add an MCP server URL

Use this when Wazuh MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Wazuh MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Wazuh MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Wazuh MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Wazuh MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Wazuh MCP Server to help me with this task?
Wazuh MCP Server
Sure. I read it.
Here is what I found using Wazuh MCP Server.

Frequently asked questions

What is the Wazuh MCP Server MCP server used for?

Wazuh MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Wazuh MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Wazuh MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Wazuh MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Wazuh MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Wazuh MCP Server MCP to TypingMind?

Wazuh MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Wazuh MCP Server MCP provide in TypingMind?

Wazuh MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Wazuh MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Wazuh MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇