ga-gsc-analytics
ga-gsc-analytics
読み取り専用のMCPサーバーで、Google Analytics 4 と Google Search Console のデータ(analytics.readonly + webmasters.readonly スコープ)を Claude Code / Codex に公開します。
初めての方へ? ONBOARDING.md に従って、ゼロから動作するまでの手順(Claude Code のインストール、認証情報の取得、認可、確認)を進めてください。このファイルの残りは参考資料です。
AIエージェント向け: このファイルは
AGENTS.mdを兼ねています。セットアップはここから始め、ツールの使い方(アクセスチェック、デフォルトの日付範囲、GA4 と GSC の意味論、プレゼンテーション引き継ぎ形式)についてはskills/analyze-ga-gsc/SKILL.mdを読んでください。ユーザーにチャットで認証情報を貼り付けさせないでください。
ツール
analytics_auth_start/analytics_auth_status— ローカルOAuthフローとステータス確認analytics_list_sources— 認可されたアカウントで利用可能な GA4 プロパティと GSC サイトを一覧表示ga_run_report— GA4 レポートを実行gsc_query_search_analytics— Search Console データを照会analytics_presentation_snapshot— レポート用の GA4 + GSC の複合スナップショット
Related MCP server: BigQuery MCP Server
セットアップ(ユーザーごと)
各ユーザーは自分の Google アカウントで認可し、自分のローカルトークンを保持します。client_secret.json のシークレットや tokens.json をマシン間で共有しないでください。
Google Cloud OAuth クライアント: Google Cloud Console で OAuth 2.0 デスクトップクライアントを作成(または既存を再利用)し、その
client_secret.jsonをダウンロードします。同意画面が「テスト中」の公開ステータスの場合、先に各新規ユーザーの Google アカウントをテストユーザーとして追加しないと、認可がアクセス拒否で失敗します。認証情報を配置:
~/.config/ga-gsc-analytics/client_secret.jsonに配置します(またはGA_GSC_CLIENT_SECRETでカスタムパスを指定)。データアクセスを付与: 認可する Google アカウントには、対象の GA4 プロパティ(Analytics Admin → プロパティのアクセス管理)と GSC サイト(Search Console → 設定 → ユーザーと権限)に対する実際の権限が必要です。
サーバーをビルド(
mcp/server.mjsを変更した場合のみ必要。リポジトリにはビルド済みのmcp/server.bundle.cjsが同梱されています):
pnpm install
pnpm run build # bundles mcp/server.mjs -> mcp/server.bundle.cjsMCP サーバーを登録。次のいずれかで行います:
Claude Code、ユーザーレベル:
claude mcp add ga-gsc-analytics -- node /path/to/ga-gsc-analytics/mcp/server.bundle.cjsClaude Code / Codex、プロジェクトスコープ: このリポジトリには相対パスの
.mcp.json({"mcpServers": {"ga_gsc_analytics": {"command": "node", "args": ["./mcp/server.bundle.cjs"]}}})が同梱されています。これをプロジェクトにコピーするか、このフォルダ全体をシンボリックリンクまたはベンダーとして取り込むと、そのプロジェクトを開いたときに自動的に認識されます。
認可: AI ツール内から
analytics_auth_startツールを呼び出します。ローカルブラウザの OAuth フローが開き、~/.config/ga-gsc-analytics/tokens.jsonに書き込まれます。確認:
analytics_auth_statusを呼び出し(authorized: trueと表示されるはず)、次にanalytics_list_sourcesを呼び出して、期待する GA4 プロパティ / GSC サイトが表示されることを確認します。
設定の上書き
環境変数 | デフォルト |
|
|
|
|
|
|
開発
pnpm run check # syntax check
pnpm test # node --test tests/*.test.mjsThis server cannot be installed
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 gradedqualityCmaintenanceEnables querying Google Analytics 4 traffic, engagement, and conversions, as well as Google Search Console performance, index status, and sitemap management.13MIT
- FlicenseNot gradedqualityDmaintenanceEnables read-only interaction with Google BigQuery, including SQL queries, dataset/table listing, schema retrieval, table preview, and metadata access via service account authentication.
- AlicenseBqualityCmaintenanceProvides secure, read-only access to Bing Webmaster Tools analytics and non-destructive URL submission for indexing, without destructive site management capabilities.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Google Analytics 4 data through MCP tools for running reports, listing properties, getting real-time metrics, and exploring metadata.12MIT
Related MCP Connectors
Read-only SaaS business intelligence from GA4, Stripe, and Google Search Console.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Query Churn Solution cancellation-flow metrics, revenue, and feedback analytics (read-only).
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/horiiiiii032929/ga-gsc-analytics-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server