Logo Purple AI MCP Server

Purple AI MCP Server

Tổ chức
Sentinel-One

Access SentinelOne's Purple AI and security services through the Model Context Protocol (MCP) - query alerts, vulnerabilities, misconfigurations, and inventory

Nhà phát hànhSentinel-One
Kho mãpurple-mcp
Ngôn ngữPython
Bản fork
33
Sao
101
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Purple AI MCP Server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    101 sao và 33 bản fork từ kho mã được liên kết.

Purple AI MCP Server

License: MIT

Purple AI MCP Server allows you to access SentinelOne Services with any MCP client.

Features

This server exposes SentinelOne's platform through the Model Context Protocol:

  • Purple AI: Ask security questions, investigate threats
  • Events: Run PowerQueries on events in your SentinelOne data lake
  • Alerts: Query, search, and investigate alerts
  • Vulnerabilities: Track CVEs and security findings
  • Misconfigurations: Analyze security posture issues
  • Inventory: Ask questions about endpoints, cloud resources, identities, and network devices
  • CVE Search: Query public CVE databases for vulnerability details
  • Threat Intelligence: Get file, URL, domain, and IP analysis from VirusTotal

Purple AI MCP is a read-only service - you cannot make changes to your account or any objects within your account from this MCP.

Quick Start

Using uv (Recommended for Local Development or Deployment)

bash
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Set credentials
export PURPLEMCP_CONSOLE_TOKEN="your_token"
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

⚠️ Security note ⚠️

For production or security-sensitive environments, pin to a specific commit hash instead of using the default branch to reduce supply chain risk from the our releases or our verified commits in main branch.

bash
# Run with pinned hash
uvx --from git+https://github.com/Sentinel-One/purple-mcp.git@<commit-hash> purple-mcp --mode=stdio

Using Docker

Follow instructions for Docker Deployment here

Using Amazon Bedrock AgentCore

Follow instructions for Amazon Bedrock AgentCore Deployment here

Using Amazon Elastic Container Service (ECS)

Follow instructions for Amazon Elastic Container Service Deployment here

Using a Cloud Provider

For cloud deployments, see Deployment Guide.

Note: Purple AI MCP does not include built-in authentication. For network-exposed deployments, place it behind a reverse proxy or load balancer. See cloud Setup for cloud load balancer configurations (AWS ALB, GCP Cloud Load Balancing, Azure Application Gateway) or nginx examples for self-hosted deployments.


Your token needs Account or Site level permissions (not Global). Get one from Policy & Settings → User Management → Service Users in your console. Currently, this server only supports tokens that have access to a single Account or Site. If you need to access multiple sites, you will need to run multiple MCP servers with Account-specific or Site-specific tokens.

Authentication

Purple MCP uses a SentinelOne Console token configured at startup via environment variables. The server authenticates with your SentinelOne Console using the provided token and base URL.

bash
# Configure authentication credentials
PURPLEMCP_CONSOLE_TOKEN=YOUR_CONSOLE_TOKEN
PURPLEMCP_CONSOLE_BASE_URL=https://console.sentinelone.net

In addition you may define a console scope for Purple AI query operations:

bash
PURPLEMCP_PURPLE_AI_CONSOLE_ACCOUNT_ID=1234567890123456789

This will scope Purple AI queries to account-scope with id 1234567890123456789.

Health Check Endpoints:

The following endpoints bypass authentication to support container orchestration systems (Kubernetes, Docker, etc.):

  • /health, /ready, /ping

These endpoints return only basic status ({"status": "ok"}) and do not expose sensitive information. See SECURITY.md for details.

Clients

Purple AI MCP supports stdio, sse, and streamable-http protocols and should work in any client that supports MCP. Some sample configurations are listed below.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "purple-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Sentinel-One/purple-mcp.git",
        "purple-mcp",
        "--mode",
        "stdio"
      ],
      "env": {
        "PURPLEMCP_CONSOLE_TOKEN": "your_token",
        "PURPLEMCP_CONSOLE_BASE_URL": "https://your-console.sentinelone.net"
      }
    }
  }
}

Claude Code

Run this command in a terminal:

claude mcp add --transport stdio purple-mcp --env PURPLEMCP_CONSOLE_TOKEN=your_token --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

Run this command in a terminal:

codex mcp add purple-mcp --env PURPLEMCP_CONSOLE_TOKEN=your_token --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

Here is some example Python code to use Purple MCP with a 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

Edit ~/.zed/mcp.json:

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_TOKEN": "your_token",
        "PURPLEMCP_CONSOLE_BASE_URL": "https://your-console.sentinelone.net"
      }
    }
  }
}

Other Clients

For debugging or to host server for multiple clients, run in streamable-http mode and connect via mcp-remote:

bash
# Terminal 1: Start server
export PURPLEMCP_CONSOLE_TOKEN="your_token"
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

We suggest you do not expose Purple AI MCP on a network at this time, as there is no authentication enforced and anyone could access a configured SentinelOne account.

Available Tools

Purple AI

  • purple_ai(query) - Ask security questions

Data Lake

  • powerquery(query, start_time, end_time) - Run PowerQuery analytics

Alerts

  • get_alert(alert_id) - Get alert details
  • list_alerts(first, after, view_type) - List recent alerts
  • search_alerts(filters, first) - Search with filters
  • get_alert_notes(alert_id) - Get alert comments
  • get_alert_history(alert_id) - View alert timeline

Vulnerabilities

  • get_vulnerability(id) - Get vulnerability details
  • list_vulnerabilities(first, after) - List recent vulnerabilities
  • search_vulnerabilities(filters, first) - Search CVEs and findings
  • get_vulnerability_notes(id) - Get comments
  • get_vulnerability_history(id) - View timeline

Misconfigurations

  • get_misconfiguration(id) - Get misconfiguration details
  • list_misconfigurations(first, after) - List recent issues
  • search_misconfigurations(filters, first) - Search by criteria
  • get_misconfiguration_notes(id) - Get comments
  • get_misconfiguration_history(id) - View timeline

Asset Inventory

  • get_inventory_item(item_id, fetch_fields) - Get asset details with field filtering
  • list_inventory_items(limit, skip, surface, fetch_fields) - List assets by surface type
  • search_inventory_items(filters, limit, skip, fetch_fields) - Search with advanced filters

Field Filtering: All inventory tools support fetch_fields parameter to control returned data:

  • Presets: MINIMAL (7 fields), STANDARD (13 fields), ALL (~200+ fields)
  • Custom lists: Specify exact fields in camelCase, e.g., ["id", "name", "resourceType"]
  • Use get_inventory_item(item_id, fetch_fields="ALL") on a single item to discover available field names

CVE Search (External)

Query public CVE databases (cve-search.org) for vulnerability information:

  • cve_search_by_id(cve_id) - Get detailed CVE information by ID
  • cve_search_by_vendor(vendor, product) - Search CVEs by vendor/product
  • cve_database_status() - Get database update information

Note: No API key required. Data sourced from CIRCL.LU's cve-search.org.

Threat Intelligence (External)

Query VirusTotal/Google Threat Intelligence for file, URL, domain, and IP analysis:

  • threat_intel_by_hash(hash_value) - Get threat intel for file hash (MD5/SHA1/SHA256)
  • threat_intel_by_url(url) - Get URL reputation and analysis
  • threat_intel_by_domain(domain) - Get domain threat intelligence
  • threat_intel_by_ip(ip_address) - Get IP address threat intelligence
  • threat_intel_get_file_relationships(hash_value, relationship_type) - Get file relationships (contacted domains/IPs, similar files)
  • threat_intel_search(query) - Search VirusTotal Intelligence (Premium API required)
  • threat_intel_get_file_behavior(hash_value, sandbox) - Get sandbox behavioral analysis

Note: Requires PURPLEMCP_VT_API_KEY environment variable with a valid VirusTotal API key.

Environment Variables

Required

  • PURPLEMCP_CONSOLE_TOKEN - Authentication token (Service User token or Console API token)
  • PURPLEMCP_CONSOLE_BASE_URL - Console URL (e.g., https://console.sentinelone.net)

Optional

  • PURPLEMCP_SDL_BASE_URL - Dedicated base URL for the SDL API
    • When set, this URL is used directly instead of PURPLEMCP_CONSOLE_BASE_URL + /sdl
    • Example: https://your-dedicated-sdl-endpoint.sentinelone.net
    • When not set, the SDL API is accessed at {PURPLEMCP_CONSOLE_BASE_URL}/sdl (default behavior)
  • PURPLEMCP_VT_API_KEY - VirusTotal API key for threat intelligence tools (get one from https://www.virustotal.com/gui/my-apikey)
  • PURPLEMCP_SDL_CONSOLE_ACCOUNT_IDS - Account IDs for SDL query scoping (comma-separated or JSON array)
    • When specified: queries are scoped to the provided account(s)
    • When not specified: queries all accounts accessible to the token
    • Example: "426418030212073761" or "123,456,789" or ["123", "456"]
  • PURPLEMCP_SDL_CONSOLE_SITE_IDS - Site IDs for SDL query scoping
    • When specified: queries are scoped to the provided site
    • Requires PURPLEMCP_SDL_CONSOLE_ACCOUNT_IDS to also be set with exactly one account ID
    • Example: "1234567890123456789" or "123,456,789" or "[123, 456]"
    • Note: Currently, only the first site ID is used.
  • PURPLEMCP_TRANSPORT_MODE - MCP transport mode: stdio, http, streamable-http, or sse (default: stdio)
  • PURPLEMCP_STATELESS_HTTP - Enable stateless HTTP mode for serverless deployments (e.g., Amazon Bedrock AgentCore) - see deployment guide

Development

We welcome your pull requests or issue submissions.

Setup

bash
# Install all dependencies
uv sync --all-groups

# Format and lint
uv run ruff format
uv run ruff check .
uv run mypy src tests

Testing

bash
# 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

Env-vars for integration-testing of Account Scopes

There are some integration tests that require additional configuration to run (if left unconfigured they will be skipped). If you want to run test_sdl_scope_integration.py you will need to define the following env-vars in your .env.test file (with the dummy values replaced for your test scenario):

# An accessible account for your console token:
PURPLEMCP_SDL_CONSOLE_ACCOUNT_IDS=123456789012345678
# Another account from your console
PURPLEMCP_SDL_INT_TEST_SECOND_ACCOUNT_ID=222333444555666
# An Agent UUID accessible in your primary account:
PURPLEMCP_SDL_INT_TEST_AGENT_UUID=aaabbb-1234-5678-ccdd-678e89100bb1
# A timestamp at the middle of a 10-minute window where you expect to see events from the Agent UUID:
PURPLEMCP_SDL_INT_TEST_AGENT_EVENT_TIMESTAMP=2025-11-18T05:25:00+00:00

Troubleshooting

  • Authentication errors: Check your token has Account/Site level permissions (not Global), and your token has not expired
  • PowerQuery does not return expected results: Check your token has Account/Site level permissions (not Global)
  • Connection failures: Verify your console URL and network access; use --verbose for debug logs

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

This project is open source and community-driven. Although it is not an official SentinelOne product, it is maintained by SentinelOne in partnership with the broader open source developer community. See our LICENSE file for further information.

For SentinelOne platform support, use the appropriate support channel.

Cài đặt

TypingMind
{
  "mcpServers": {
    "purple-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Sentinel-One/purple-mcp.git",
        "purple-mcp",
        "--mode",
        "stdio"
      ],
      "env": {
        "PURPLEMCP_CONSOLE_TOKEN": "<PURPLEMCP_CONSOLE_TOKEN>",
        "PURPLEMCP_CONSOLE_BASE_URL": "<PURPLEMCP_CONSOLE_BASE_URL>"
      }
    }
  }
}

Dùng MCP Purple AI MCP Server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Purple AI MCP Server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Purple AI MCP Server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Purple AI MCP Server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "purple-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Purple AI MCP Server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Purple AI MCP Server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Purple AI MCP Server giúp tôi làm việc này không?
Purple AI MCP Server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Purple AI MCP Server.

Câu hỏi thường gặp

Máy chủ MCP Purple AI MCP Server dùng để làm gì?

Purple AI MCP Server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Purple AI MCP Server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Purple AI MCP Server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Purple AI MCP Server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Purple AI MCP Server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Purple AI MCP Server với TypingMind?

Purple AI MCP Server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Purple AI MCP Server cung cấp những công cụ nào trong TypingMind?

Purple AI MCP Server cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Purple AI MCP Server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Purple AI MCP Server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇