Repository avatar
Other Tools
v3.0.1
active

wazuh-mcp

io.github.lidless-labs/wazuh-mcp

Read-only Wazuh SIEM/XDR MCP server for alerts, agents, CVEs, rules, and CIS posture checks.

Documentation

wazuh-mcp

What it does

wazuh-mcp connects an MCP client to Wazuh SIEM/XDR. Use it to list agents, inspect rules and inventory, search alerts, or check vulnerability findings. The package also ships a read-only command-line client.

Install

This guide covers the published package wazuh-mcp@3.0.0. It requires Node.js 22 or later. The release's CI matrix covers Node.js 22 and 24. Release manifest · CI workflow

npm install --global wazuh-mcp@3.0.0

The package installs wazuh-mcp for the MCP server and wazuhctrl for the CLI, with wazuhctl as a CLI alias. Run wazuhctrl --help for commands such as status, agents list, and diagnostics.

Configure

Set these variables in the server or CLI process environment. Supply passwords through that environment using your secret store.

ServiceURL variable and exampleRequired credentials
Wazuh manager REST APIWAZUH_URL=https://manager.example:55000WAZUH_USERNAME, WAZUH_PASSWORD
Wazuh Indexer (optional)WAZUH_INDEXER_URL=https://indexer.example:9200WAZUH_INDEXER_USERNAME, WAZUH_INDEXER_PASSWORD when the indexer URL is set

The manager also accepts WAZUH_BASE_URL and WAZUH_USER as aliases for its URL and username. The manager client exchanges its credentials for a JWT and uses that JWT for REST reads. The indexer client uses HTTP Basic authentication for OpenSearch. With only the manager configured, alert and vulnerability tools stay listed and return indexer setup guidance. Configuration

Upstream TLS

SettingManagerIndexer
Verify certificates (default true, set false to disable)WAZUH_VERIFY_SSLWAZUH_INDEXER_VERIFY_SSL
PEM CA bundle fileWAZUH_CA_FILEWAZUH_INDEXER_CA_FILE
Override the certificate identity checked against the peerWAZUH_TLS_SERVERNAMEWAZUH_INDEXER_TLS_SERVERNAME
Request timeout in seconds (default 30)WAZUH_TIMEOUTWAZUH_INDEXER_TIMEOUT

Use a CA bundle for a privately issued certificate. The identity override accepts a bare DNS name or IP address and keeps certificate chain verification in place when verification is enabled. Both upstream URLs require HTTPS by default. WAZUH_ALLOW_INSECURE_HTTP=true permits plain HTTP for either upstream. TLS identity handling

MCP transports

For stdio, configure your MCP client to launch wazuh-mcp with the settings above. To run the same version without a global install, use this command:

npm exec --yes --package=wazuh-mcp@3.0.0 -- wazuh-mcp

For Streamable HTTP, set WAZUH_MCP_HTTP_TOKEN to a separate token of at least 32 characters after trimming whitespace and run wazuh-mcp --http. Generate a token with openssl rand -hex 32. Point the client at /mcp on the listener and have it send the token in the Authorization: Bearer header.

The listener serves plain HTTP on IPv4 loopback port 3120 by default. Override the bind address and port with WAZUH_MCP_HTTP_HOST and WAZUH_MCP_HTTP_PORT. The server rejects wildcard binds and tokens that reuse upstream credentials. It accepts the bound host or a loopback alias in the Host header. If an Origin header is present, it must be an HTTP or HTTPS loopback origin. HTTP request bodies are capped at 1 MiB. GET /healthz returns {"status":"ok"} without a token. Every holder of the bearer token shares the configured accounts' privileges. MCP entry point · HTTP transport

flowchart LR
    Client[MCP client] -->|stdio| Server[wazuh-mcp]
    Client -->|HTTP with bearer token| Server
    Server -->|REST with JWT| Manager[Wazuh manager]
    Server -->|Basic auth| Indexer[Wazuh Indexer / OpenSearch]

Tools

Version 3.0.0 exposes 46 tools, 3 resources, and 3 prompts over both MCP transports. Tool registration

TaskExamples
Agent and inventory checkslist_agents, get_agent_packages, get_fim_files
Manager and cluster checkslist_rules, get_manager_status, get_cluster_nodes
Alert and vulnerability searchessearch_alerts, aggregate_alerts, search_vulnerabilities
Connection diagnosticsdiagnose_wazuh_connection

WAZUH_MCP_MAX_RESPONSE_BYTES defaults to 90,000 bytes with a minimum of 1,024 bytes. Oversized tool responses return a JSON preview with output.response_truncated. Paginated indexer calls require offset + limit to stay within 10,000. When an indexer search reports a lower bound for the total, pagination.total_is_lower_bound is true. Response formatting · Indexer client

Safety

  • Both the CLI and MCP server are read-only by design. Upstream POSTs are limited to manager JWT authentication and indexer _search requests. Use a read-only manager account and restrict the indexer account to the alert and vulnerability indices it needs.
  • Tools validate input before sending it upstream. Agent IPs, full alert logs, file hashes, and process command lines require explicit opt-ins on the relevant calls. get_manager_config always redacts credential-bearing keys.
  • Tools mark endpoint-supplied text with <untrusted_siem_data> where it appears in affected responses. MCP clients should treat the marked text as data. Security policy

Why not other Wazuh MCP servers?

ToolRuntimeWrite accessPrompt-injection / field guardsLocal CLI included
wazuh-mcpNode.js / TypeScript (npx)Read-only by designMinimizes IPs/hashes/logs by default, wraps endpoint strings in <untrusted_siem_data>Yes (wazuhctrl)
gensecaihq/Wazuh-MCP-ServerPythonIncludes active-response writesConfigurableNo
socfortress/wazuh-mcp-serverPythonRead/query focusedStandardNo
gbrigandi/mcp-server-wazuhRustRead/query focusedStandardNo

Pick gensecaihq/Wazuh-MCP-Server if you want Python with OAuth 2.1 and active-response actions. Pick wazuh-mcp if you want a strict read-only Node/TypeScript server with default data minimization, untrusted-data tagging, and a matching shell CLI (wazuhctrl).

FAQ

Can an AI agent modify Wazuh rules, active response, or agent state through wazuh-mcp? No. Upstream POST requests are limited to manager JWT authentication and indexer _search queries.

Does wazuh-mcp work with Claude Code, Claude Desktop, Cursor, and Codex? Yes. Run it over stdio via npx -y wazuh-mcp or over loopback Streamable HTTP with wazuh-mcp --http and a bearer token.

Do I need the Wazuh Indexer configured to start? No. Manager-only credentials work for agents, rules, decoders, SCA, and diagnostics. Add WAZUH_INDEXER_URL when you want alert and vulnerability search.

Part of Lidless Labs

wazuh-mcp is maintained by Lidless Labs (GitHub). Related SOC and threat-hunting tools:

  • soc-stack - one-command Proxmox SOC lab with Wazuh, TheHive, Cortex, MISP, Zeek, and Suricata
  • suricata-mcp - Suricata IDS/IPS EVE JSON alerts and rule workflows over MCP
  • zeek-mcp - Zeek and Suricata NSM log querying and C2 hunting over MCP
  • thehive-mcp - TheHive 5 case management and alert triage over MCP
  • mitre-mcp - local MITRE ATT&CK mapping and coverage analysis over MCP

Development

Run these commands from a source checkout. The test suite uses mocked Wazuh services.

npm ci
./scripts/verify
npm run pack:check

./scripts/verify runs tests, type checking, and the build. npm run pack:check shows the npm publish payload. Verification script · Contributing

Releases publish from the tagged GitHub Actions workflow with npm provenance. Publish workflow

Changelog · MIT License