Model Context Protocol (MCP)により、大規模言語モデル(LLM)と AI アプリケーション(エージェント)が外部のデータソースに接続する方法が標準化されます。MCP サーバーを使用すると、そのツール、リソース、プロンプトを使用してアクションを実行し、バックエンド サービスから更新されたデータを取得できます。
ローカル MCP サーバーとリモート MCP サーバーの違いは何ですか?
- ローカル MCP サーバー
- 通常はローカルマシンで実行され、同じデバイス上のサービス間の通信に標準の入力ストリームと出力ストリーム(stdio)を使用します。
- リモート MCP サーバー
- サービスのインフラストラクチャで実行され、AI アプリケーションに HTTP エンドポイントを提供して、AI MCP クライアントと MCP サーバー間の通信を行います。MCP アーキテクチャの詳細については、 MCP アーキテクチャをご覧ください。
Cloud Logging ローカル MCP サーバーの詳細については、 GitHub の Cloud Logging MCP サーバーをご覧ください。
Google と Google Cloud リモート MCP サーバー
Google と Google Cloud リモート MCP サーバーには、次の 機能と特典があります。- 簡素化された一元的な検出
- マネージド グローバルまたはリージョン HTTP エンドポイント
- きめ細かい認可
- Model Armor 保護によるプロンプトとレスポンスのセキュリティ(オプション)
- 一元的な監査ロギング
他の MCP サーバーと、Google Cloud サーバーで使用可能なセキュリティ とガバナンスの制御については、Google Cloud MCP サーバーの概要をご覧ください。
次のような理由で、Cloud Logging ローカル MCP サーバーを使用することがあります。
- ローカルで開発とテストを行う
- オフラインでの MCP の使用
ローカル MCP サーバーの使用方法については、 Cloud Logging MCP サーバーをご覧ください。次のセクションは、Cloud Logging リモート 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.
-
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.
-
Cloud Logging API を有効にします。
API を有効にするために必要なロール
API を有効にするには、
serviceusage.services.enable権限が必要です。プロジェクトを作成した場合は、オーナーロール(