Google SecOps MCP サーバーを使用する
Model Context Protocol(MCP)により、大規模言語モデル(LLM)と AI アプリケーション(エージェント)が外部のデータソースに接続する方法が標準化されます。MCP サーバーを使用すると、そのツール、リソース、プロンプトを使用してアクションを実行し、バックエンド サービスから更新されたデータを取得できます。
ローカル MCP サーバーは通常、ローカルマシンで実行され、同じデバイス上のサービス間の通信に標準の入力ストリームと出力ストリーム(stdio)を使用します。リモート MCP サーバーはサービスのインフラストラクチャで実行され、AI アプリケーションに HTTP エンドポイントを提供して、AI MCP クライアントと MCP サーバー間の通信を行います。MCP アーキテクチャの詳細については、MCP アーキテクチャをご覧ください。
このドキュメントでは、Google Security Operations リモート MCP サーバーを使用して、Gemini CLI、Gemini Code Assist のエージェント モード、Claude Code などの AI アプリケーション、または開発中の AI アプリケーションから Google SecOps に接続する方法について説明します。
Google と Google Cloud リモート MCP サーバーには、次の機能とメリットがあります。
- 簡素化された一元的な検出。
- マネージド グローバルまたはリージョン HTTP エンドポイント。
- きめ細かい認可。
- Model Armor 保護によるプロンプトとレスポンスのセキュリティ(オプション)。
- 一元的な監査ロギング。
他の MCP サーバーと、Google Cloud MCP サーバーで使用可能なセキュリティとガバナンスの制御については、Google Cloud MCP サーバーの概要をご覧ください。
始める前に
- Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオでの Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Chronicle API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
Google Cloud CLI をインストールします。
-
外部 ID プロバイダ(IdP)を使用している場合は、まず連携 ID を使用して gcloud CLI にログインする必要があります。
-
gcloud CLI を初期化するには、次のコマンドを実行します。
gcloud init -
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Chronicle API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
Google Cloud CLI をインストールします。
-
外部 ID プロバイダ(IdP)を使用している場合は、まず連携 ID を使用して gcloud CLI にログインする必要があります。
-
gcloud CLI を初期化するには、次のコマンドを実行します。
gcloud init
必要なロール
Google SecOps リモート MCP サーバーを設定して使用するには、次の IAM ロールが必要です。
- 親プロジェクトで有効になっている任意の MCP サーバーでツールを呼び出すには、MCP ツールユーザー(
roles/mcp.toolUser)ロールが必要です。 - グローバル設定を含む Chronicle API サービスへの完全なアクセス権を確保するには、Chronicle API 管理者(
roles/chronicle.admin)ロールが必要です。 - Google SecOps への管理者アクセス権を付与するには、Chronicle SOAR 管理者(
roles/chronicle.soarAdmin)ロールが必要です。
プロジェクトで Google SecOps MCP サーバーを有効にする
サービス アカウント キー、OAuth クライアント ID、API キーなどのクライアント認証情報と、リソースのホスティングに異なるプロジェクトを使用している場合は、両方のプロジェクトで Google SecOps サービスと Google SecOps リモート MCP サーバーを有効にする必要があります。
Google Cloud プロジェクトで Google SecOps MCP サーバーを有効にするには、次のコマンドを実行します。
gcloud beta services mcp enable SERVICE \
--project=PROJECT_ID
次のように置き換えます。
PROJECT_ID: Google Cloud プロジェクト ID。SERVICE: Google SecOps のグローバルまたはリージョンのサービス名。たとえば、chronicle.googleapis.comやchronicle.us-central1.rep.googleapis.comです。利用可能なリージョンについては、Google Security Operations MCP リファレンスをご覧ください。
Google Cloud プロジェクトで使用できるように Google SecOps リモート MCP サーバーが有効になっています。Google Cloud プロジェクトで Google SecOps サービスが有効になっていない場合は、Google SecOps リモート MCP サーバーを有効にする前に、このサービスを有効にするよう求められます。
セキュリティのベスト プラクティスとして、AI アプリケーションの機能に必要なサービスに対してのみ MCP サーバーを有効にすることをおすすめします。
プロジェクトで Google SecOps MCP サーバーを無効にする
Google Cloud プロジェクトで Google SecOps MCP サーバーを無効にするには、次のコマンドを実行します。
gcloud beta services mcp disable SERVICE \
--project=PROJECT_ID
Google Cloud プロジェクトでの Google SecOps MCP サーバーの使用が無効になっています。
認証と認可
Google SecOps MCP サーバーは、認証と認可に Identity and Access Management(IAM)と OAuth 2.0 プロトコルを使用します。MCP サーバーへの認証では、すべての Google Cloud ID がサポートされています。
リソースへのアクセスを制御およびモニタリングできるように、MCP ツールを使用してエージェント用に別個の ID を作成することをおすすめします。認証の詳細については、MCP サーバーに対して認証するをご覧ください。
Google SecOps MCP の OAuth スコープ
OAuth 2.0 では、スコープと認証情報を使用して、認証されたプリンシパルがリソースに対して特定のアクションを実行する権限があるかどうかを判断します。Google の OAuth 2.0 スコープの詳細については、OAuth 2.0 を使用して Google API にアクセスするをご覧ください。
Google SecOps には、次の MCP ツール OAuth スコープがあります。
| gcloud CLI のスコープの URI | 説明 |
|---|---|
https://www.googleapis.com/auth/chronicle |
データの読み取りと変更のアクセスを許可します。 |
Google SecOps MCP サーバーを使用するように MCP クライアントを構成する
Claude や Gemini CLI などの AI アプリケーションとエージェントは、単一の MCP サーバーに接続する MCP クライアントをインスタンス化できます。AI アプリケーションには、さまざまな MCP サーバーに接続する複数のクライアントを設定できます。リモート MCP サーバーに接続するには、MCP クライアントが少なくともリモート MCP サーバーの URL を認識している必要があります。
AI アプリケーションで、リモート MCP サーバーに接続する方法を探します。サーバー名や URL などのサーバーの詳細情報を入力するよう求められます。
Google SecOps MCP サーバーの場合は、必要に応じて次の情報を入力します。
- サーバー名: Google SecOps MCP サーバー
- サーバー URL またはエンドポイント: リージョン エンドポイントを選択し、末尾に /mcp を追加します。例:
chronicle.us.rep.googleapis.com/mcp - トランスポート: HTTP
- 認証の詳細: 認証方法に応じて、 Google Cloud 認証情報、OAuth クライアント ID とシークレット、またはエージェントの ID と認証情報を入力できます。認証の詳細については、MCP サーバーに対して認証するをご覧ください。
- OAuth スコープ: Google SecOps MCP サーバーに接続するときに使用する OAuth 2.0 スコープ。Google SecOps の場合は、
https://www.googleapis.com/auth/chronicleを使用します。
ホスト固有のガイダンスについては、以下をご覧ください。
一般的なガイダンスについては、次のリソースをご覧ください。
使用可能なツール
Google SecOps MCP サーバーで使用可能な MCP ツールの詳細とその説明を表示するには、Google SecOps MCP リファレンスをご覧ください。
ツールの一覧表示
MCP インスペクタを使用してツールを一覧表示するか、tools/list HTTP リクエストを Google Security Operations リモート MCP サーバーに直接送信します。tools/list メソッド: 認証を必要としません。
POST /mcp HTTP/1.1
Host: https://chronicle.europe-west2.rep.googleapis.com
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "tools/list",
}
サンプルのユースケース
Google SecOps MCP サーバーのユースケースの例を次に示します。
Tool: list_rule_errors
プロンプトの例:
List rule errors for the rule: ru_ddd45753-d749-4fee-b068-29072e750cfb
レスポンス:
Here are the rule errors for ru_ddd45753-d749-4fee-b068-29072e750cfb:
Error Message: query took too long to execute, see https://cloud.google.com/chronicle/docs/detection/yara-l-best-practices for tips for optimizing rules; these optimization tips are applicable to various types of queries
Time Range: 2025-02-16T10:00:00Z to 2025-02-16T11:00:00Z
Rule: projects/935934211738/locations/US/instances/eb3b937b-3ab6-47e5-8185-24837b826691/rules/ru_ddd45753-d749-4fee-b068-29072e750cfb@v_1740004374_748943000
Error Message: query took too long to execute, see https://cloud.google.com/chronicle/docs/detection/yara-l-best-practices for tips for optimizing rules; these optimization tips are applicable to various types of queries
Time Range: 2025-02-16T11:00:00Z to 2025-02-16T12:00:00Z
Rule: projects/935934211738/locations/US/instances/eb3b937b-3ab6-47e5-8185-24837b826691/rules/ru_ddd45753-d749-4fee-b068-29072e750cfb@v_1740004374_748943000
The errors indicate that the queries for this rule took too long to execute during the specified time ranges. You may want to review the YARA-L best practices for optimizing rules.
Tool: create_rules
プロンプトの例:
Create the following rule:
successful_user_logins_from_outside_us_test {
meta:
author = "Google SecOps Gemini"
description = "Detect successful user logins originating from outside the United States."
severity = "Medium"
events:
$e.metadata.event_type = "USER_LOGIN"
$e.security_result.action = "ALLOW"
$e.principal.ip_geo_artifact.location.country_or_region != "United States"
outcome:
$user = array($e.principal.user.userid)
$source_ip = array($e.principal.ip)
$country = array($e.principal.ip_geo_artifact.location.country_or_region)
$city = array($e.principal.ip_geo_artifact.location.city)
condition:
$e
}
レスポンス:
The rule successful_user_logins_from_outside_us_test has been successfully created with the following details:
Name: projects/935934211738/locations/US/instances/eb3b937b-3ab6-47e5-8185-24837b826691/rules/ru_cff9cae1-bb88-4456-b725-4c08f21803ed
Revision ID: v_1768208899_054095000
Display Name: successful_user_logins_from_outside_us_test
Author: Google SecOps Gemini
Description: Detect successful user logins originating from outside the United States.
Severity: Medium
Compilation State: SUCCEEDED
Create Time: 2026-01-12T09:08:19.054095Z
セキュリティと安全に関するオプションの構成
MCP ツールで実行できるアクションが多岐にわたるため、MCP によって新たなセキュリティ リスクと考慮事項が加わります。これらのリスクを最小限に抑えて管理するために、Google Cloud は、 Google Cloud組織またはプロジェクトでの MCP ツールの使用を制御するデフォルトのポリシーとカスタマイズ可能なポリシーを提供します。
MCP のセキュリティとガバナンスの詳細については、AI のセキュリティと安全性をご覧ください。
Model Armor
Model Armor は、AI アプリケーションのセキュリティと安全性を強化するために設計されたGoogle Cloud サービスです。LLM のプロンプトとレスポンスを事前にスクリーニングすることで、さまざまなリスクから保護し、責任ある AI への取り組みをサポートします。AI を自社のクラウド環境と外部のクラウド プロバイダのいずれにデプロイする場合も、Model Armor は、悪意のある入力の防止、コンテンツの安全性の検証、機密データの保護、コンプライアンスの維持、多様な AI 環境全体での AI の安全性とセキュリティ ポリシーの一貫した適用に役立ちます。
Model Armor は、特定のリージョンのロケーションでのみ使用できます。プロジェクトで Model Armor が有効化されており、サポート対象外のリージョンからそのプロジェクトへの呼び出しが行われた場合、Model Armor はリージョン間の呼び出しを行います。詳細については、Model Armor のロケーションをご覧ください。
Model Armor を有効にする
Model Armor を使用するには、Model Armor API を有効にする必要があります。
コンソール
Model Armor API を有効にします。
API を有効にするために必要なロール
API を有効にするには、
serviceusage.services.enable権限を含む Service Usage 管理者 IAM ロール(roles/serviceusage.serviceUsageAdmin)が必要です。詳しくは、ロールを付与する方法をご覧ください。Model Armor を有効にするプロジェクトを選択します。
gcloud
始める前に、Google Cloud CLI で Model Armor API を使用して、次の処理を行います。
Google Cloud コンソールで Cloud Shell をアクティブにします。
Google Cloud コンソールの下部にある Cloud Shell セッションが開始し、コマンドライン プロンプトが表示されます。Cloud Shell はシェル環境です。Google Cloud CLI がすでにインストールされており、現在のプロジェクトの値もすでに設定されています。セッションが初期化されるまで数秒かかることがあります。
-
次のコマンドを実行して、Model Armor サービスの API エンドポイントを設定します。
gcloud config set api_endpoint_overrides/modelarmor "https://modelarmor.LOCATION.rep.googleapis.com/"
LOCATIONは、Model Armor を使用するリージョンに置き換えます。
Google と Google Cloud リモート MCP サーバーの保護を構成する
MCP ツール呼び出しとレスポンスを保護するには、Model Armor のフロア設定を使用します。フロア設定は、プロジェクト全体に適用される最小限のセキュリティ フィルタを定義します。この構成では、プロジェクト内のすべての MCP ツール呼び出しとレスポンスに一貫したフィルタセットが適用されます。
MCP のサニタイズを有効にして、Model Armor のフロア設定をセットアップします。詳細については、Model Armor のフロア設定を構成するをご覧ください。
次のコマンド例をご覧ください。
gcloud model-armor floorsettings update \ --full-uri='projects/PROJECT_ID/locations/global/floorSetting' \ --enable-floor-setting-enforcement=TRUE \ --add-integrated-services=GOOGLE_MCP_SERVER \ --google-mcp-server-enforcement-type=INSPECT_AND_BLOCK \ --enable-google-mcp-server-cloud-logging \ --malicious-uri-filter-settings-enforcement=ENABLED \ --add-rai-settings-filters='[{"confidenceLevel": "MEDIUM_AND_ABOVE", "filterType": "DANGEROUS"}]'
PROJECT_ID は、実際の Google Cloud プロジェクト ID に置き換えます。
次の設定に注意してください。
INSPECT_AND_BLOCK: Google MCP サーバーのコンテンツを検査し、フィルタに一致するプロンプトとレスポンスをブロックする適用タイプ。ENABLED: フィルタまたは適用を有効にする設定。MEDIUM_AND_ABOVE: 責任ある AI - 危険フィルタ設定の信頼度。この設定は変更できますが、値を小さくすると偽陽性が増える可能性があります。詳細については、Model Armor の信頼度をご覧ください。
Model Armor による MCP トラフィックのスキャンを無効にする
Model Armor による Google MCP トラフィックのスキャンを停止する場合は、次のコマンドを実行します。
gcloud model-armor floorsettings update \
--full-uri='projects/PROJECT_ID/locations/global/floorSetting' \
--remove-integrated-services=GOOGLE_MCP_SERVER
PROJECT_ID は、 Google Cloud プロジェクト ID に置き換えます。
Model Armor はプロジェクト内の MCP トラフィックをスキャンしません。
IAM 拒否ポリシーで MCP の使用を制御する
Identity and Access Management(IAM)拒否ポリシーは、 Google Cloud リモート MCP サーバーの保護に役立ちます。これらのポリシーを構成して、不要な MCP ツールへのアクセスをブロックします。
たとえば、次の条件に基づいてアクセスを拒否または許可できます。
- プリンシパル
- 読み取り専用などのツールのプロパティ
- アプリケーションの OAuth クライアント ID
詳細については、Identity and Access Management による MCP の使用の制御をご覧ください。