Mcp Server Malcolm

io.github.nagameTW由 GitHub 账号 nagameTW 发布v1.2.1更新于 Oct 24, 2026

MCP server for Malcolm (Zeek/Suricata/Arkime/OpenSearch): threat-hunting access for AI agents

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手以只读方式访问 Malcolm 威胁狩猎平台(Zeek、Suricata、Arkime、OpenSearch),查询网络流量与告警。

可以做什么
用 Malcolm 过滤语法搜索和聚合网络流量与 Suricata 告警,或直接执行 OpenSearch DSL 查询、计数、列出索引和查看集群健康状态。
适用场景
当你已经部署 Malcolm,希望助手代为排查流量、告警、Arkime 会话和抓取文件,或检查传感器与服务健康状态,而不必手写查询时使用。
运行要求
需要 Python 3.11 或更高版本,从 PyPI 或源码安装,由 MCP 客户端通过 stdio 启动。需要可访问且开放 API 的 Malcolm 实例(HTTPS),通过 MALCOLM_URL(或 MALCOLM_BASE_URL)、MALCOLM_USERNAME、MALCOLM_PASSWORD 配置,可选 MALCOLM_SSL_VERIFY、MALCOLM_TIMEOUT、MALCOLM_MAX_CONCURRENCY、MALCOLM_MAX_REQUESTS_PER_MINUTE。NetBox 查询需要 NetBox 端点。
安装前请注意
服务器在环境变量中保存 Malcolm 基本认证凭据;README 指出密码会以明文出现在客户端配置文件和 docker inspect 输出中。默认值为 admin/admin 且指向 TLS 校验会让凭据和查询结果经未认证通道传输。写入类功能(告警、Arkime 标签、狩猎任务、PCAP 上传、Arkime 视图)默认关闭,启用后助手可修改数据。抓取的文件可能是恶意软件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Server Malcolm,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Malcolm MCP Server lets an AI agent ask questions about the traffic in your Malcolm instance. The server uses the field names and the filter syntax that Malcolm uses. The agent does not guess them. It works with any MCP client, such as Claude Code, Claude Desktop or Cursor.

Example requests, and the tools that answer them:

  • "Show every Suricata alert involving 192.0.2.15 in the last 24 hours, and which NetBox device owns that IP." This calls malcolm_alerts and malcolm_netbox_lookup.
  • "Who were the top talkers by protocol over the last hour?" This calls malcolm_aggregate.
  • "List the executables Zeek carved out of yesterday's traffic, with their hashes." This calls malcolm_file_scans.
  • "Upload this PCAP, then hunt the stored packets for this string." This calls malcolm_upload_pcap and arkime_create_hunt. Both are write tools, and they are off by default.

A recorded session shows an agent answering a question about Modbus alerts.

Requirements

  • Python 3.11 or newer.
  • A Malcolm instance with API access, reachable over HTTPS.
  • An MCP client.

Quick start

1. Install the server. Then start it with stdin closed. It prints the state of the write classes and exits with code 0.

bash
pip install mcp-server-malcolmmcp-server-malcolm < /dev/null# [mcp-server-malcolm] write classes: alerting=off arkime-tag=off hunt-job=off pcap-upload=off arkime-view=off

2. Register it with Claude Code. Replace the values with your own.

bash
claude mcp add malcolm \  -e MALCOLM_URL=https://malcolm.example \  -e MALCOLM_USERNAME=analyst \  -e MALCOLM_PASSWORD='your-password' \  -e MALCOLM_SSL_VERIFY=/path/to/malcolm-ca.crt \  -- mcp-server-malcolm

Everything after -- is the launch command. Each -e sets one environment variable for it. A password typed in this command stays in your shell history. The install page shows how to avoid that. It also covers other MCP clients and other ways to install.

3. Check the connection. Ask the agent to call malcolm_ping. If the call fails, read Troubleshooting. A self-signed certificate is the most common cause.

Connection settings

VariableDefaultMeaning
MALCOLM_URLhttps://localhostBase URL of Malcolm
MALCOLM_USERNAMEadminBasic-auth user
MALCOLM_PASSWORDadminBasic-auth password
MALCOLM_SSL_VERIFYtruetrue, false, or the path of a CA bundle

Malcolm ships a self-signed certificate. For a remote Malcolm, point MALCOLM_SSL_VERIFY at the CA bundle. The certificate must carry a subjectAltName that matches the host name. The certificate that Malcolm's own setup generates has none, so install one that does. Use false only on an isolated lab machine. The configuration page lists every variable.

Read-only by default

The write tools come in five classes, and each class has one flag. The server registers only read tools until you set a flag. A class that is off is not registered. Its tools do not appear in tools/list.

ClassFlagTools
alertingMALCOLM_MCP_ENABLE_ALERTINGmalcolm_create_alert
arkime-tagMALCOLM_MCP_ENABLE_ARKIME_TAGSarkime_add_tags
hunt-jobMALCOLM_MCP_ENABLE_HUNT_JOBSarkime_create_hunt, arkime_cancel_hunt
pcap-uploadMALCOLM_MCP_ENABLE_PCAP_UPLOADmalcolm_upload_pcap
arkime-viewMALCOLM_MCP_ENABLE_ARKIME_VIEWSarkime_create_view, arkime_create_shortcut

A flag is on only when its value is true. Every write attempt writes one audit line, to stderr or to the file in MALCOLM_MCP_AUDIT_FILE. The security page describes the model.

Tools

The server has 51 read tools. They cover Malcolm filter queries, aggregation, field lookup, Arkime sessions and packets, NetBox, Zeek file scans, saved objects and alerting monitors. The tools page lists them all.

The tool schemas use about 34,000 tokens in every session. To save tokens, set MALCOLM_MCP_DISABLE_READ_GROUPS to the groups you do not need. For example, netbox,dashboards,detections,arkime-inventory leaves 34 tools. See Trimming the read surface.

Non-goals

Version 1 leaves these out on purpose:

  • Destructive writes (Arkime session delete, tag removal, user management).
  • Raw OpenSearch write or raw NetBox CRUD passthrough, behind a flag or otherwise.
  • The streamable-http transport (stdio only).

Repository structure

├── src/mcp_server_malcolm/    # The server│   ├── server.py              #   Registers the tools, applies the write gate│   ├── client.py              #   HTTP client for Malcolm│   ├── config.py              #   Write-class flags│   ├── audit.py               #   Audit output│   └── tools/                 #   Read tools. Write tools are in write/├── tests/                     # Tests├── scripts/│   └── api_parity_check.py    # Compares each tool with the Malcolm API├── docs/│   ├── install.md             #   Install, register, other install routes│   ├── container.md           #   Run in a container│   ├── configuration.md       #   Connection settings, every variable│   ├── troubleshooting.md     #   The first call fails│   ├── tools.md               #   Read tools, write tools, trimming│   ├── security.md            #   Security model, audit│   ├── usage.md               #   Demo, filter syntax, examples│   ├── python.md              #   Use the client from Python│   ├── design.md              #   Why an MCP layer, protocol notes│   ├── verification.md        #   Parity check, tested platforms, API endpoints│   └── zh-TW/                 #   Copy of these pages for README.zh-TW.md├── Dockerfile                 # Container image├── server.json                # MCP Registry manifest├── SECURITY.md                # Report a vulnerability├── CONTRIBUTING.md            # How to contribute└── CHANGELOG.md               # Changes per version

Development

bash
pip install -e . pytest pytest-asyncio ruffruff check src testsruff format --check src testspytest

The tests do not need a Malcolm instance. See CONTRIBUTING.md.

License

MIT

来源:README.md,提交 053e637

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v1.2.1最新Oct 13, 2026
  2. v1.2.0Oct 2, 2026
  3. v0.4.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分