Wazuh MCP Server

Wazuh MCP Server

By unmuktoai GitHub

An open-source MCP server for integrating Wazuh security data with LLMs (such as the Claude Desktop App). This service authenticates with the Wazuh RESTful API, retrieves alerts from Elasticsearch indices, transforms events into an MCP-compliant JSON format, and exposes an HTTP endpoint for Claude Desktop to fetch real-time security context.

python ai
Overview

What is Wazuh MCP Server?

Wazuh MCP Server is an open-source server designed to integrate Wazuh security data with large language models (LLMs) like the Claude Desktop App. It authenticates with the Wazuh RESTful API, retrieves alerts from Elasticsearch, transforms events into an MCP-compliant JSON format, and provides an HTTP endpoint for real-time security context.

How to use Wazuh MCP Server?

To use the Wazuh MCP Server, clone the repository, set up a virtual environment, install dependencies, configure environment variables for Wazuh API access, and run the server. Integration with Claude Desktop requires updating its configuration file to include the MCP server details.

Key features of Wazuh MCP Server?

  • JWT-Based Authentication for secure access to Wazuh.
  • Alert Retrieval from Elasticsearch indices.
  • Transformation of security events into standardized MCP messages.
  • Flask HTTP Server exposing an /mcp endpoint for integration.
  • Robust error handling for various issues like token expiration and network timeouts.
  • Configurable via environment variables for easy setup.

Use cases of Wazuh MCP Server?

  1. Integrating Wazuh security alerts with AI applications.
  2. Providing real-time security context to LLMs for enhanced decision-making.
  3. Automating security monitoring and alerting processes.

FAQ from Wazuh MCP Server?

  • What is required to run Wazuh MCP Server?

    You need Python 3.8+, access to a Wazuh API instance, and optionally, Claude Desktop configured to call the MCP server.

  • Is Wazuh MCP Server free to use?

    Yes! It is an open-source project and free to use.

  • How can I contribute to Wazuh MCP Server?

    Contributions are welcome! You can open issues or submit pull requests for improvements or bug fixes.

Content

Wazuh MCP Server

A production-grade, open-source MCP server for integrating Wazuh security data with LLMs (such as the Claude Desktop App). This service authenticates with the Wazuh RESTful API, retrieves alerts from Elasticsearch indices, transforms events into an MCP-compliant JSON format, and exposes an HTTP endpoint for Claude Desktop to fetch real-time security context.

Features

  • JWT-Based Authentication: Securely authenticate with Wazuh using JWT tokens.
  • Alert Retrieval: Query Elasticsearch indices for Wazuh alert data.
  • MCP Message Transformation: Convert security events into standardized MCP messages.
  • Flask HTTP Server: Exposes an /mcp endpoint for Claude Desktop integration.
  • Robust Error Handling: Handles token expiration, network timeouts, and malformed data.
  • Configurable: Easily configure via environment variables and integrate with Claude Desktop via its config file.

Prerequisites

  • Python 3.8+
  • Access to a Wazuh API instance.
  • (Optional) Claude Desktop configured to call the MCP server.

Installation

  1. Clone the Repository:

    git clone https://github.com/unmuktoai/Wazuh-MCP-Server.git
    cd Wazuh-MCP-Server
    

Create and Activate a Virtual Environment:


python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Install Dependencies:

pip install -r requirements.txt

Configuration Set the following environment variables to configure the MCP server:

WAZUH_HOST: Wazuh server hostname or IP.
WAZUH_PORT: Port for the Wazuh API (default: 55000).
WAZUH_USER: Wazuh API username.
WAZUH_PASS: Wazuh API password.
VERIFY_SSL: Set to "true" or "false" (default: false).
MCP_SERVER_PORT: Port on which the MCP server will run (default: 8000).

Example (MacOS):

export WAZUH_HOST="your_wazuh_server"
export WAZUH_PORT="55000"
export WAZUH_USER="your_username"
export WAZUH_PASS="your_password"
export VERIFY_SSL="false"
export MCP_SERVER_PORT="8000"

Running the Server Start the MCP server with:

python wazuh_mcp_server.py 

The server will listen on all interfaces at the port specified by

MCP_SERVER_PORT.

Integration with Claude Desktop To integrate with Claude Desktop, update its configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json Add the following entry under mcpServers:

{
"mcpServers": {
  "mcp-server-wazuh": {
    "command": "python3 /path/to/Wazuh-MCP-Server/wazuh_mcp_server.py",
    "env": {
      "WAZUH_HOST": "your_wazuh_server",
      "WAZUH_PORT": "55000",
      "WAZUH_USER": "your_username",
      "WAZUH_PASS": "your_password",
      "MCP_SERVER_PORT": "8000",
      "VERIFY_SSL": "false"
    }
  }
}
}

License This project is licensed under the MIT License.

Contributing Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.

No tools information available.

A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.

The open-source multi-agent chat interface that lets you manage multiple agents in one dynamic conversation and add MCP servers for deep research

python typescript
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details
YouTube MCP Server
YouTube MCP Server by IA-Programming

YouTube MCP Server is an AI-powered solution designed to revolutionize your YouTube experience. It empowers users to search for YouTube videos, retrieve detailed transcripts, and perform semantic searches over video content—all without relying on the official API. By integrating with a vector database, this server streamlines content discovery.

youtube ai
View Details

MCP Deep Research Server using Gemini creating a Research AI Agent

research ai
View Details
MCP-Mealprep
MCP-Mealprep by JoshuaRL

This project takes a number of MCP servers from GitHub locations, packages them together with this repo's GHCR container, and launches them with docker-compose to run as a stack for ML/AI resources.

docker ai
View Details

BioMCP: Biomedical Model Context Protocol

bioinformatics ai
View Details