paulhindemith/ga4-mcp-server
3.1
If you are the rightful owner of ga4-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This repository provides a guide to building a GA4 MCP server using the Google ADK UI.
GA4 MCP Server
Google ADK の UI を使って GA4 MCP サーバーを構築するためのリポジトリです。
必要な権限
Cloud Run Admin
Compute Load Balancer Admin
Editor
Logs Configuration Writer
Monitoring Editor
Service Account Admin
Service Account User
デプロイ手順
- 各種 API を有効化
- Cloud Run API
- Compute Engine API
- Vertex AI API
- Cloud Build API
- Google Analytics Admin API
- Google Analytics Data API
- サービスアカウントの作成
- ロール: Vertex AI ユーザー
- GA4 アカウントもしくはプロパティでサービスアカウントに以下の権限を付与
- 役割: 閲覧者
- 対象: 作成したサービスアカウント
- Artifact Registry にリポジトリを作成。Docker コンテナを push
- Cloud Run にて新しいサービスを作成
- Cloud Load Balancing にて新しいロードバランサを作成
- 必要であれば IP 制限
開発手順
以下のコマンドを実行し、https://www.googleapis.com/auth/analytics.readonly と https://www.googleapis.com/auth/cloud-platform の権限を付与した認証情報を取得。
gcloud auth application-default login \
--scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform
ADK の UI を起動
adk web --reload_agents