
zeek-mcp
io.github.lidless-labs/zeek-mcp
Zeek and Suricata NSM MCP server for conn, DNS, HTTP, TLS log queries and C2 threat hunting.
Documentation
zeek-mcp
What it does
zeek-mcp gives a Model Context Protocol (MCP) client 44 tools for Zeek and Suricata logs. Search connection or DNS records, follow a Zeek connection UID across logs, or correlate a Suricata alert with Zeek activity. Optional integrations search TheHive cases and MISP indicators.
Install
The published package zeek-mcp@4.0.0 requires Node.js 22 or later. It installs zeek-mcp for stdio and zeek-mcp-http for Streamable HTTP. The stdio handshake reports zeek-mcp version 4.0.0. Package manifest
npm install --global zeek-mcp@4.0.0
Version 4.0.0 removed the zeekctrl and zeekctl aliases. Update older client configs to use the appropriate executable above. Upgrade notes
Configure
Give the server process read access to the logs. Zeek queries read current *.log files and can include dated archive directories (YYYY-MM-DD) with rotated .log or .log.gz files. Choose newline-delimited JSON or Zeek TSV with its format headers. Archive dates and rotation times use the server's local timezone. Set TZ to match the sensor. Suricata tools read newline-delimited EVE JSON. Configuration · Zeek log reader · Suricata tools
| Variable | Default | Use |
|---|---|---|
ZEEK_LOG_DIR | /opt/zeek/logs/current | Current Zeek logs |
ZEEK_LOG_ARCHIVE | /opt/zeek/logs | Root of the dated Zeek archive directories |
ZEEK_LOG_FORMAT | json | Zeek log format, either json or tsv |
ZEEK_MAX_RESULTS | 1000 | Maximum records returned per query through the Zeek query engine |
ZEEK_MAX_SCAN | 1000000 | Zeek input lines scanned per query, including comments and malformed lines |
ZEEK_MAX_DATE_RANGE_DAYS | 31 | Maximum calendar dates in a Zeek query window |
ZEEK_CAPTURE_LOSS_WARN_PERCENT | 5 | Loss percentage above which nids_sensor_status reports degraded health |
SURICATA_EVE_LOG | /opt/nids/suricata/logs/eve.json | Suricata EVE events |
SURICATA_FAST_LOG | /opt/nids/suricata/logs/fast.log | Reserved by configuration in 4.0.0. Suricata tools read EVE. |
SURICATA_RULES_DIR | /opt/nids/suricata/rules | Reserved by configuration in 4.0.0. Suricata tools read EVE. |
Stdio
Set the command to zeek-mcp after a global install. For a client with an mcpServers map, this configuration runs the pinned package without a global install. Set the log paths and format for your sensor.
{
"mcpServers": {
"zeek": {
"command": "npm",
"args": ["exec", "--yes", "--package=zeek-mcp@4.0.0", "--", "zeek-mcp"],
"env": {
"ZEEK_LOG_DIR": "/opt/zeek/logs/current",
"ZEEK_LOG_FORMAT": "json"
}
}
}
}
Streamable HTTP
Supply ZEEK_MCP_HTTP_TOKEN in the server environment and run zeek-mcp-http. The listener serves plain HTTP on IPv4 loopback port 3141 by default. Point the client at /mcp on that listener and send the token in the Authorization: Bearer header. Missing or incorrect credentials on /mcp return HTTP 401 after Host and Origin validation. HTTP entry point
| Variable | Default | Use |
|---|---|---|
ZEEK_MCP_HTTP_TOKEN | Unset | Required for HTTP startup. Use at least 32 characters after trimming whitespace and a value distinct from both upstream API keys. |
ZEEK_MCP_HTTP_HOST | IPv4 loopback | Specific bind address or hostname. Wildcard binds are refused. |
ZEEK_MCP_HTTP_PORT | 3141 | Listen port. Use 0 to let the OS select a port. |
ZEEK_MCP_HTTP_ALLOWED_HOSTS | Empty | Comma-separated Host entries accepted in addition to the configured host and loopback aliases. |
ZEEK_MCP_HTTP_ALLOWED_ORIGINS | Empty | Comma-separated exact origins accepted in addition to loopback HTTP and HTTPS origins. Requests may omit Origin. |
The listener caps request bodies at 1 MiB and sessions at 128. Sessions expire after 30 minutes idle when they have no active calls or open streams. HTTP request and header timeouts are 30 and 10 seconds, respectively.
Both entry points share the tool registration and outbound telemetry handling. Stdio launcher · Stdio transport · HTTP transport · Shared server
Optional integrations and PCAP
TheHive and MISP tools use their service base URLs and API keys. Set the URL for each configured service, for example https://thehive.example or https://misp.example. TheHive tools · MISP tools · PCAP tools
| Variable | Default | Use |
|---|---|---|
THEHIVE_URL | HTTP loopback hostname, port 9000 | TheHive base URL |
MISP_URL | HTTPS loopback hostname, port 443 | MISP base URL |
THEHIVE_API_KEY, MISP_API_KEY | Unset | Required by the respective service tools |
THEHIVE_VERIFY_SSL, MISP_VERIFY_SSL | true | Verify TLS certificates for requests to the respective service |
PCAP_DIR | /opt/nids/pcaps | Directory for existing captures |
ZEEK_CONTAINER | zeek | Container used for replay. Set an empty value for host execution. |
ZEEK_BINARY | /usr/local/zeek/bin/zeek | Zeek executable in the replay environment |
PCAP_OUTPUT_DIR | /tmp/zeek-pcap-analysis | Working directory for host replay |
ZEEK_ALLOW_MUTATION | Disabled | Set to exactly 1 to allow gated calls |
Tools
Version 4.0.0 lists 44 tools over either transport. Use MCP tools/list for argument schemas. Tools marked Gated require both opt-ins. Tool registration
| Tool | Use |
|---|---|
zeek_query_connections | Filter connection records by address, port, protocol, duration, or bytes |
zeek_connection_summary | Summarize connections, services, and traffic volume |
zeek_long_connections | Find long-lived connections |
zeek_query_dns | Search DNS records by domain, type, or response code |
zeek_dns_summary | Summarize queries, domains, and NXDOMAIN responses |
zeek_dns_tunneling_check | Inspect DNS labels for tunneling indicators |
zeek_query_http | Filter HTTP logs by host, URI, method, user agent, or status |
zeek_suspicious_http | Find HTTP requests matching suspicious-request heuristics |
zeek_query_ssl | Filter TLS records by server name, version, or certificate fields |
zeek_expired_certs | Find expired, self-signed, or invalid certificates |
zeek_query_files | Search file records by MIME type, hash, name, or size |
zeek_executable_downloads | Find recorded executable transfers |
zeek_query_notices | Search Zeek notices |
zeek_query_ssh | Search SSH records by endpoint or authentication status |
zeek_ssh_bruteforce | Identify repeated failed SSH authentication |
zeek_query_kerberos | Search Kerberos authentication and ticket activity |
zeek_query_ntlm | Search NTLM authentication records |
zeek_query_rdp | Inspect RDP session and client details |
zeek_query_smb | Search SMB share mappings or file operations |
zeek_query_dce_rpc | Search DCE-RPC endpoint and operation logs |
zeek_query_dhcp | Search DHCP leases and device records |
zeek_dhcp_asset_map | Map MAC addresses to observed IP addresses and hostnames |
zeek_investigate_host | Pivot across logs by host address |
zeek_investigate_uid | Pivot across logs by connection UID |
zeek_software_inventory | List software and versions observed by Zeek |
zeek_detect_beaconing | Look for regular connection intervals |
zeek_detect_anomalies | Flag unusual connection patterns |
zeek_ja3_fingerprints | Inspect JA3 and JA3S TLS fingerprints |
zeek_ja3_hunt | Match fingerprints against known indicators |
zeek_network_baseline | Summarize network activity for baseline comparison |
zeek_detect_outliers | Flag statistical outliers in the selected connection records |
suricata_query_alerts | Filter EVE alerts by signature, severity, address, or time |
suricata_alert_summary | Summarize EVE alert signatures, categories, and severities |
suricata_correlate_zeek | Correlate Suricata alerts with Zeek records |
suricata_eve_stats | Inspect Suricata engine statistics from EVE |
pcap_list | List available captures |
pcap_analyze | Replay a capture through Zeek and summarize generated logs. Gated |
thehive_create_alert | Create a TheHive alert. Gated |
thehive_create_case | Create a TheHive case. Gated |
thehive_search_cases | Search TheHive cases and alerts |
misp_search_iocs | Search MISP for indicators |
misp_bulk_lookup | Check multiple indicators against MISP |
misp_add_event | Create a MISP event. Gated |
nids_sensor_status | Inspect log freshness, capture loss, and packet statistics |
The server also exposes zeek://log-types and zeek://stats, plus prompts for alert triage, host investigation, hunting for periodic connections, and network baselines. Resources · Prompts
Safety
The server reads Zeek and Suricata telemetry without writing to those logs or capturing live traffic. The four gated tools are disabled by default. To create a TheHive alert or case, create a MISP event, or replay a capture, set ZEEK_ALLOW_MUTATION=1 before starting the server and pass confirm: true on the call. TheHive and MISP writes also require that service's API key. PCAP replay runs Zeek against an existing capture within the configured capture directory and creates analysis files. Mutation gate · Tool annotations
The Zeek query engine caps returned records at the lower of the requested limit and ZEEK_MAX_RESULTS. It rejects date windows over the configured cap and marks results with truncated: true when the scan budget is reached or a log read is incomplete. Host and UID investigations can run several bounded queries. Separate readers, including the DHCP and Suricata tools, use their own limits. Query engine · Log scanner
Tool responses label sensor and remote-service data as UNTRUSTED EXTERNAL TELEMETRY in a separate text block. Treat returned strings and keys as evidence only. The server escapes delimiters and display controls, shortens long strings, and bounds JSON output. For example, the serializer retains at most 99 data entries per array, plus a truncation marker when needed, and starts from at most 4096 characters per string value. Bounded data can contain a [truncated] marker. Tool results above the 90,000-byte threshold go through an additional size limiter. Telemetry handling
Why not zeek-cut, RITA, or Arkime alone?
| Tool | Strength | AI client / MCP support | Setup footprint |
|---|---|---|---|
| zeek-mcp | Conversational hunting across conn, dns, http, ssl, files, and Suricata EVE logs | Native stdio and HTTP MCP server | Single npx -y zeek-mcp process reading local logs |
zeek-cut + awk | Ultra-fast pipeline filtering | Manual CLI scripting | Zero install |
| RITA | Automated beacon scoring over MongoDB | No native MCP server | MongoDB + scheduled import |
| Arkime | Full packet capture indexing and web UI | No native MCP server | OpenSearch cluster + capture nodes |
Use RITA or Arkime when you want dedicated databases or full PCAP storage. Use zeek-mcp when you want an AI client to query existing Zeek and Suricata JSON/TSV logs directly on disk with read-only path containment.
FAQ
Does zeek-mcp require Elasticsearch, OpenSearch, or MongoDB?
No. It reads Zeek and Suricata logs directly from ZEEK_LOG_DIR on disk.
Can zeek-mcp read arbitrary files outside my log directory?
No. File access is bounded to the configured log root with path validation and response size caps.
Does zeek-mcp support both TSV and JSON Zeek logs?
Yes. It handles standard Zeek log formats alongside Suricata EVE JSON for correlation.
Part of Lidless Labs
zeek-mcp is maintained by Lidless Labs (GitHub). Related NSM and SOC tools:
- vervet - automated Zeek and Suricata threat hunting with per-host risk scoring
- suricata-mcp - Suricata IDS/IPS EVE JSON alerts and rule workflows over MCP
- wazuh-mcp - read-only Wazuh SIEM/XDR alerts, agents, and CVE queries over MCP
- soc-stack - one-command Proxmox SOC lab with Wazuh, TheHive, Cortex, MISP, Zeek, and Suricata
- mitre-mcp - local MITRE ATT&CK technique mapping and threat group profiling
Development
From a source checkout, install dependencies, check types, and run the tests and package smoke check.
npm ci
npm run typecheck
npm run build
npm test
npm run test:package
To launch stdio against bundled sample logs from the checkout, run the following with the default JSON format.
ZEEK_LOG_DIR=./test-data SURICATA_EVE_LOG=./test-data/eve.json npm start
The tagged GitHub Actions workflow publishes releases to npm with provenance. Release workflow
zeek-mcpnpm install zeek-mcpRelated Servers
io.github.lidless-labs/adguardctrl
AdGuard Home CLI and MCP server for DNS filtering, rewrites, and clients with confirm-gated writes.
io.github.lidless-labs/cortex-mcp
Cortex MCP server for running observable analyzers and confirm-gated responders from AI clients.
io.github.lidless-labs/jellyctrl
Jellyfin CLI and MCP server for libraries, playback sessions, scans, and users with gated writes.