Purple AI MCP Server
Purple AI MCP 服务器
Purple AI MCP 服务器允许您使用任何 MCP 客户端访问 SentinelOne 服务。
功能
此服务器通过模型上下文协议 (MCP) 公开 SentinelOne 平台:
Purple AI:询问安全问题,调查威胁
事件:在您的 SentinelOne 数据湖中的事件上运行 PowerQuery
警报:查询、搜索和调查警报
漏洞:跟踪 CVE 和安全发现
错误配置:分析安全态势问题
清单:询问有关端点、云资源、身份和网络设备的问题
Purple AI MCP 是一项只读服务 - 您无法通过此 MCP 对您的账户或账户内的任何对象进行更改。
Related MCP server: Datadog MCP Server
快速入门
使用 uv(推荐用于本地开发或部署)
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Store your token securely (one-time setup, see Secure Token Storage below)
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp-store-token
# Set base URL
export PURPLEMCP_CONSOLE_BASE_URL="https://your-console.sentinelone.net"
# Run
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp --mode=stdio⚠️ 安全说明 ⚠️
对于生产环境或对安全敏感的环境,请锁定到特定的提交哈希,而不是使用默认分支,以降低来自我们的 发布版本 或我们在 main 分支中经过验证的提交所带来的供应链风险。
# Run with pinned hash
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git@<commit-hash> purple-mcp --mode=stdio安全令牌存储(推荐)
与其将 PURPLEMCP_CONSOLE_TOKEN 保存在明文配置文件或环境变量中,不如将其存储在操作系统的凭据管理器中。这在 Windows 上使用 Windows 凭据管理器,在 macOS 上使用 钥匙串 (Keychain),或在 Linux 上使用 Secret Service。
1. 存储您的令牌(一次性设置):
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp-store-token系统将提示您输入并确认令牌。输入内容将被隐藏。
2. 更新您的客户端配置以从 env 中删除 PURPLEMCP_CONSOLE_TOKEN:
{
"mcpServers": {
"purple-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Sentinel-One/purple-mcp.git", "purple-mcp", "--mode", "stdio"],
"env": {
"PURPLEMCP_CONSOLE_BASE_URL": "https://your-console.sentinelone.net"
}
}
}
}令牌会在启动时自动从凭据存储中检索。如果 PURPLEMCP_CONSOLE_TOKEN 也被设置为环境变量,则环境变量优先。
要删除已存储的令牌:
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp-delete-token手动将令牌添加到 Windows 凭据管理器
如果您更喜欢直接添加令牌而不运行 purple-mcp-store-token 命令,请使用 PowerShell:
cmdkey /generic:"purple-mcp/PURPLEMCP_CONSOLE_TOKEN" /user:"PURPLEMCP_CONSOLE_TOKEN" /pass:"your-token-here"验证它是否已存储:
cmdkey /list:purple-mcp*删除它:
cmdkey /delete:"purple-mcp/PURPLEMCP_CONSOLE_TOKEN"使用 Docker
# Build the image
docker build -t purple-mcp:latest .
docker run -p 8000:8000 \
-e PURPLEMCP_CONSOLE_TOKEN="your_token" \
-e PURPLEMCP_CONSOLE_BASE_URL="https://your-console.sentinelone.net" \
-e MCP_MODE=streamable-http \
purple-mcp:latest注意: Docker 容器无法访问宿主操作系统的凭据存储,因此必须将
PURPLEMCP_CONSOLE_TOKEN作为环境变量传递。请使用您平台的密钥管理(例如 Docker secrets、AWS Secrets Manager)以避免硬编码。
使用 Amazon Bedrock AgentCore
请按照 此处 的 Amazon Bedrock AgentCore 部署说明进行操作。
使用 Amazon Elastic Container Service (ECS)
请按照 此处 的 Amazon Elastic Container Service 部署说明进行操作。
对于生产部署,请参阅 部署指南。
注意: Purple AI MCP 不包含内置身份验证。对于暴露在网络上的部署,请将其置于反向代理或负载均衡器之后。请参阅 生产设置 以获取云负载均衡器配置(AWS ALB、GCP Cloud Load Balancing、Azure Application Gateway)或自托管部署的 nginx 示例。
您的令牌需要账户或站点级别的权限(而非全局权限)。请从控制台的“策略与设置”→“用户管理”→“服务用户”中获取一个。目前,此服务器仅支持有权访问单个账户或站点的令牌。如果您需要访问多个站点,则需要使用特定于账户或站点的令牌运行多个 MCP 服务器。
客户端
Purple AI MCP 支持 stdio、sse 和 streamable-http 协议,应可在任何支持 MCP 的客户端中工作。下面列出了一些示例配置。
Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"purple-mcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/Sentinel-One/purple-mcp.git", "purple-mcp", "--mode", "stdio"],
"env": {
"PURPLEMCP_CONSOLE_BASE_URL": "https://your-console.sentinelone.net"
}
}
}
}Claude Code
在终端中运行此命令:
claude mcp add --transport stdio purple-mcp --env PURPLEMCP_CONSOLE_BASE_URL=https://your-console.sentinelone.net -- uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp --mode stdio
OpenAI Codex
在终端中运行此命令:
codex mcp add purple-mcp --env PURPLEMCP_CONSOLE_BASE_URL=https://your-console.sentinelone.net -- uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp --mode stdio
Pydantic AI
以下是一些将 Purple MCP 与 Pydantic AI Agent 一起使用的 Python 代码示例。
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStdio
server = MCPServerStdio(
'uvx', args=["--from", "git+https://github.com/Sentinel-One/purple-mcp.git", "purple-mcp", "--mode", "stdio"], timeout=10
)
agent = Agent('anthropic:claude-haiku-4-5', toolsets=[server])Zed
编辑 ~/.zed/mcp.json:
{
"mcpServers": {
"purple-mcp": {
"enabled": true,
"source": "custom",
"command": "uvx",
"args": ["--from", "git+https://github.com/Sentinel-One/purple-mcp.git", "purple-mcp", "--mode", "stdio"],
"env": {
"PURPLEMCP_CONSOLE_BASE_URL": "https://your-console.sentinelone.net"
}
}
}
}其他客户端
为了调试或为多个客户端托管服务器,请以 streamable-http 模式运行并通过 mcp-remote 连接:
# Terminal 1: Start server
export PURPLEMCP_CONSOLE_BASE_URL="https://your-console.sentinelone.net"
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git purple-mcp --mode streamable-http --host localhost --port 8000
# Terminal 2: Connect with any client
npx -y mcp-remote http://127.0.0.1:8000/mcp我们建议您目前不要在网络上暴露 Purple AI MCP,因为没有强制执行身份验证,任何人都可以访问已配置的 SentinelOne 账户。
可用工具
Purple AI
purple_ai(query)- 询问安全问题
数据湖
powerquery(query, start_time, end_time)- 运行 PowerQuery 分析
警报
get_alert(alert_id)- 获取警报详情list_alerts(first, after, view_type)- 列出最近的警报search_alerts(filters, first)- 使用过滤器搜索get_alert_notes(alert_id)- 获取警报评论get_alert_history(alert_id)- 查看警报时间线
漏洞
get_vulnerability(id)- 获取漏洞详情list_vulnerabilities(first, after)- 列出最近的漏洞search_vulnerabilities(filters, first)- 搜索 CVE 和发现get_vulnerability_notes(id)- 获取评论get_vulnerability_history(id)- 查看时间线
错误配置
get_misconfiguration(id)- 获取错误配置详情list_misconfigurations(first, after)- 列出最近的问题search_misconfigurations(filters, first)- 按条件搜索get_misconfiguration_notes(id)- 获取评论get_misconfiguration_history(id)- 查看时间线
资产清单
get_inventory_item(item_id)- 获取资产详情list_inventory_items(limit, skip, surface)- 按表面类型列出资产search_inventory_items(filters, limit)- 使用高级过滤器搜索
环境变量
PURPLEMCP_CONSOLE_TOKEN- 服务用户令牌(账户或站点级别)PURPLEMCP_CONSOLE_BASE_URL- 控制台 URL(例如 https://console.sentinelone.net)PURPLEMCP_TRANSPORT_MODE- MCP 传输模式:stdio(默认)、sse或streamable-httpPURPLEMCP_STATELESS_HTTP- 为无服务器部署(例如 Amazon Bedrock AgentCore)启用无状态 HTTP 模式 - 请参阅 部署指南
开发
我们欢迎您的拉取请求或问题提交。
设置
# Install all dependencies
uv sync --group dev --group test
# Format and lint
uv run ruff format
uv run ruff check
uv run mypy测试
# Run unit tests
uv run pytest tests/unit/ -v
# Run integration tests (requires .env.test with real credentials)
uv run pytest tests/integration/ -v
# All tests with coverage
uv run pytest --cov=src/purple_mcp --cov-report=html故障排除
身份验证错误:检查您的令牌是否具有账户/站点级别权限(而非全局权限),并且您的令牌尚未过期
PowerQuery 未返回预期结果:检查您的令牌是否具有账户/站点级别权限(而非全局权限)
连接失败:验证您的控制台 URL 和网络访问;使用
--verbose获取调试日志
许可证
本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。
支持
对于此 MCP 服务器的问题,请 提交问题。
本项目是开源且社区驱动的。虽然它不是 SentinelOne 的官方产品,但它由 SentinelOne 与更广泛的开源开发者社区合作维护。有关更多信息,请参阅我们的 LICENSE 文件。
对于 SentinelOne 平台支持,请使用相应的 支持渠道。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseAqualityBmaintenanceEnables MCP clients to interact with SentinelOne's cybersecurity platform for security analysis, threat investigation, and asset management through natural language queries. Provides read-only access to alerts, vulnerabilities, misconfigurations, and inventory data.3390MIT- AlicenseNot gradedqualityDmaintenanceEnables natural-language investigation of Datadog data including logs, metrics, monitors, traces, hosts, dashboards, events, and incidents, all through read-only API access.2,053MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants read-only access to Sprinklr data via MCP, allowing querying reports, searching cases, and calling Sprinklr API endpoints.7ISC
- AlicenseAqualityBmaintenanceEnables natural-language queries about Azure resource compliance, including VM compliance, patch status, orphaned RBAC, and infrastructure health, through read-only MCP tools.3MIT
Related MCP Connectors
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wojtekkura/purple-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server