Repository avatar
Other Tools
v4.0.1
active

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

VariableDefaultUse
ZEEK_LOG_DIR/opt/zeek/logs/currentCurrent Zeek logs
ZEEK_LOG_ARCHIVE/opt/zeek/logsRoot of the dated Zeek archive directories
ZEEK_LOG_FORMATjsonZeek log format, either json or tsv
ZEEK_MAX_RESULTS1000Maximum records returned per query through the Zeek query engine
ZEEK_MAX_SCAN1000000Zeek input lines scanned per query, including comments and malformed lines
ZEEK_MAX_DATE_RANGE_DAYS31Maximum calendar dates in a Zeek query window
ZEEK_CAPTURE_LOSS_WARN_PERCENT5Loss percentage above which nids_sensor_status reports degraded health
SURICATA_EVE_LOG/opt/nids/suricata/logs/eve.jsonSuricata EVE events
SURICATA_FAST_LOG/opt/nids/suricata/logs/fast.logReserved by configuration in 4.0.0. Suricata tools read EVE.
SURICATA_RULES_DIR/opt/nids/suricata/rulesReserved 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

VariableDefaultUse
ZEEK_MCP_HTTP_TOKENUnsetRequired for HTTP startup. Use at least 32 characters after trimming whitespace and a value distinct from both upstream API keys.
ZEEK_MCP_HTTP_HOSTIPv4 loopbackSpecific bind address or hostname. Wildcard binds are refused.
ZEEK_MCP_HTTP_PORT3141Listen port. Use 0 to let the OS select a port.
ZEEK_MCP_HTTP_ALLOWED_HOSTSEmptyComma-separated Host entries accepted in addition to the configured host and loopback aliases.
ZEEK_MCP_HTTP_ALLOWED_ORIGINSEmptyComma-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

VariableDefaultUse
THEHIVE_URLHTTP loopback hostname, port 9000TheHive base URL
MISP_URLHTTPS loopback hostname, port 443MISP base URL
THEHIVE_API_KEY, MISP_API_KEYUnsetRequired by the respective service tools
THEHIVE_VERIFY_SSL, MISP_VERIFY_SSLtrueVerify TLS certificates for requests to the respective service
PCAP_DIR/opt/nids/pcapsDirectory for existing captures
ZEEK_CONTAINERzeekContainer used for replay. Set an empty value for host execution.
ZEEK_BINARY/usr/local/zeek/bin/zeekZeek executable in the replay environment
PCAP_OUTPUT_DIR/tmp/zeek-pcap-analysisWorking directory for host replay
ZEEK_ALLOW_MUTATIONDisabledSet 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

ToolUse
zeek_query_connectionsFilter connection records by address, port, protocol, duration, or bytes
zeek_connection_summarySummarize connections, services, and traffic volume
zeek_long_connectionsFind long-lived connections
zeek_query_dnsSearch DNS records by domain, type, or response code
zeek_dns_summarySummarize queries, domains, and NXDOMAIN responses
zeek_dns_tunneling_checkInspect DNS labels for tunneling indicators
zeek_query_httpFilter HTTP logs by host, URI, method, user agent, or status
zeek_suspicious_httpFind HTTP requests matching suspicious-request heuristics
zeek_query_sslFilter TLS records by server name, version, or certificate fields
zeek_expired_certsFind expired, self-signed, or invalid certificates
zeek_query_filesSearch file records by MIME type, hash, name, or size
zeek_executable_downloadsFind recorded executable transfers
zeek_query_noticesSearch Zeek notices
zeek_query_sshSearch SSH records by endpoint or authentication status
zeek_ssh_bruteforceIdentify repeated failed SSH authentication
zeek_query_kerberosSearch Kerberos authentication and ticket activity
zeek_query_ntlmSearch NTLM authentication records
zeek_query_rdpInspect RDP session and client details
zeek_query_smbSearch SMB share mappings or file operations
zeek_query_dce_rpcSearch DCE-RPC endpoint and operation logs
zeek_query_dhcpSearch DHCP leases and device records
zeek_dhcp_asset_mapMap MAC addresses to observed IP addresses and hostnames
zeek_investigate_hostPivot across logs by host address
zeek_investigate_uidPivot across logs by connection UID
zeek_software_inventoryList software and versions observed by Zeek
zeek_detect_beaconingLook for regular connection intervals
zeek_detect_anomaliesFlag unusual connection patterns
zeek_ja3_fingerprintsInspect JA3 and JA3S TLS fingerprints
zeek_ja3_huntMatch fingerprints against known indicators
zeek_network_baselineSummarize network activity for baseline comparison
zeek_detect_outliersFlag statistical outliers in the selected connection records
suricata_query_alertsFilter EVE alerts by signature, severity, address, or time
suricata_alert_summarySummarize EVE alert signatures, categories, and severities
suricata_correlate_zeekCorrelate Suricata alerts with Zeek records
suricata_eve_statsInspect Suricata engine statistics from EVE
pcap_listList available captures
pcap_analyzeReplay a capture through Zeek and summarize generated logs. Gated
thehive_create_alertCreate a TheHive alert. Gated
thehive_create_caseCreate a TheHive case. Gated
thehive_search_casesSearch TheHive cases and alerts
misp_search_iocsSearch MISP for indicators
misp_bulk_lookupCheck multiple indicators against MISP
misp_add_eventCreate a MISP event. Gated
nids_sensor_statusInspect 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?

ToolStrengthAI client / MCP supportSetup footprint
zeek-mcpConversational hunting across conn, dns, http, ssl, files, and Suricata EVE logsNative stdio and HTTP MCP serverSingle npx -y zeek-mcp process reading local logs
zeek-cut + awkUltra-fast pipeline filteringManual CLI scriptingZero install
RITAAutomated beacon scoring over MongoDBNo native MCP serverMongoDB + scheduled import
ArkimeFull packet capture indexing and web UINo native MCP serverOpenSearch 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

Contributing · Security policy · MIT license