Skip to main content
Glama
wojtekkura

Purple AI MCP Server

by wojtekkura

Purple AI MCP サーバー

License: MIT

Purple AI MCP サーバーを使用すると、あらゆる MCP クライアントから SentinelOne サービスにアクセスできます。

機能

このサーバーは、Model Context Protocol を通じて SentinelOne プラットフォームを公開します:

  • Purple AI: セキュリティに関する質問、脅威の調査

  • イベント: SentinelOne データレイク内のイベントに対して PowerQuery を実行

  • アラート: アラートのクエリ、検索、調査

  • 脆弱性: CVE およびセキュリティ上の発見事項の追跡

  • 設定ミス: セキュリティ態勢の問題を分析

  • インベントリ: エンドポイント、クラウド資産、ID、ネットワークデバイスに関する質問

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 では キーチェーン、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 コンテナはホスト OS の資格情報ストアにアクセスできないため、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 は stdiosse、および 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

Pydantic AI エージェントで Purple MCP を使用する 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

現時点では、認証が強制されておらず、誰でも構成済みの SentinelOne アカウントにアクセスできてしまうため、Purple AI MCP をネットワーク上に公開しないことを強く推奨します。

利用可能なツール

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-http

  • PURPLEMCP_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 サーバーに関する問題については、Issue を開いてください

このプロジェクトはオープンソースであり、コミュニティ主導です。公式の SentinelOne 製品ではありませんが、SentinelOne がより広範なオープンソース開発者コミュニティと協力して保守しています。詳細については LICENSE ファイルを参照してください。

SentinelOne プラットフォームのサポートについては、適切な サポートチャネル を使用してください。

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    B
    maintenance
    Enables 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.
    33
    90
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables natural-language investigation of Datadog data including logs, metrics, monitors, traces, hosts, dashboards, events, and incidents, all through read-only API access.
    2,053
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants read-only access to Sprinklr data via MCP, allowing querying reports, searching cases, and calling Sprinklr API endpoints.
    7
    ISC

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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