Wazuh MCP Server

Wazuh MCP Server

Enables integration between Wazuh security platform and AI applications through the MCP framework, providing tools for security analysis, agent management, and system monitoring.

Category
Visit Server

README

Wazuh MCP Server

Model Context Protocol (MCP) servers for Wazuh services, providing seamless integration between Wazuh security platform and AI applications through the MCP framework.

šŸš€ Quick Start

Get started in 5 minutes with our comprehensive documentation:

šŸ“ Project Structure

wazuh-mcp-server/
ā”œā”€ā”€ src/                    # Source code package
│   └── wazuh_mcp_server/   # Main application package
│       ā”œā”€ā”€ wazuh_indexer/  # Wazuh Indexer MCP Server
│       │   ā”œā”€ā”€ config/     # Configuration modules
│       │   │   ā”œā”€ā”€ base_config.py
│       │   │   └── indexer_config.py
│       │   ā”œā”€ā”€ services/   # Service implementations
│       │   │   └── indexer_service.py
│       │   ā”œā”€ā”€ utils/      # Utilities
│       │   │   └── logger.py
│       │   ā”œā”€ā”€ tools/      # MCP tools
│       │   │   ā”œā”€ā”€ cluster_tools.py
│       │   │   ā”œā”€ā”€ index_tools.py
│       │   │   ā”œā”€ā”€ monitoring_tools.py
│       │   │   ā”œā”€ā”€ search_tools.py
│       │   │   ā”œā”€ā”€ security_tools.py
│       │   │   └── tool_clients.py
│       │   └── server.py   # Main server entry point
│       ā”œā”€ā”€ wazuh_manager/  # Wazuh Manager MCP Server
│       │   ā”œā”€ā”€ config/     # Configuration modules
│       │   │   ā”œā”€ā”€ base_config.py
│       │   │   └── manager_config.py
│       │   ā”œā”€ā”€ services/   # Service implementations
│       │   │   └── manager_service.py
│       │   ā”œā”€ā”€ utils/      # Utilities
│       │   │   └── logger.py
│       │   ā”œā”€ā”€ tools/      # MCP tools
│       │   │   ā”œā”€ā”€ agents.py
│       │   │   ā”œā”€ā”€ api_info.py
│       │   │   ā”œā”€ā”€ cluster.py
│       │   │   ā”œā”€ā”€ decoders.py
│       │   │   ā”œā”€ā”€ experimental.py
│       │   │   ā”œā”€ā”€ groups.py
│       │   │   ā”œā”€ā”€ lists.py
│       │   │   ā”œā”€ā”€ manager.py
│       │   │   ā”œā”€ā”€ mitre.py
│       │   │   ā”œā”€ā”€ overview.py
│       │   │   ā”œā”€ā”€ rootcheck.py
│       │   │   ā”œā”€ā”€ rules.py
│       │   │   ā”œā”€ā”€ sca.py
│       │   │   ā”œā”€ā”€ security.py
│       │   │   ā”œā”€ā”€ syscollector.py
│       │   │   ā”œā”€ā”€ syscheck.py
│       │   │   ā”œā”€ā”€ tasks.py
│       │   │   └── wazuh_manager_base_api.py
│       │   └── server.py   # Main server entry point
│       ā”œā”€ā”€ server_manager.py  # Server management CLI
│       └── __init__.py     # Package initialization
ā”œā”€ā”€ deployment/             # Docker deployment
│   ā”œā”€ā”€ .env.docker.example      # Docker environment template
│   ā”œā”€ā”€ .env.production.example  # Production environment template
│   ā”œā”€ā”€ docker/
│   │   ā”œā”€ā”€ docker-compose.yml
│   │   ā”œā”€ā”€ Dockerfile
│   │   └── nginx.conf
│   ā”œā”€ā”€ requirements-mcp.txt     # Python dependencies
│   └── README.md               # Deployment documentation
ā”œā”€ā”€ docs/                   # Documentation
ā”œā”€ā”€ tests/                  # Test suite
ā”œā”€ā”€ .env.example            # Environment configuration template
ā”œā”€ā”€ pyproject.toml          # Modern Python package configuration
ā”œā”€ā”€ SECURITY.md             # Security policy
ā”œā”€ā”€ CHANGELOG.md            # Version history
└── README.md               # Project documentation

Features

  • Self-Contained: Each MCP server has its own complete module structure
  • Modular Architecture: Clean separation of concerns within each server
  • Docker Ready: Deployable via Docker Compose
  • Warning Suppression: Deprecation and runtime warnings are filtered
  • Local Imports: All imports are relative to prevent external dependencies
  • Clean Logging: Production-ready log output with reduced verbosity

Logging

The MCP servers use structured logging with the following levels:

  • ERROR: Authentication failures, connection errors, critical issues
  • WARNING: JWT expiration, recoverable issues, deprecated usage
  • INFO: Startup messages, connection success, tool registration summaries
  • DEBUG: Data fetching operations, detailed API interactions (disabled by default)

Log Output Examples

āœ… Successfully connected to Wazuh API
āœ… Successfully imported and registered 106 Wazuh Manager tools from 18 modules
āœ… Successfully imported and registered 36 Wazuh Indexer tools from 5 modules

Verbose debug logging (API requests, data fetching operations) has been moved to DEBUG level to reduce log noise while maintaining troubleshooting capabilities when needed.

Architecture Changes

Tool Migration

The tools have been restructured for better organization:

  • Wazuh Indexer tools are located in wazuh_indexer/tools/
  • Wazuh Manager tools are located in wazuh_manager/tools/

Import Cleanup

  • Removed external imports: from utils.logger import logger
  • Removed external imports: from config.wazuh_config import WazuhConfig
  • Removed configuration instantiation: config = WazuhConfig()
  • Updated to use centralized service instances set by servers

Service Integration

Each MCP server now:

  1. Creates its own service instance (WazuhIndexerMCPService/WazuhManagerMCPService)
  2. Patches tool clients to use the centralized service
  3. Imports and registers tools using relative imports
  4. Handles all configuration through environment variables

⚔ Quick Installation

# 1. Clone repository
git clone https://github.com/RayaSatriatama/wazuh-mcp-server.git
cd wazuh-mcp-server

# 2. Deploy with Docker (recommended)
docker compose --profile http up -d

# 3. Verify deployment
curl http://localhost:8001/health  # Indexer
curl http://localhost:8002/health  # Manager

For detailed installation instructions, see the Installation Guide.

šŸŽ›ļø Server Management

Use the built-in server manager for easy development and testing:

# Start all MCP servers
uvx --from fastmcp python -m src.wazuh_mcp_server.server_manager start-all

# Check server status  
uvx --from fastmcp python -m src.wazuh_mcp_server.server_manager status

# Stop all servers
uvx --from fastmcp python -m src.wazuh_mcp_server.server_manager stop-all

# Start individual servers
uvx --from fastmcp python -m src.wazuh_mcp_server.server_manager start wazuh_indexer
uvx --from fastmcp python -m src.wazuh_mcp_server.server_manager start wazuh_manager

šŸ—ļø Architecture

The Wazuh MCP Server provides two main services:

  • Wazuh Indexer MCP Server (Port 8001) - Search, alerts, analytics
  • Wazuh Manager MCP Server (Port 8002) - Agents, rules, management

šŸš€ Transport Modes

  • HTTP Mode - Production REST API (ports 8001/8002)
  • SSE Mode - Real-time Server-Sent Events (ports 8003/8004)
  • STDIO Mode - Direct MCP client integration

For detailed architecture and configuration, see:

šŸ”§ Features

  • Comprehensive Wazuh Integration - Full access to Wazuh Manager and Indexer APIs
  • Multi-Transport Support - HTTP, SSE, and STDIO modes for different use cases
  • Modular Architecture - Clean separation of concerns with service layers
  • Production Ready - Docker deployment with health checks and monitoring
  • MCP Compatible - Native integration with Model Context Protocol clients
  • Rich Tool Set - 140+ tools for security analysis, agent management, and system monitoring

Available Tools

Wazuh Indexer Tools (36 tools):

  • Alert search and analytics
  • Vulnerability management
  • Cluster health monitoring
  • Index management
  • Search aggregations

Wazuh Manager Tools (106 tools):

  • Agent management and monitoring
  • Rule and decoder management
  • Group and configuration management
  • Security compliance (SCA, CIS-CAT)
  • System monitoring (Syscheck, Rootcheck)

For complete tool documentation, see Tools Reference.

šŸ¤ Contributing

We welcome contributions! Please see our Development Guide for:

  • Development environment setup
  • Code style guidelines
  • Testing procedures
  • Pull request process

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ†˜ Support

  • Documentation: docs/ folder contains comprehensive guides
  • Issues: Report bugs and feature requests on GitHub Issues
  • Troubleshooting: See Troubleshooting Guide

šŸŽÆ Project Status

āœ… PRODUCTION READY - The Wazuh MCP Server is fully functional and ready for production use with comprehensive documentation, Docker deployment, and multi-transport support.

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
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
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
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
Qdrant Server

Qdrant Server

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

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