mcp-server-google-analytics
Google アナリティクス MCP サーバー
Model Context Protocol TypeScript SDK を使用して構築された、Google アナリティクス 4 (GA4) データにアクセスするための MCP サーバー実装。
特徴
カスタマイズ可能なディメンションでページビュー指標を取得
アクティブユーザーと新規ユーザーを時間の経過とともに追跡する
特定のイベントとその指標を分析する
ユーザー行動指標(セッション継続時間、直帰率)を監視する
すべてのクエリに対して柔軟な日付範囲の選択
Related MCP server: MCP Search Analytics Server
前提条件
Node.js 20以上
Google アナリティクス 4 プロパティ
Analytics Data API が有効になっている Google Cloud プロジェクト
適切な権限を持つサービス アカウントの資格情報
設定
Google Cloud プロジェクトを作成し、Analytics Data API を有効にする
サービスアカウントを作成し、認証情報JSONファイルをダウンロードします
サービス アカウントに GA4 プロパティへの適切なアクセス権を付与します
環境変数を設定します。
export GOOGLE_CLIENT_EMAIL="your-service-account@project.iam.gserviceaccount.com"
export GOOGLE_PRIVATE_KEY="your-private-key"
export GA_PROPERTY_ID="your-ga4-property-id"インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の Google Analytics Server を自動的にインストールするには:
npx -y @smithery/cli install mcp-server-google-analytics --client claude手動インストール
pnpm install mcp-server-google-analytics使用法
サーバーの起動
pnpm startClaude Desktopでの設定
Claude Desktop の構成にこれを追加します:
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": ["-y", "mcp-server-google-analytics"],
"env": {
"GOOGLE_CLIENT_EMAIL": "your-service-account@project.iam.gserviceaccount.com",
"GOOGLE_PRIVATE_KEY": "your-private-key",
"GA_PROPERTY_ID": "your-ga4-property-id"
}
}
}
}利用可能な機能
ページビューを取得する
特定の日付範囲のページビュー指標を取得します。
{
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": ["page", "country"] // Optional
}アクティブユーザーを取得する
アクティブユーザーのメトリクスを取得します。
{
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}取得イベント
イベント メトリックを取得します。
{
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"eventName": "purchase" // Optional
}getUserBehavior
ユーザー行動のメトリクスを取得します。
{
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}セキュリティに関する考慮事項
機密性の高い認証情報には常に環境変数を使用する
適切なCORS設定を実装する
サービス アカウントの権限を設定するときは、最小権限の原則に従ってください。
サービスアカウントの認証情報を定期的にローテーションする
APIの使用状況を監視し、必要に応じてレート制限を実装する
貢献
貢献を歓迎します!行動規範とプルリクエストの送信手順の詳細については、貢献ガイドをお読みください。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
Maintenance
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
- AlicenseNot gradedqualityCmaintenanceProvides an interface to access Google Analytics Data API through Model Context Protocol (MCP), allowing users to retrieve reports and realtime data from Google Analytics 4 properties.1,2097MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that provides unified access to Google Analytics 4 and Google Search Console data through real-time analytics queries.2MIT
- AlicenseBqualityDmaintenanceThis project is a Google Analytics 4 (GA4) automation server implemented as a Model Context Protocol (MCP) tool. It lets AI agents query GA4 data (reports, traffic sources, demographics, etc.) and also includes a simple connection test script.71MIT
- AlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol (MCP) server that provides comprehensive Google Analytics 4 (GA4), Google Search Console (GSC), and Google Merchant Center (GMC) integration for Claude Desktop and other MCP clients.Apache 2.0
Related MCP Connectors
MCP server for interacting with the Supabase platform
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ruchernchong/mcp-server-google-analytics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server