Wazuh MCP Server
Blue Team MCP Server (Wazuh SIEM)
Claude Desktop / 모든 MCP 클라이언트를 위한 방어적 MCP 서버 — 공격적 도구에 대응하는 블루팀 버전입니다. Wazuh SIEM, 다중 제공자 위협 인텔리전스, MITRE 기반 3-Sum APT 상관 분석, 공격 그래프, LangGraph 조사 워크플로, 호스트 포렌식에 걸쳐 123개 도구 + 4개 리소스를 제공합니다. 기본적으로 읽기 전용입니다.
프로그래머: NAuliajati (csirt[at]tangerangkota[.]go[.]id)
아키텍처
main.py -> mcp_server/ (package)
├─ core/ HTTP client, redaction, audit, config, attack graph, IOC store
├─ wazuh/ Indexer (OpenSearch) + Manager API (JWT auth)
├─ correlation/ 3-Sum engine (pure computation, MITRE-driven)
├─ threat_intel/ CrowdSec, ThreatFox, OTX, URLhaus, GreyNoise + shared cache
├─ agents/ LangGraph investigation + playbook workflows
└─ tools/ 49 tool modules모든 도구 호출은 @blueteam_tool 데코레이터의 단일 파이프라인을 통해 흐릅니다 — 코드 그래프에서 가장 많이 연결된 세 노드입니다:
audit (_audit_log) -> call -> redact (_redact_alert_data) -> truncate (_truncate_if_needed)모든 아웃바운드 HTTP는 풀별 회로 차단기(http_client.CircuitBreaker: 연속 5회 실패 -> 열림, 60초 대기, 단일 반열림 시도)를 통과합니다. 429 및 4xx는 실패로 간주되지 않으므로, 한 업스트림의 장애는 도구 전반에 재시도를 쌓는 대신 빠르게 실패 처리됩니다.
Transport | 사용 사례 |
| 로컬 하위 프로세스 / SSH 파이프 (기본값) |
| 원격 HTTP 서비스 ( |
Related MCP server: wrg-mcp-server
빠른 시작
git clone <repo> && cd Wazuh-MCP-Server
sudo bash setup.sh # deps, venv, wrapper at /opt/blue-team-mcp
# configure (edit /opt/blue-team-mcp/config.env)
export WAZUH_INDEXER_URL="https://<host>:9200"
export WAZUH_INDEXER_USER="admin"
export WAZUH_INDEXER_PASSWORD="<indexer-password>"
export WAZUH_API_URL="https://<host>:55000" # optional — Manager API tools
export WAZUH_API_USER="wazuh-wui"
export WAZUH_API_PASSWORD="<api-password>"
export CROWDSEC_API_KEY="<key>" # optional — threat intel (free)
# inbound auth for the HTTP transport (REQUIRED when binding beyond 127.0.0.1)
export MCP_API_KEY="btm_<43-char-base64>" # generate: python3 -c "import secrets; print('btm_' + secrets.token_urlsafe(32))"
export MCP_API_KEY_SCOPES="wazuh:read wazuh:write" # optional — default wazuh:read (read-only)
# run (stdio)
mcp-server-blueteam
# or remote HTTP (MCP_API_KEY is mandatory here — the server refuses to bind otherwise)
MCP_TRANSPORT=streamable_http MCP_HOST=0.0.0.0 MCP_PORT=8001 \
MCP_API_KEY="btm_<43-char-base64>" mcp-server-blueteamClaude Desktop 구성 (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"blue-team-mcp": {
"command": "ssh",
"args": ["-i", "~/.ssh/id_ed25519", "user@DEFENDER_HOST", "mcp-server-blueteam"],
"transport": "stdio"
}
}
}구성
자격 증명은 환경 변수에서 가져오며 시작 시 검증됩니다. 모든 위협 인텔리전스 키는 선택 사항입니다 — 키가 없어도 도구는 정상적으로 기능이 축소됩니다.
영역 | 변수 | 참고 |
Wazuh Indexer |
| OpenSearch (9200) — 경보/이벤트 데이터 |
Wazuh Manager |
| Manager API (55000) — 규칙/에이전트/구성 |
TLS |
| 기본값 |
위협 인텔리전스 |
| 9개 제공자 + RapidAPI + HudsonRock; 모두 선택 사항 |
마스킹 |
| 보안 및 개인정보 보호 참조 |
포렌식 게이트 |
| 기본값 |
인바운드 인증 |
|
|
인바운드 강화 |
| IP별 슬라이딩 윈도우 속도 제한 (req/min, |
감사 및 영속성 |
| JSONL 감사 추적 + 저장소 (선택 사항) |
게이팅 |
| 파괴적 도구 / 도구 범주 건너뛰기 |
기능
Wazuh SIEM
경보 검색(blueteam_wazuh_indexer_search, wazuh_alert_dsl_query), 제로-문서 통계 집계, 스키마 탐색(blueteam_index_schema), 도메인/이메일/지리/syscheck/컴플라이언스 조회, 그리고 Manager API 도구(규칙, 디코더, 그룹, 에이전트, 보안 이벤트)를 제공합니다.
3-Sum APT 상관 분석
three_sum_correlation은 두 엔진과 통합 점수를 실행합니다:
엔진 A — MITRE 기반 다중 IoC 위험 임계값 설정. 경보는
rule.mitre.tactic(MITRE_TACTIC_TO_CATEGORY통해)과rule.mitre.id(ATT&CK STIX 번들로 해석)로 분류되며,rule.level × tactic weight로 점수가 매겨지고 ≥2-범주 연쇄 공격 규칙(threshold_score기본값 35)으로 게이트됩니다.엔진 B — 3-소스 볼륨 Z-점수(MAD + shoulder-check)로 동시 급증을 플래그합니다.
또한 다중 해상도(1h/24h/7d), 통합 심각도 점수, Indexer 성능 저하 탐지를 제공합니다.
위협 인텔리전스
9개 제공자 — CrowdSec, ThreatFox, OTX, URLhaus, GreyNoise, AbuseIPDB, VirusTotal, Netra, Argus — 와 통합 blueteam_threat_intel_aggregate(동시 fan-out) 및 가중치 적용 blueteam_unified_threat_score를 제공합니다. 또한 stealer_log_check(HudsonRock)와 jarm_fingerprint(C2/악성코드 귀속을 위한 TLS 핑거프린트, API 키 불필요), 그리고 3가지 RapidAPI 조회(blueteam_ip_blacklist, blueteam_ioc_search, blueteam_breach_check)가 있습니다.
경보 보강
blueteam_wazuh_alert_summarize, blueteam_beacon_detect, blueteam_attack_chain, blueteam_threat_card, blueteam_wazuh_alert_compare, blueteam_curated_threat_report.
조사, 그래프 및 워크플로
blueteam_investigate_ip, blueteam_attack_graph(networkx 클러스터 + PageRank), blueteam_pivot_suggest, blueteam_campaign_watch, blueteam_stix_killchain, blueteam_investigation_workflow 및 blueteam_playbook_run(LangGraph), 그리고 3-Sum에서 알려진 노이즈 IOC를 자동으로 억제하는 오탐 지식 베이스(blueteam_false_positive_kb)를 제공합니다.
호스트 및 도메인 포렌식
WHOIS / CRT.sh, IOC 추출, JARM 핑거프린팅, 타이포스쿼팅 탐지(blueteam_domain_permute), 웹셸 스캐닝, 서버 측 JSONL 내보내기, DOCX/XLSX/PPTX 보고서 내보내기, 그리고 23가지 호스트 포렌식 도구(로그 리더, fail2ban, 루트킷 스캔, lynis, 프로세스/cron/사용자)를 제공합니다.
보안 및 개인정보 보호
인바운드 인증 (streamable_http)
streamable_http는 mcp_server/core/server_auth.py의 사전 공유 API 키로 보호됩니다:
MCP_API_KEY— 형식btm_<43-char-urlsafe-base64>(47자). SHA-256 다이제스트로만 저장되며hmac.compare_digest(일정 시간)로 비교됩니다.MCP_API_KEY_SCOPES— 기본값wazuh:read(읽기 전용).wazuh:write를 추가하면 9가지 쓰기 도구(blueteam_fail2ban_unban,blueteam_case_*,blueteam_set_owned_domains,blueteam_mark_investigated,blueteam_wazuh_export,blueteam_export_report,blueteam_capture_traffic)가 잠금 해제됩니다. Fail-closed: 범위가 없으면 읽기 전용입니다.바인드 가드 (
main.py::_start_http_transport):MCP_API_KEY없이 루프백이 아닌 바인드를 하면ConfigurationError가 발생하고 시작을 거부합니다. 루프백은 키가 구성되지 않은 경우에만 인증 없이 유지되며, 키가 설정되면 모든 요청에 적용됩니다.JSON 깊이 가드 (
parse_json_body_safe): 모든 POST 본문은 1MB(MAX_BODY_BYTES)로 제한되며,json.loads가 실행되기 전에 중첩이 100단계(MAX_JSON_DEPTH)를 초과하면 거부됩니다 — 깊게 중첩된 JSON-RPC 페이로드로 인한 스택 고갈 DoS를 차단합니다.인바운드 속도 제한기 (
SlidingWindowRateLimiter): 클라이언트 IP별 슬라이딩 윈도우 상한(BLUETEAM_HTTP_RATE_LIMIT, requests/min, 기본값0= 비활성화)을 초과하면429를 반환합니다. 파괴적 도구(fail2ban unban, tcpdump capture)를 분당 전역 상한으로 게이트하는BLUETEAM_RATE_LIMIT와는 별개입니다.Origin 검증 (
_origin_allowed):Origin헤더는 루프백 Origin이거나BLUETEAM_ALLOWED_ORIGINS(쉼표로 구분된 정확한 Origin)에 포함되어야 하며, 그렇지 않으면403을 반환합니다. 브라우저 기반 DNS 리바인딩 / localhost 유출을 차단합니다.Origin헤더가 없는 요청(비브라우저 클라이언트)은 영향을 받지 않습니다. 미들웨어는 항상 설치됩니다 — 인증 없는 루프백 바인드에서도 속도 제한 + Origin 검증이 적용됩니다.
마스킹 정책
3-상태 정책(BLUETEAM_REDACTION_POLICY, 기본값 protect_victim):
정책 | 동작 |
| 이메일, 사설 IP, 모든 도메인, 경로, User-Agent의 형태 기반 마스킹 — |
| 피해자 소유 지표(소유 도메인, 사설 IP, 신원)만 마스킹하고 공격자 IOC는 계속 표시합니다. SOC 트리아지에 권장됩니다. |
| 레이어 1 자격 증명 제거만 — |
레이어 1(자격 증명 제거)은 모든 상태에서 적용되며 절대 우회할 수 없습니다. 공격자 IOC 레지스트리(core/attacker_registry.py)는 확인된 공격자 지표를 형태 기반 마스킹에서 면제합니다 — 레이어 1에서는 절대 면제되지 않습니다.
정책 위의 2계층 마스킹 해제:
계층 1 —
reveal_owned=true— LLM에 소유한*.tangerangkota.go.id자산만 공개하고, 집계 도구(wazuh_alert_dsl_query포함)에서 소유 도메인 버킷 키의 마스킹을 해제합니다.BLUETEAM_OWNED_DOMAINS를 넘어 확장하지 않습니다.계층 2 —
bypass_redaction=true+forensic_token— 원시 데이터를 디스크에 기록합니다. LLM은 파일 경로만 받으며 원시 콘텐츠는 절대 받지 않습니다.
BLUETEAM_OWNED_DOMAINS를 조직의 도메인으로 설정하세요(쉼표로 구분, 예: tangerangkota.go.id). blueteam_owned_domains로 확인하고, blueteam_set_owned_domains로 런타임에 업데이트할 수 있습니다(BLUETEAM_ALLOW_RUNTIME_DOMAINS=true로 게이트, 기본값 꺼짐).
SOC 분석 프롬프트 (LLM에 복사하여 붙여넣기)
이 MCP 서버에 연결된 로컬 LLM용으로 바로 붙여넣을 수 있는 프롬프트입니다. 두 가지 출력 형식 — Markdown(인라인) 및 DOCX(officecli, blueteam_export_report 필요)를 지원합니다.
⚠️ Calling convention & guardrails (read once — prevents "Field required" errors and false positives):
- Every tool takes a SINGLE ``params`` object. FastMCP double-nests it:
tool_invoke(name="<tool>", params={"params": {"field": value, ...}})
Call tool_inspect FIRST to read a tool's exact signature; never skip inspect on an unused tool.
- Default model = protect_victim: the LLM sees attacker public IPs/payloads/rule/severity/MITRE,
never internal emails, subdomains, private IPs (RFC1918), or internal paths.
- A private/RFC1918 srcip (10.x, 172.16-31.x, 192.168.x) is INTERNAL, never an attacker — do not
run threat-intel on it (those tools reject private IPs by design — SSRF guard).
- reveal_owned=true (Tier 1, LLM-safe): reveals only *.tangerangkota.go.id + @tangerangkota.go.id.
Accepted by the alert/aggregation tools — wazuh_domain_lookup, wazuh_alert_focused_crawl,
wazuh_email_lookup, wazuh_alert_dsl_query (unmasks owned-domain bucket keys), and others —
never expands beyond BLUETEAM_OWNED_DOMAINS.
- bypass_redaction=true + forensic_token (Tier 2, HUMAN ONLY): writes raw data to disk via
blueteam_wazuh_export; the LLM sees only the file path.
- ⚠️ NEVER pass redaction_policy="raw" OR bypass_redaction=true in a tool call — both are
HUMAN-ONLY and gated behind the operator forensic token, which the LLM does NOT hold. The
call fails with "requires the operator forensic token". For owned-domain visibility use
reveal_owned=true (above, no token); full raw forensics is blueteam_wazuh_export run by the
analyst on the server.
- redaction_policy="protect_victim" is accepted by 13 tools (blueteam_curated_threat_report,
blueteam_threat_card, blueteam_wazuh_alert_summarize, blueteam_wazuh_alerts,
blueteam_wazuh_geo_heatmap, blueteam_wazuh_indexer_search, three_sum_correlation,
wazuh_alert_aggregate_analysis, wazuh_alert_focused_crawl, wazuh_alert_timeline,
wazuh_attack_velocity, wazuh_domain_lookup, wazuh_email_lookup). blueteam_wazuh_export uses
bypass_redaction (NOT redaction_policy). Other tools reject redaction_policy — drop it and retry.
(Separately, wazuh_alert_dsl_query accepts reveal_owned=true but NOT redaction_policy.)
- blueteam_wazuh_export writes to BLUETEAM_EXPORT_DIR (default /var/log/blue-team-mcp/exports/)
with an AUTO-GENERATED filename (export_<timestamp>.jsonl). It has NO ``path`` parameter —
do not pass one (it will be rejected). Only blueteam_export_report accepts a ``path``.
LANGKAH 0 — Index schema (before any aggregation):
blueteam_index_schema(fields=["data.srcip","rule.id","rule.groups","agent.name",
"data.domain","data.url","GeoLocation.city_name"], response_format="json")
LANGKAH 1 — Full overview + own-asset forensics:
blueteam_curated_threat_report(since="24h", investigation_depth="deep",
response_format="json", redaction_policy="protect_victim")
wazuh_domain_lookup(domain="tangerangkota.go.id", since="24h", reveal_owned=true,
response_format="json", max_scanned=10000)
LANGKAH 2 — Per attacker (top 10): threat card + attack chain
blueteam_threat_card(srcip=<ip>, since="24h")
blueteam_attack_chain(srcip=<ip>, since="24h")
LANGKAH 3 — Unified threat intel:
blueteam_threat_intel_aggregate(indicator=<ip>, response_format="json")
argus_ip_lookup(ip=<ip>); otx_lookup(indicator=<ip>, section="general")
blueteam_ip_blacklist(ip=<ip>); blueteam_ioc_search(ip=<ip>) # RapidAPI
LANGKAH 4 — 3-Sum APT + auto-enrich + case:
three_sum_correlation(time_window_minutes=1440, follow_up="threat_intel",
multi_resolution=true, create_case=true, response_format="json",
redaction_policy="protect_victim")
LANGKAH 5 — Attack graph + pivot + campaign:
blueteam_attack_graph(window_days=30, top_n=20, response_format="json")
blueteam_pivot_suggest(ioc=<top_attacker_ip>)
blueteam_campaign_watch(response_format="json")
LANGKAH 6 — LangGraph investigation + verdict:
blueteam_investigation_workflow(alert_text="<...>", srcip=<ip>, window="24h",
use_attack_graph=true, generate_report=false, record_verdict=true, verdict_label="suspicious")
blueteam_mark_investigated(srcip=<ip>, verdict="<verdict>", case_id=<case_id>)
LANGKAH 7 — Compromised emails + breach/stealer check:
wazuh_compromised_emails_analysis(since="24h", response_format="json")
blueteam_breach_check(email=<email_dinas>); stealer_log_check(email=<email_dinas>)
LANGKAH 8 — MITRE kill-chain + C2 fingerprinting:
blueteam_stix_killchain(srcip=<ip>, since="24h")
jarm_fingerprint(host=<c2_domain_or_ip>, response_format="json")
blueteam_domain_permute(domain="tangerangkota.go.id") # typosquatting lookalikes
LANGKAH 9 — Suppression, telemetry, case review:
blueteam_false_positive_kb(); blueteam_owned_domains(); blueteam_metrics()
blueteam_case_list(); blueteam_case_get(case_id=<case_id>)
LANGKAH 10 — Geo heatmap:
blueteam_wazuh_geo_heatmap(since="24h", response_format="json")
Supplementary tools (by category — the full 123-tool set; LANGKAH 0–10 is the default path):
- Alert search/aggregation: blueteam_wazuh_indexer_search, blueteam_wazuh_alerts,
wazuh_alert_aggregate_analysis, wazuh_alert_focused_crawl, wazuh_alert_dsl_query,
wazuh_alert_timeline, wazuh_attack_velocity, blueteam_wazuh_alert_summarize,
blueteam_wazuh_alert_compare.
- Threat intel: crowdsec_ip_reputation(/bulk), threatfox_ioc_search(/bulk),
greynoise_ip_context, netra_ip_analysis, otx_lookup_bulk, urlhaus_lookup(/bulk),
urlhaus_hash_lookup, blueteam_lookup_domain_virustotal, blueteam_lookup_hash_virustotal,
blueteam_unified_threat_score, blueteam_mitre_lookup.
- Baselines & anomaly: blueteam_baseline_profile, blueteam_baseline_drift,
blueteam_calendar_heatmap, blueteam_beacon_detect.
- Wazuh Manager (agents/rules/config): blueteam_wazuh_agents, blueteam_wazuh_agents_summary,
blueteam_wazuh_get_cluster_nodes, blueteam_wazuh_get_rules, blueteam_wazuh_get_groups,
blueteam_wazuh_get_decoders, blueteam_wazuh_get_security_events, blueteam_wazuh_manager_logs,
blueteam_wazuh_get_rule_files, blueteam_wazuh_get_rule_file_content,
blueteam_wazuh_get_agent_sca, blueteam_wazuh_list_sca_policies, blueteam_wazuh_get_sca_policy_checks.
- Compliance/SCA/vuln: blueteam_wazuh_syscheck, blueteam_wazuh_compliance,
blueteam_wazuh_vulnerabilities.
- Host forensics: blueteam_read_auth_log, blueteam_read_syslog, blueteam_read_web_log,
blueteam_failed_logins, blueteam_last_logins, blueteam_who_is_logged_in,
blueteam_find_suid_files, blueteam_find_world_writable, blueteam_list_connections,
blueteam_list_listening_ports, blueteam_list_processes, blueteam_list_cron_jobs,
blueteam_list_users, blueteam_hash_file, blueteam_journalctl, blueteam_rootkit_scan,
blueteam_lynis_audit, blueteam_system_health, blueteam_sudo_history,
blueteam_check_open_firewall, blueteam_check_ssh_authorized_keys, blueteam_check_updates,
blueteam_fail2ban_status, blueteam_fail2ban_jail_status, blueteam_fail2ban_unban,
blueteam_capture_traffic.
- Domain/asset: blueteam_whois_lookup, blueteam_crtsh_lookup, blueteam_asset_context.
- Case/IOC/history: blueteam_case_create, blueteam_case_add_iocs, blueteam_case_add_verdict,
blueteam_case_list, blueteam_case_get, blueteam_extract_iocs, blueteam_ioc_lifecycle,
blueteam_investigate_ip, blueteam_playbook_run, blueteam_investigation_history,
blueteam_investigation_summary, blueteam_false_positive_tracker.
- Geo: blueteam_wazuh_geo_distribution (by country).
- Forensics/scanning/other: blueteam_check_webshell, blueteam_semantic_search,
blueteam_threat_hunt, blueteam_stix_analyze, blueteam_prompt_route.
- AI/LLM attack detection: blueteam_ai_bot_recon (AI-agent user-agents probing exploit paths).
- Sangfor blocklist: sangfor_blocklist_check(ip=<ip>) for a single IP;
sangfor_blocklist_list(limit=…, date_start="YYYY-MM-DD HH:MM:SS", date_end=…) for the list —
no ``since`` / ``offset`` params (use date_start/date_end).
—— FORMAT MARKDOWN: compose the report from steps 1–10 (ringkasan → subdomain → IOC →
threat intel → 3-Sum → attack graph → LangGraph → email → MITRE → geo).
—— FORMAT DOCX (officecli): blueteam_export_report(format="docx", title="<...>",
path="/var/log/blue-team-mcp/exports/laporan_24jam_<date>.docx", docx_sections=[...])
—— FORENSIC EXPORT (HUMAN ONLY): blueteam_wazuh_export(since="24h", bypass_redaction=true,
forensic_token="<BLUETEAM_FORENSIC_TOKEN>")
→ streams to /var/log/blue-team-mcp/exports/export_<timestamp>.jsonl (filename auto-generated;
NO ``path`` parameter). WITHOUT ``bypass_redaction=true`` the export is protect_victim-masked
(subdomains stay masked). Analyst reads the file on the server (cat/jq); the LLM assists only
with REDACTED analysis.요구 사항
Python 3.11+
mcp,httpx[http2],pydantic,networkx,langgraph,officecli-sdkrequirements.txt참조.
개발
병합 전:
python3 check_guardrails.py --strict는 exit 0으로 종료되어야 하며, 로깅은 stderr에 유지되어야 합니다.
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.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server for the Wazuh SIEM/XDR platform that enables users to query agents, security alerts, detection rules, and decoders through Claude or other MCP clients. It provides specialized tools and prompts for investigating security alerts, performing agent health checks, and generating environmental security overviews.28343MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that exposes a 60+ tool security and threat-intel stack to AI agents, enabling secret scanning, Sigma rule generation, ransomware lookup, OSINT, and deep research.1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that transforms Claude Code into an autonomous DFIR analyst by providing typed, audited forensic tools for disk, memory, timeline, registry, and IOC analysis on the SANS SIFT Workstation.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceThis MCP server connects Claude Desktop to a Velociraptor instance and local forensic tools. It enables remote endpoint investigation and local evidence analysis through natural language commands.1MIT
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/INFOKOM-KI/Wazuh-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server