Wazuh MCP Server
Retrieves security alerts from Elasticsearch indices containing Wazuh data, transforming them into standardized MCP messages.
Uses Flask to expose an HTTP endpoint for serving transformed security event data to clients.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wazuh MCP Servershow me recent critical security alerts from the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wazuh MCP Server
Talk to your SIEM. Query alerts, hunt threats, check vulnerabilities, and trigger active responses across your entire Wazuh deployment — through natural conversation with any AI assistant.
v4.2.1 | 48 security tools | Wazuh 4.8.0–4.14.4 | Changelog
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_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.
Related MCP server: OpenSearch MCP Server
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.
Mode | LLM | Client | Data leaves your network? |
Cloud | Claude, GPT, etc. | Claude Desktop, any MCP client | Yes (to LLM provider) |
Local | Llama, Qwen, Mistral via Ollama | Open WebUI, mcphost, IBM/mcp-cli | No. 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
# 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:7bQuick 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.
48 Security Tools
Every tool is validated, rate-limited, scope-checked, and audit-logged.
Category | Tools | What They Do |
Alerts (4) |
| Query, filter, search, and analyze alert data via Elasticsearch |
Agents (6) |
| Monitor agent status, running processes, open ports, and configs |
Vulnerabilities (3) |
| Query CVEs by severity, agent, and package |
Security Analysis (6) |
| Threat analysis, IOC lookup, risk scoring, compliance checks |
System (10) |
| Cluster health, rules, manager logs, stats |
Active Response (9) |
| Block IPs, isolate hosts, kill processes, quarantine files |
Verification (5) |
| Verify active response actions took effect |
Rollback (5) |
| Undo active response actions |
Quick Start
Prerequisites
Docker 20.10+ with Compose v2
Wazuh 4.8.0–4.14.4 with API access enabled
Deploy
git clone https://github.com/gensecaihq/Wazuh-MCP-Server.git
cd Wazuh-MCP-Server
cp .env.example .envEdit .env:
WAZUH_HOST=your-wazuh-server
WAZUH_USER=your-api-user
WAZUH_PASS=your-api-passworddocker compose up -d
curl http://localhost:3000/healthConnect Claude Desktop
Settings → Connectors → Add custom connector
URL:
https://your-server/mcpAdd Bearer token in Advanced settings
Detailed setup: Claude Integration Guide
Security
This server sits between an LLM and your SIEM. Security is not optional.
Layer | What It Does |
RBAC | Per-tool scope enforcement. 14 active response tools require |
Audit Logging | Every destructive tool call (block IP, isolate host, kill process) is logged with client ID, session, timestamp, and full arguments. |
Output Sanitization | Credentials, tokens, and API keys in alert |
Input Validation | Every parameter validated: regex agent IDs, |
Rate Limiting | Per-client sliding window with escalating block duration (10s → 5min). |
Circuit Breakers | Wazuh API failures trigger fail-fast for 60s, auto-recover. Single trial in HALF_OPEN state. |
Log Sanitization | Global filter redacts passwords, tokens, secrets from all server logs. |
Container Hardening | Non-root user, read-only filesystem, |
# Generate a secure API key
python -c "import secrets; print('wazuh_' + secrets.token_urlsafe(32))"Configuration
Required
Variable | Description |
| Wazuh Manager hostname or IP |
| API username |
| API password |
Optional
Variable | Default | Description |
|
| Manager API port |
|
| Server bind address |
|
| Server port |
|
|
|
| auto-generated | JWT signing key |
|
| Allow active response in authless mode |
|
| CORS origins (comma-separated) |
| — | Redis URL for multi-instance session storage |
Wazuh Indexer (for alert search + vulnerabilities)
Variable | Default | Description |
| — | Indexer hostname |
|
| Indexer port |
| — | Indexer username |
| — | Indexer password |
Full reference: Configuration Guide
API Endpoints
Endpoint | Method | Description |
| POST/GET/DELETE | MCP Streamable HTTP (recommended) |
| GET | Legacy Server-Sent Events |
| GET | Health check (no auth required) |
| GET | Prometheus metrics |
| POST | Exchange API key for JWT |
| GET | OpenAPI documentation |
Architecture
src/wazuh_mcp_server/
├── server.py # MCP protocol + 48 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) clientTake It Further: Autonomous Agentic SOC
Combine this MCP server with Wazuh OpenClaw Autopilot to build a fully autonomous Security Operations Center.
While this server gives you conversational access to Wazuh, OpenClaw deploys AI agents that work around the clock — triaging alerts, correlating incidents, and recommending responses without human intervention.
Manual SOC: Alert → Analyst reviews → Hours → Response
Agentic SOC: Alert → AI triages → Seconds → Response ready for approvalDocumentation
Guide | Description |
Claude Desktop setup and authentication | |
Full configuration reference | |
HA, serverless, compact mode | |
Per-tool documentation | |
Security hardening guide | |
Common issues and solutions | |
Deployment, monitoring, maintenance |
Contributing
We welcome contributions. See Issues for bugs and feature requests, Discussions for questions.
License
Acknowledgments
Wazuh — Open source security platform
Model Context Protocol — AI tool integration standard
Ollama — Local LLM inference
Open WebUI — Self-hosted AI chat interface
mcphost — MCP CLI host with LLM support
Contributors
Avatar | Username | Contributions |
Code, Issues, Discussions | ||
Code, Discussions | ||
Code, PRs | ||
Code, Issues, PRs | ||
Code, PRs | ||
PRs | ||
PRs | ||
Code, PRs | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Issues | ||
Discussions | ||
Discussions | ||
Discussions |
Auto-updated by GitHub Actions
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gensecaihq/Wazuh-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server