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 分