ThreatLocker

io.github.WYRE-AI由 GitHub 帳號 WYRE-AI 發布v1.4.2更新於 Nov 21, 2026

MCP server for ThreatLocker — zero-trust endpoint protection, allowlisting, and policies.

概覽

AI 產生的概覽

將助理連接到 ThreatLocker 入口網站 API,用來檢視電腦、核准請求、稽核記錄與組織,服務於零信任端點防護。

可以做什麼
  • 導覽各功能領域並檢查 API 連線狀態
  • 列出並檢視電腦詳細資料、簽入歷程與電腦群組
  • 列出、檢視並統計核准請求,包含許可申請詳細資料
  • 搜尋稽核記錄項目、取得單筆記錄並查看檔案的稽核歷程
  • 列出子組織、取得組織的安裝授權金鑰,以及列出可用於移動電腦的組織
適用情境
適合已在使用 ThreatLocker 的資安或 IT 管理員,希望以自然語言查詢端點清冊、待處理核准與稽核歷程,而不必在入口網站中逐項點選。
執行需求
以 stdio 方式在本機執行(Docker 映像或從原始碼建置的 Node.js 版本)。需要 ThreatLocker API 金鑰(THREATLOCKER_API_KEY)與組織 ID(THREATLOCKER_ORGANIZATION_ID),並能連線至 ThreatLocker API。閘道/HTTP 模式另需 AUTH_MODE=gateway 與 CONDUIT_S2S_SECRET,並透過請求標頭逐次提供憑證。
安裝前請注意
需要 ThreatLocker API 金鑰這項敏感憑證;組織授權金鑰工具會回傳可用於註冊的安裝金鑰。核准與稽核工具僅在 API 使用者角色具備對應入口網站權限時可用。閘道模式透過請求標頭接收憑證,缺少有效 X-Gateway-S2S 證明的請求會被拒絕;請勿在非本機開發環境使用 MCP_ALLOW_INSECURE_DEV。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ThreatLocker,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

ThreatLocker MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to the ThreatLocker Portal API. Manage computers, approval requests, audit logs, and organizations through natural language interactions.

Features

  • Stateless Architecture: No session state required, fresh connections per request
  • Decision-Tree Navigation: Navigate domains with threatlocker_navigate
  • Gateway Mode: Multi-tenant support via HTTP headers
  • Elicitation Support: Interactive prompts for missing parameters
  • Comprehensive Error Handling: Detailed error messages and logging
  • Docker Support: Production-ready containerization

Tools

Navigation

  • threatlocker_navigate - Navigate to a domain to see available tools
  • threatlocker_status - Check API connection status and available domains

Computers

  • threatlocker_computers_list - List computers with filters (search, group, pagination)
  • threatlocker_computers_get - Get detailed computer information
  • threatlocker_computers_get_checkins - Get computer checkin history

Computer Groups

  • threatlocker_computer_groups_list - List computer groups with filters
  • threatlocker_computer_groups_dropdown - Get computer groups for dropdown selection

Approval Requests

  • threatlocker_approvals_list - List approval requests with status filters
  • threatlocker_approvals_get - Get detailed approval request information
  • threatlocker_approvals_pending_count - Get count of pending approvals
  • threatlocker_approvals_get_permit_application - Get permit application details

Troubleshooting: if approval tools return an HTTP 401 / "Authentication failed" while audit tools work with the same key, the ThreatLocker API user/role lacks Approval Center permissions. An admin must grant them in the ThreatLocker portal; retrying will not help.

Audit Log

  • threatlocker_audit_search - Search audit log entries with filters. searchText is a path filter (ThreatLocker fullPath), not free text: it matches the file path and also each row's process path and created-by path, so a program's path also finds what that program did. Give a full path or use * wildcards (*\setup.msi). Filter by computer with hostname. Pass childOrganizations: true for computers in child organizations. Filter by result with actionId (1 Permit, 2 Deny, 3 Deny with option to request, 6 Ringfenced, 99 Any Deny; onlyTrueDenies / simulateDeny split enforced from monitor-only denies) and by actionType (execute, install, network, ...). groupBys counts rows by one or two fields, so actionId: 2, groupBys: [6, 9] breaks denies down by policy name and action type. These filters need the SDK release that adds them; older SDKs send only actionType
  • threatlocker_audit_get - Get one audit log entry; pass eActionLogId, sourceTableId and organizationId straight from the threatlocker_audit_search row (organizationId is required for rows from child organizations; deprecated alias: actionLogId). HTTP 500 is reported as an actionable error: re-search and pass all three fields from the same row
  • threatlocker_audit_file_history - Get audit history for a file. Requires fullPath and either hostname or computerId. For a computer in a child organization also pass organizationId (from its threatlocker_computers_list row); without it the result is empty. Needs @wyre-ai/node-threatlocker with getFileHistory({ organizationId }) support

Organizations

  • threatlocker_organizations_list_children - List child organizations
  • threatlocker_organizations_get_auth_key - Get the installation auth key for the organization the configured credentials are scoped to. The result is a sensitive key and is never logged. Reports an explicit error instead of {} when ThreatLocker returns no JSON key, and returns text bodies with SDK 3.0.2
  • threatlocker_organizations_for_move_computers - Get organizations for computer moves

Configuration

Environment Variables

Stdio Mode (Direct API Access)
bash
THREATLOCKER_API_KEY=your_api_key_hereTHREATLOCKER_ORGANIZATION_ID=your_org_id_hereMCP_TRANSPORT=stdio
Gateway Mode (Multi-tenant)
bash
AUTH_MODE=gatewayMCP_TRANSPORT=httpMCP_HTTP_PORT=8080# Required. The HTTP server exits non-zero if this is empty.CONDUIT_S2S_SECRET=gateway-provisioned-secret# Optional. Unset binds 127.0.0.1. The container image sets 0.0.0.0.# MCP_HTTP_HOST=127.0.0.1

CONDUIT_S2S_SECRET is required for the HTTP transport. The process logs an error and exits non-zero when it is unset. For local development only, MCP_ALLOW_INSECURE_DEV=1 starts the server anyway and logs a loud warning; do not set that flag in production. The secret is never written to the logs.

When MCP_HTTP_HOST is unset, the server binds 127.0.0.1. The Dockerfile sets MCP_HTTP_HOST=0.0.0.0 so the process listens inside the container; publish that port on localhost.

Gateway Mode Headers

When running in gateway mode, include these headers with each request:

  • X-Gateway-S2S: Service-to-service proof from the gateway (t=<unix>,v1=<hmac>). Requests without a valid header are rejected with 401 when CONDUIT_S2S_SECRET is set.
  • X-Threatlocker-Api-Key: Your ThreatLocker API key (required). A request without it is rejected with 401 and does not fall back to THREATLOCKER_API_KEY.
  • X-Threatlocker-Organization-Id: Your organization ID (optional; the API defaults to the key's primary organization)

/health and /healthz stay unauthenticated and do not read credentials. The stdio transport does not use CONDUIT_S2S_SECRET.

Logging

bash
LOG_LEVEL=debug|info|warn|error  # Default: info

Local Development

  1. Clone the repository:
bash
git clone https://github.com/WYRE-AI/threatlocker-mcp.gitcd threatlocker-mcp
  1. Install dependencies:
bash
npm install
  1. Set environment variables:
bash
cp .env.example .env# Edit .env with your ThreatLocker credentials
  1. Build and run:
bash
npm run buildnpm start
# Or for development with hot reload:npm run dev
  1. Test the server:
bash
# Stdio modeecho '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | npm start
# HTTP mode. CONDUIT_S2S_SECRET is required unless you set# MCP_ALLOW_INSECURE_DEV=1 (local development only; logs a loud warning).# The server binds 127.0.0.1 unless MCP_HTTP_HOST is set.MCP_TRANSPORT=http AUTH_MODE=gateway CONDUIT_S2S_SECRET=dev-secret npm run start:httpcurl http://127.0.0.1:8080/health

Docker

Using Docker Compose

bash
# Required. Compose will not start if this is unset or empty.export CONDUIT_S2S_SECRET=gateway-provisioned-secret
# Pull and run latest image. The published port is 127.0.0.1:8080.docker compose up -d
# Or build locallydocker compose -f docker-compose.dev.yml up --build

Using Docker directly

bash
# Gateway mode (recommended). The container listens on 0.0.0.0 inside# the network namespace; publish it on localhost only. The process# exits if CONDUIT_S2S_SECRET is empty.docker run -d \  --name threatlocker-mcp \  -p 127.0.0.1:8080:8080 \  -e AUTH_MODE=gateway \  -e CONDUIT_S2S_SECRET=gateway-provisioned-secret \  ghcr.io/wyre-ai/threatlocker-mcp:latest
# Stdio modedocker run -d \  --name threatlocker-mcp \  -e THREATLOCKER_API_KEY=your_key \  -e THREATLOCKER_ORGANIZATION_ID=your_org_id \  -e MCP_TRANSPORT=stdio \  ghcr.io/wyre-ai/threatlocker-mcp:latest

Architecture

Directory Structure

src/├── domains/           # Domain-specific handlers│   ├── computers.ts│   ├── computer_groups.ts│   ├── approval_requests.ts│   ├── audit_log.ts│   ├── organizations.ts│   ├── navigation.ts│   └── index.ts├── utils/             # Utilities│   ├── client.ts      # ThreatLocker API client│   ├── logger.ts      # Structured logging│   ├── types.ts       # TypeScript types│   ├── server-ref.ts  # Server reference for elicitation│   └── elicitation.ts # Interactive prompts├── server.ts          # MCP server creation├── index.ts           # Stdio transport entry└── http.ts            # HTTP transport entry

Design Patterns

  • Domain Handlers: Each API area has its own handler with getTools() and handleCall()
  • Lazy Loading: Domain handlers are imported on-demand
  • Fresh Connections: New server instance per HTTP request for stateless operation
  • Credential Invalidation: Client is reset when credentials change
  • Elicitation Framework: Interactive prompts for missing parameters

License

Apache-2.0 - see LICENSE for details.

來源:README.md,提交 af389e2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

8
  1. v1.4.2最新Nov 21, 2026
  2. v1.4.1Nov 14, 2026
  3. v1.4.0Nov 12, 2026
  4. v1.3.14Nov 11, 2026
  5. v1.3.12Oct 10, 2026
  6. v1.3.11Oct 9, 2026
  7. v1.3.10Sep 24, 2026
  8. v1.3.9Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。