by gensecaihq
Provides AI‑driven conversational access to Wazuh SIEM data, allowing natural‑language queries, threat analysis, incident triage, and compliance checks through a Model Context Protocol‑compliant remote server.
Enables security teams to interact with Wazuh SIEM using plain English. The server acts as a secure bridge that translates natural‑language requests into Wazuh API calls, exposing 29 specialized tools for alert handling, agent management, vulnerability assessment, threat analysis, and system monitoring.
.env file.docker compose up -d)./auth/token./mcp endpoint using the JWT token.Q: Do I need Python installed on the host?\nA: No. The Docker image contains all dependencies; only Docker is required on the host.
Q: Can I use the server with Claude Desktop?\nA: Yes. Configure a custom connector in Claude Desktop pointing to the /mcp endpoint and provide the Bearer token (OAuth is recommended for production).
Q: What authentication modes are supported?\nA: oauth (recommended for Claude), bearer (API key → JWT), and none (development only).
Q: How does compact mode affect the data?\nA: It returns only essential fields (timestamp, agent, rule, severity, etc.), reducing payload size by about two‑thirds while preserving context for LLMs.
Q: Is the server HA‑ready?\nA: Yes. Built‑in circuit breakers, retry logic, and optional Redis session storage enable horizontal scaling and graceful degradation.
The Problem: Security teams using Wazuh SIEM generate thousands of alerts, vulnerabilities, and events daily. Analyzing this data requires constant context-switching between dashboards, writing API queries, and manually correlating information. AI assistants like Claude could help, but they can't natively access your Wazuh infrastructure.
The Solution: This MCP (Model Context Protocol) server acts as a secure bridge between AI assistants and your Wazuh deployment. It exposes 29 specialized security tools that let Claude directly query alerts, analyze threats, check agent health, assess vulnerabilities, and generate compliance reports—all through natural conversation.
How It Works:
/mcp endpointThe server handles authentication, rate limiting, and API translation—you get AI-powered security analysis without exposing raw API access or compromising security posture.
A production-ready, enterprise-grade MCP-compliant remote server that provides seamless integration with Wazuh SIEM platform using the latest Streamable HTTP transport (MCP 2025-11-25).
Latest Standard: Streamable HTTP transport with
/mcpendpoint (2025-11-25)Backwards Compatible: Legacy
/sseendpoint maintained, supports 2025-03-26 and 2024-11-05Compliance: ✅ 100% compliant with MCP 2025-11-25 specification
/mcp endpoint with dynamic SSE upgrade/sse endpoint for older clientsThis implementation 100% complies with the latest MCP specification:
| Standard | Status | Implementation |
|---|---|---|
| 🔗 Streamable HTTP | ✅ COMPLIANT | /mcp endpoint with POST/GET/DELETE support |
| 📡 Protocol Versioning | ✅ COMPLIANT | MCP-Protocol-Version header validation (400 for invalid) |
| ⚡ Dynamic Streaming | ✅ COMPLIANT | JSON or SSE based on Accept header |
| 🔐 Authentication | ✅ COMPLIANT | Bearer token (JWT) authentication |
| 🛡️ Security | ✅ COMPLIANT | HTTPS, origin validation (if present), rate limiting |
| 🔄 Legacy Support | ✅ COMPLIANT | Legacy /sse endpoint maintained |
| 📋 Session Management | ✅ COMPLIANT | MCP-Session-Id header, full lifecycle with DELETE |
| 📝 Prompts | ✅ COMPLIANT | prompts/list and prompts/get with 4 security prompts |
| 📂 Resources | ✅ COMPLIANT | resources/list, resources/read, resources/templates/list |
| 🔧 Logging | ✅ COMPLIANT | logging/setLevel with RFC 5424 levels |
| ✨ Completion | ✅ COMPLIANT | completion/complete for argument suggestions |
Full MCP Feature Support ⭐
📋 View Full Compliance Verification →
References:
Supported Wazuh Versions: 4.8.0 - 4.14.3 ✅
Comprehensive toolkit for security operations including:
💡 Compact Mode: Alert and vulnerability tools support
compact: true(default) for token-efficient output, reducing response size by ~66%. Setcompact: falsefor full raw data.
Alert Management (3 tools)
Agent Management (6 tools)
Vulnerability Management (3 tools)
Security Analysis (7 tools)
System Monitoring (10 tools)
OS-Agnostic Deployment: Everything runs in Docker containers. Works on Windows, macOS, and Linux identically.
git clone https://github.com/gensecaihq/Wazuh-MCP-Server.git
cd Wazuh-MCP-Server
# Copy environment template
cp .env.example .env
# Edit configuration (required)
# Windows: notepad .env
# macOS/Linux: nano .env
Essential Configuration:
# Wazuh Server Connection
WAZUH_HOST=https://your-wazuh-server.com
WAZUH_USER=your-api-user
WAZUH_PASS=your-api-password
WAZUH_PORT=55000
# MCP Remote Server Configuration
MCP_HOST=0.0.0.0
MCP_PORT=3000
# Authentication (JWT Secret Key)
AUTH_SECRET_KEY=your-secret-key-here
# CORS for Claude Desktop
ALLOWED_ORIGINS=https://claude.ai,https://*.anthropic.com
Option 1: Python Deployment Script (Recommended - Works on all platforms)
# Windows
python deploy.py
# macOS/Linux
python3 deploy.py
Option 2: Platform-Specific Scripts
# Linux/macOS
./deploy-production.sh
# Windows (PowerShell/CMD)
deploy.bat
# Or use Docker Compose directly (all platforms)
docker compose up -d --wait
# Server will generate an API key on startup (check logs)
docker compose logs wazuh-mcp-remote-server | grep "API key"
# Exchange API key for JWT token
curl -X POST http://localhost:3000/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "wazuh_your-generated-api-key"}'
# Test the official /sse endpoint
curl -H "Authorization: Bearer your-jwt-token" \
-H "Origin: http://localhost" \
-H "Accept: text/event-stream" \
http://localhost:3000/sse
# Check service status
docker compose ps
# Health check
curl http://localhost:3000/health
| Variable | Description | Default | Required |
|---|---|---|---|
WAZUH_HOST |
Wazuh server URL | - | ✅ |
WAZUH_USER |
API username | - | ✅ |
WAZUH_PASS |
API password | - | ✅ |
WAZUH_PORT |
API port | 55000 |
❌ |
WAZUH_INDEXER_HOST |
Wazuh Indexer hostname (required for vulnerability tools in 4.8.0+) | - | ❌* |
WAZUH_INDEXER_PORT |
Wazuh Indexer port | 9200 |
❌ |
WAZUH_INDEXER_USER |
Wazuh Indexer username | - | ❌* |
WAZUH_INDEXER_PASS |
Wazuh Indexer password | - | ❌* |
MCP_HOST |
Server bind address | 0.0.0.0 |
❌ |
MCP_PORT |
Server port | 3000 |
❌ |
AUTH_MODE |
Authentication mode: oauth, bearer, none |
bearer |
❌ |
MCP_API_KEY |
Pre-configured API key (format: wazuh_<43-char-base64>) |
auto-generated | ❌ |
AUTH_SECRET_KEY |
JWT signing key | auto-generated | ❌ |
OAUTH_ENABLE_DCR |
Enable OAuth Dynamic Client Registration | true |
❌ |
LOG_LEVEL |
Logging level | INFO |
❌ |
WAZUH_VERIFY_SSL |
SSL verification | false |
❌ |
ALLOWED_ORIGINS |
CORS origins | https://claude.ai |
❌ |
REDIS_URL |
Redis URL for serverless sessions | - | ❌ |
SESSION_TTL_SECONDS |
Session TTL (Redis only) | 1800 |
❌ |
Note: *
WAZUH_INDEXER_*variables are required for vulnerability tools when using Wazuh 4.8.0+. The/vulnerabilityAPI was removed in Wazuh 4.8.0.
The compose.yml follows Docker Compose v2 latest naming convention and includes:
Option 1: Docker Development Environment
# Run with development compose file
docker compose -f compose.dev.yml up -d --build
# View logs
docker compose -f compose.dev.yml logs -f
Option 2: Native Python Development
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
python -m wazuh_mcp_server
src/wazuh_mcp_server/
├── __main__.py # Application entry point
├── server.py # MCP server with all 29 tools (106KB)
├── config.py # Configuration management
├── auth.py # JWT authentication & API keys
├── oauth.py # OAuth 2.0 with Dynamic Client Registration
├── security.py # Rate limiting, input validation, CORS
├── monitoring.py # Prometheus metrics & health checks
├── resilience.py # Circuit breakers, retries, graceful shutdown
├── session_store.py # Pluggable sessions (in-memory/Redis)
├── api/
│ ├── wazuh_client.py # Wazuh Manager API client
│ └── wazuh_indexer.py # Wazuh Indexer client (vulnerabilities)
└── utils/ # Utility functions
# Build for current platform
docker build -t wazuh-mcp-server:custom .
# Multi-platform build
docker buildx build --platform linux/amd64,linux/arm64 -t wazuh-mcp-server:multi .
# Generate secure API key
openssl rand -hex 32
# Set restrictive file permissions
chmod 600 .env
chmod 700 deploy-production.sh
# Regular security updates
docker compose pull
docker compose up -d
The server includes production-grade HA features for maximum reliability:
Circuit Breakers
Retry Logic
Graceful Shutdown
Implementation:
# Automatically applied to all Wazuh API calls
# No configuration required - works out of the box
Enable horizontally scalable, serverless deployments with external session storage:
Default Mode: In-Memory Sessions
# Single-instance deployments (default)
# No configuration needed
docker compose up -d
Serverless Mode: Redis Sessions
# Multi-instance/serverless deployments
# Configure Redis in .env file
REDIS_URL=redis://redis:6379/0
SESSION_TTL_SECONDS=1800 # 30 minutes
# Deploy with Redis
docker compose -f compose.yml -f compose.redis.yml up -d
Redis Setup (Optional):
# compose.redis.yml
services:
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
volumes:
redis-data:
Verification:
# Check session storage mode
curl http://localhost:3000/health | jq '.session_storage'
# Output:
# {
# "type": "InMemorySessionStore" # or "RedisSessionStore"
# "sessions_count": 5
# }
Reduce token usage by ~66% with compact output mode (enabled by default):
Supported Tools:
get_wazuh_alerts - Strips to: timestamp, agent, rule, IPs, syscheck, truncated logssearch_security_events - Same compact format as alertsget_wazuh_vulnerabilities - Strips to: id, severity, description (120 chars), package, agentget_wazuh_critical_vulnerabilities - Same compact format as vulnerabilitiesUsage:
# Compact mode (default) - minimal JSON, essential fields only
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer <token>" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_wazuh_alerts","arguments":{"limit":10}},"id":"1"}'
# Full mode - complete data with pretty-printing
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer <token>" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_wazuh_alerts","arguments":{"limit":10,"compact":false}},"id":"1"}'
Token Savings:
| Mode | Chars/alert | 100 alerts | Estimated Tokens |
|---|---|---|---|
| Full | ~1,350 | 135K | ~33,750 |
| Compact | ~450 | 45K | ~11,300 |
| Savings | 67% | 90K | ~22,000 |
# Application health
curl http://localhost:3000/health
# Detailed metrics
curl http://localhost:3000/metrics
# Container health
docker inspect wazuh-mcp-server --format='{{.State.Health.Status}}'
# Follow live logs
docker compose logs -f --timestamps wazuh-mcp-server
# Export logs
docker compose logs --since=24h wazuh-mcp-server > server.log
/metrics endpoint/health with detailed status# Deploy/Update
./deploy-production.sh
# View status
docker compose ps --format table
# Scale service
docker compose up --scale wazuh-mcp-server=2 -d
# Stop services
docker compose down --timeout 30
# Full cleanup
docker compose down --volumes --remove-orphans
# Update images
docker compose pull && docker compose up -d
# Backup configuration
tar -czf backup-$(date +%Y%m%d).tar.gz .env compose.yml
# View resource usage
docker stats wazuh-mcp-server --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"
| Endpoint | Method | Description |
|---|---|---|
/mcp |
GET/POST | Recommended MCP endpoint (Streamable HTTP - 2025-11-25) |
/sse |
GET | Legacy SSE endpoint (backward compatibility) |
/ |
POST | JSON-RPC 2.0 endpoint (alternative API access) |
/health |
GET | Health check and status |
/metrics |
GET | Prometheus metrics |
/docs |
GET | OpenAPI documentation |
| Endpoint | Method | Description |
|---|---|---|
/auth/token |
POST | Exchange API key for JWT token (bearer mode) |
/.well-known/oauth-authorization-server |
GET | OAuth 2.0 discovery (oauth mode) |
/oauth/authorize |
GET | OAuth authorization endpoint |
/oauth/token |
POST | OAuth token exchange |
/oauth/register |
POST | Dynamic Client Registration (DCR) |
Claude Desktop: Use
/mcpendpoint with OAuth mode for best experience
# Get access token
curl -X POST http://localhost:3000/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "your-api-key"}'
# Use token in requests
curl -H "Authorization: Bearer <token>" http://localhost:3000/
Important: Claude Desktop supports remote MCP servers through the Connectors UI, not via the
claude_desktop_config.jsonfile. The JSON config file only supports local stdio-based MCP servers.
Ensure your Wazuh MCP Server is running and publicly accessible:
# Deploy the server
docker compose up -d
# Verify it's running (must be HTTPS in production)
curl https://your-server-domain.com/health
https://your-server-domain.com/mcphttps://your-server-domain.com/sseThe server supports three authentication modes configured via AUTH_MODE environment variable:
| Mode | AUTH_MODE |
Use Case | Claude Desktop Support |
|---|---|---|---|
| OAuth | oauth |
Production with Claude Desktop | ✅ Native (recommended) |
| Bearer Token | bearer |
API/Programmatic access | ✅ Via Advanced settings |
| Authless | none |
Development/Testing | ✅ Direct connect |
OAuth with Dynamic Client Registration (DCR) provides the best Claude Desktop experience.
# Set environment variable
AUTH_MODE=oauth docker compose up -d
How it works:
/.well-known/oauth-authorization-serverOAuth Endpoints:
/.well-known/oauth-authorization-server/oauth/authorize/oauth/token/oauth/register (DCR)For API access or when OAuth is not available:
# Default mode
AUTH_MODE=bearer docker compose up -d
Step 1: Get API Key
docker compose logs wazuh-mcp-remote-server | grep "API key"
Step 2: Exchange for JWT Token
curl -X POST https://your-server-domain.com/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "wazuh_your-generated-api-key"}'
Step 3: Use Bearer Token Add the token in Claude Desktop's Advanced settings or API requests.
For local development and testing only. Not recommended for production.
AUTH_MODE=none docker compose up -d
No authentication required - clients connect directly.
| Feature | Status |
|---|---|
| Tools | ✅ Supported |
| Prompts | ✅ Supported |
| Resources | ✅ Supported |
| Text/Image Results | ✅ Supported |
| Resource Subscriptions | ❌ Not yet supported |
| Sampling | ❌ Not yet supported |
❌ This will NOT work — the JSON config is for local stdio servers only:
{
"mcpServers": {
"wazuh-security": {
"url": "https://your-server.com/mcp",
"headers": { "Authorization": "Bearer ..." }
}
}
}
This produces the error:
Could not load app settings
"path": ["mcpServers", "wazuh-security", "command"]
"message": "Required"
✅ Correct approach: Use Settings → Connectors UI as described above.
Requirements Checklist:
- ✅ Claude Pro, Max, Team, or Enterprise plan
- ✅ Use Connectors UI (Settings → Connectors), NOT
claude_desktop_config.json- ✅ Server must be accessible via HTTPS (production)
- ✅ Use
/mcpendpoint (Streamable HTTP) or/sseendpoint (legacy)- ✅ Authentication: OAuth (recommended), Bearer token, or Authless (dev only)
Using the official /sse endpoint:
import httpx
import asyncio
async def connect_to_mcp_sse():
"""Connect to MCP server using SSE endpoint."""
async with httpx.AsyncClient() as client:
# Get authentication token first
auth_response = await client.post(
"http://localhost:3000/auth/token",
json={"api_key": "your-api-key"}
)
token = auth_response.json()["access_token"]
# Connect to SSE endpoint
async with client.stream(
"GET",
"http://localhost:3000/sse",
headers={
"Authorization": f"Bearer {token}",
"Accept": "text/event-stream",
"Origin": "http://localhost"
}
) as response:
async for chunk in response.aiter_text():
print(f"Received: {chunk}")
# Run the SSE client
asyncio.run(connect_to_mcp_sse())
Using JSON-RPC endpoint (alternative):
import httpx
async def query_wazuh_mcp():
async with httpx.AsyncClient() as client:
# Get authentication token
auth_response = await client.post(
"http://localhost:3000/auth/token",
json={"api_key": "your-api-key"}
)
token = auth_response.json()["access_token"]
# Make JSON-RPC request
response = await client.post(
"http://localhost:3000/",
headers={
"Authorization": f"Bearer {token}",
"Origin": "http://localhost"
},
json={
"jsonrpc": "2.0",
"id": "1",
"method": "tools/list"
}
)
return response.json()
MCP /sse Endpoint Issues
# Test SSE endpoint authentication
curl -I http://localhost:3000/sse
# Expected: 401 Unauthorized (good - auth required)
# Test with valid token
curl -H "Authorization: Bearer your-jwt-token" \
-H "Origin: http://localhost" \
-H "Accept: text/event-stream" \
http://localhost:3000/sse
# Expected: 200 OK with SSE stream
# Get new authentication token
curl -X POST http://localhost:3000/auth/token \
-H "Content-Type: application/json" \
-d '{"api_key": "your-api-key"}'
Claude Desktop Connection Issues
# Verify Claude Desktop can reach the server
curl http://localhost:3000/health
# Expected: {"status": "healthy"}
# Check CORS configuration
grep ALLOWED_ORIGINS .env
# Should include: https://claude.ai,https://*.anthropic.com
Connection Refused
# Check service status
docker compose ps
docker compose logs wazuh-mcp-remote-server
# Verify port availability
netstat -ln | grep 3000
Authentication Errors
# Verify Wazuh credentials
curl -u "$WAZUH_USER:$WAZUH_PASS" "$WAZUH_HOST:$WAZUH_PORT/"
# Check API key in server logs
docker compose logs wazuh-mcp-remote-server | grep "API key"
SSL/TLS Issues
# Disable SSL verification for testing
echo "WAZUH_VERIFY_SSL=false" >> .env
docker compose up -d
This project is licensed under the MIT License - see the LICENSE file for details.
Built for the security community with production-ready MCP compliance.
We're looking for hands-on testers to deploy this MCP server in real-world environments and provide feedback!
What We Need:
How to Contribute:
Deploy & Test
# Follow the Quick Start guide
git clone https://github.com/gensecaihq/Wazuh-MCP-Server.git
cd Wazuh-MCP-Server
python deploy.py
Report Findings
What to Report
We Value:
Recognition: All contributors who provide valuable feedback will be acknowledged in the project!
📧 Questions? Open a Discussion or file an Issue
This production-ready remote MCP server implementation includes:
A huge thank you to everyone who has contributed to this project through issues, pull requests, and discussions!
| Avatar | Username | Contributions |
|---|---|---|
| @alokemajumder | 💻 Code, 🐛 Issues, 💬 Discussions | |
| @gensecai-dev | 💻 Code, 💬 Discussions | |
| @aiunmukto | 💻 Code, 🔀 PRs | |
| @Karibusan | 💻 Code, 🐛 Issues, 🔀 PRs | |
| @lwsinclair | 💻 Code, 🔀 PRs | |
| @taylorwalton | 🔀 PRs | |
| @MilkyWay88 | 🔀 PRs | |
| @kanylbullen | 💻 Code, 🔀 PRs | |
| @Uberkarhu | 🐛 Issues | |
| @cbassonbgroup | 🐛 Issues | |
| @cybersentinel-06 | 🐛 Issues | |
| @daod-arshad | 🐛 Issues | |
| @mamema | 🐛 Issues | |
| @marcolinux46 | 🐛 Issues | |
| @matveevandrey | 🐛 Issues | |
| @punkpeye | 🐛 Issues | |
| @tonyliu9189 | 🐛 Issues | |
| @Vasanth120v | 💬 Discussions | |
| @gnix45 | 💬 Discussions | |
| @melmasry1987 | 💬 Discussions |
Legend: 💻 Code · 🐛 Issues · 🔀 Pull Requests · 💬 Discussions
This section is automatically updated by GitHub Actions. See .github/workflows/update-contributors.yml
The Wazuh MCP Remote Server represents a gold standard implementation of Anthropic's MCP remote server specifications:
🎯 100% MCP Compliant - Perfect compliance score (45/45 requirements)
⚡ Streamable HTTP & Legacy SSE - Latest /mcp endpoint plus backward-compatible /sse
🔐 Enterprise Security - JWT authentication, rate limiting, CORS protection
🛡️ Production Ready - Docker containerized, multi-platform, health monitoring
🔧 29 Security Tools - Comprehensive Wazuh SIEM integration
📊 Observable - Prometheus metrics, structured logging, health checks
This implementation is immediately deployable in production environments and provides:
The result is a robust, secure, and highly capable MCP remote server that sets the standard for enterprise AI-SIEM integrations.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by chaitin
A self‑hosted web application firewall and reverse proxy that protects web applications from attacks and exploits by filtering, monitoring, and blocking malicious HTTP/S traffic.
by safedep
Provides enterprise‑grade open source software supply chain security by scanning source code, dependencies, containers and SBOMs, detecting vulnerabilities and malicious packages, and enforcing policy as code.
by semgrep
Offers an MCP server that lets LLMs, agents, and IDEs run Semgrep scans to detect security vulnerabilities in source code.
by PortSwigger
Enables Burp Suite to communicate with AI clients via the Model Context Protocol, providing an MCP server and bundled stdio proxy.
by cycodehq
Boost security in the development lifecycle via SAST, SCA, secrets, and IaC scanning.
by mobb-dev
Provides automatic security vulnerability remediation for code via a command‑line interface and an MCP server, leveraging findings from popular SAST tools such as Checkmarx, CodeQL, Fortify, and Snyk.
by ChristophEnglisch
Provides AI‑powered administration of Keycloak users and realms through the Model Context Protocol, enabling automated creation, deletion, and listing of users and realms from MCP clients such as Claude Desktop.
by Spathodea-Network
Provides a Model Context Protocol server that enables querying and retrieving threat intelligence data from OpenCTI through a standardized interface.
by firstorderai
Provides seamless access to two‑factor authentication codes and passwords for AI agents, enabling automated login while maintaining security.