ThreatLocker

io.github.wyre-technology由 GitHub 账号 wyre-technology 发布v1.3.6更新于 Oct 24, 2026

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

概览

AI 生成的概览

面向 ThreatLocker Portal API 的 MCP 服务器,让助手用自然语言查看计算机、审批请求、审计日志和组织。

可以做什么
  • 导航各功能域并检查 API 连接状态
  • 列出并查看计算机详情,包括签到历史
  • 列出计算机组及下拉选项
  • 列出并查看审批请求,包括待处理数量与许可申请详情
  • 搜索审计日志条目、获取单条记录及文件历史
  • 列出子组织、获取组织认证密钥以及可用于移动计算机的组织
适用场景
适合需要让助手回答 ThreatLocker 零信任终端防护部署相关问题的场景,例如哪些计算机已纳管、有哪些待处理审批、审计日志显示了什么,或组织层级如何划分。
运行要求
以本地进程(stdio)方式从容器镜像运行,或作为 HTTP 网关服务运行。stdio 模式需要 THREATLOCKER_API_KEY 和 THREATLOCKER_ORGANIZATION_ID。网关模式需要 AUTH_MODE=gateway、MCP_TRANSPORT=http 和 CONDUIT_S2S_SECRET,并通过 X-Threatlocker-Api-Key 及可选的 X-Threatlocker-Organization-Id 请求头逐次提供凭据。
安装前请注意
需要 ThreatLocker API 密钥(THREATLOCKER_API_KEY 或 X-Threatlocker-Api-Key)和组织 ID,可访问安全管理数据。其中一个工具会返回组织认证密钥,属于敏感凭据。网关模式需要 CONDUIT_S2S_SECRET,缺少有效 X-Gateway-S2S 请求头会被拒绝。MCP_ALLOW_INSECURE_DEV=1 会跳过该校验,仅限本地开发。所列工具看起来是只读的。

安装

在 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

Audit Log

  • threatlocker_audit_search - Search audit log entries with filters
  • threatlocker_audit_get - Get one audit log entry by eActionLogId from a search row (deprecated alias: actionLogId)
  • threatlocker_audit_file_history - Get audit history for a file. Requires fullPath and either hostname or computerId

Organizations

  • threatlocker_organizations_list_children - List child organizations
  • threatlocker_organizations_get_auth_key - Get organization auth key
  • 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,提交 eb902de

工具

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

版本历史

1
  1. v1.3.6最新Sep 16, 2026

评分

已满足适用检查项的 40%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

    请在仓库或注册中心条目中声明许可证。