Purpose
mcp-server-malcolm is an MCP (Model Context Protocol) server for Malcolm. Malcolm is an open-source network traffic analysis platform composed of Zeek, Suricata, Arkime, and OpenSearch, with optional NetBox integration. This server enables AI agents to query traffic in a Malcolm instance using the field names and filter syntax that Malcolm actually uses, rather than having the model guess. It runs under any MCP client, such as Claude Code, Claude Desktop, or Cursor.
Typical query examples:
- "Show all Suricata alerts involving 192.0.2.15 in the past 24 hours, and which NetBox device owns that IP." → malcolm_alerts, malcolm_netbox_lookup
- "Who are the top talkers by protocol in the past hour?" → malcolm_aggregate
- "List the executables Zeek extracted from yesterday's traffic and their hashes." → malcolm_file_scans
- "Upload this PCAP, then search the stored packets for this string." → malcolm_upload_pcap, arkime_create_hunt (write tools, disabled by default)
Key capabilities
This server moves Malcolm's query complexity away from the model side:
- Exposes Malcolm's filter syntax instead of raw OpenSearch DSL.
- Provides field discovery so the model can verify field names before querying.
- Provides value enumeration so the model can see what values a field actually contains.
- Covers two sets of field vocabularies: Arkime expressions use Arkime's own names (such as ip.src), the rest of Malcolm uses ECS names (such as source.ip), and Malcolm's own field list contains only the latter, while arkime_field_search provides the former.
- Wraps Suricata alert queries and handles field mapping (suricata.alert.* and rule.*).
- Adds NetBox asset context (IP to device, network segments).
The failure mode being targeted is quiet: Malcolm returns empty results rather than an error for queries on unindexed fields, so if the model guesses a field name wrong, it reads "no such traffic" and moves on. When a search returns empty, this server checks the fields named in the query and reports the name under which Malcolm actually stores that value. This lookup only runs after the result set is already empty, so successful queries do not add to the model's context burden.
How to use
Using it does not require writing code. The MCP client starts the server as a subprocess and communicates with it over stdio; you only need to tell the client how to start it and which credentials to inject.
Environment requirements: Python 3.11 or newer, a Malcolm instance accessible via API, and an HTTPS route to it.
Installation methods:
- pip install mcp-server-malcolm
- uvx mcp-server-malcolm
- Install from a source checkout
Register with a client (Claude Code example):
The claude mcp add command is used to register, the following arguments are the startup command, and each -e injects one environment variable.
Other MCP clients have no equivalent CLI and require editing the client's own JSON configuration.
Connection setting defaults (read from client.py:327-355): when none of the three connection variables are set, the server sends to https://localhost Send admin / admin; timeout 30 seconds.
TLS: verification is enabled by default, and Malcolm comes with a self-signed certificate. Point MALCOLM_SSL_VERIFY to Malcolm's CA bundle; this only works if the Malcolm server certificate has a subjectAltName matching the hostname you are connecting to—certificates generated by Malcolm's own setup have no SAN extension, so verification will fail even if the CA is correct. For remote Malcolm, install a certificate with the correct SAN. MALCOLM_SSL_VERIFY="false" disables verification entirely and is acceptable only for isolated local lab environments.
Write tools (must be explicitly enabled)
Read-only by default. Write tools that create alerts, tag sessions, start hunts, or upload PCAPs are not registered until the corresponding write class is enabled. Write access is divided into five classes, each controlled by its own environment flag, all disabled by default. A flag counts as enabled only when the exact string is true (case-insensitive) (config.py:15); any other value (including 1 and yes) keeps it disabled. The startup banner can be used to check.
Use cases
- Network threat hunting: query Suricata alerts, aggregate traffic statistics, inspect Zeek extracted files.
- IP-to-device correlation investigations combined with NetBox asset context.
- Drive Malcolm queries in natural language within an MCP client, reducing errors from hand-written OpenSearch DSL.
Limitations
- Read-only by default; write functionality requires explicitly enabling the corresponding flag.
- Requires Python 3.11+, an API-accessible Malcolm instance, and HTTPS routing.
- Malcolm comes with a self-signed certificate and no SAN extension, so default TLS verification will fail; you need to install a certificate with the correct SAN or disable verification only in an isolated lab environment.
- Credentials exist in plaintext in configuration files (such as ~/.claude.json, permissions 0600); file permissions are the only protection; claude mcp get prints MALCOLM_PASSWORD in plaintext.
- Container mode: the Dockerfile is based on python:3.11-slim, single-architecture build; --rm and one container per client sessioncan shorten the credential exposure window.
- MALCOLM_MCP_ENABLE_PCAP_UPLOAD requires a bind mount, and the host directory must be readable by uid 10001 inside the container.
- There is no MALCOLM_PASSWORD_FILE-style secret file input; client.py:324 only reads environment variables.
- Some installation and platform combinations have not been actually verified, as noted in the README.