threatlocker-mcp
MCP server for ThreatLocker — zero-trust application allowlisting, approval requests, audit logs
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 toolsthreatlocker_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 informationthreatlocker_computers_get_checkins- Get computer checkin history
Computer Groups
threatlocker_computer_groups_list- List computer groups with filtersthreatlocker_computer_groups_dropdown- Get computer groups for dropdown selection
Approval Requests
threatlocker_approvals_list- List approval requests with status filtersthreatlocker_approvals_get- Get detailed approval request informationthreatlocker_approvals_pending_count- Get count of pending approvalsthreatlocker_approvals_get_permit_application- Get permit application details
Audit Log
threatlocker_audit_search- Search audit log entries with filtersthreatlocker_audit_get- Get detailed audit log entrythreatlocker_audit_file_history- Get audit history for specific file
Organizations
threatlocker_organizations_list_children- List child organizationsthreatlocker_organizations_get_auth_key- Get organization auth keythreatlocker_organizations_for_move_computers- Get organizations for computer moves
Configuration
Environment Variables
Stdio Mode (Direct API Access)
THREATLOCKER_API_KEY=your_api_key_here
THREATLOCKER_ORGANIZATION_ID=your_org_id_here
MCP_TRANSPORT=stdio
Gateway Mode (Multi-tenant)
AUTH_MODE=gateway
MCP_TRANSPORT=http
MCP_HTTP_PORT=8080
MCP_HTTP_HOST=0.0.0.0
Gateway Mode Headers
When running in gateway mode, include these headers with each request:
X-Threatlocker-Api-Key: Your ThreatLocker API keyX-Threatlocker-Organization-Id: Your organization ID
Logging
LOG_LEVEL=debug|info|warn|error # Default: info
Local Development
- Clone the repository:
git clone https://github.com/wyre-technology/threatlocker-mcp.git
cd threatlocker-mcp
- Install dependencies:
npm install
- Set environment variables:
cp .env.example .env
# Edit .env with your ThreatLocker credentials
- Build and run:
npm run build
npm start
# Or for development with hot reload:
npm run dev
- Test the server:
# Stdio mode
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | npm start
# HTTP mode
curl http://localhost:8080/health
Docker
Using Docker Compose
# Pull and run latest image
docker compose up -d
# Or build locally
docker compose -f docker-compose.dev.yml up --build
Using Docker directly
# Gateway mode (recommended)
docker run -d \
--name threatlocker-mcp \
-p 8080:8080 \
-e AUTH_MODE=gateway \
ghcr.io/wyre-technology/threatlocker-mcp:latest
# Stdio mode
docker 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-technology/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()andhandleCall() - 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。