プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

MCP Google Analytics

作者:leonardosepulvedatバージョン 1.3.0i★ –iパソコンで動く
レジストリ名io.github.leonardosepulvedat/mcp-google-analytics

インストール

概要

作者による説明(英語の原文)

GA4 MCP that reads AND writes: reports, funnels, audits, and server-side events. 26 tools.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: マーケティング・SNS
  • 入力が必要なもの:GA_SERVICE_ACCOUNT_JSON, GA_API_SECRET

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: GA_SERVICE_ACCOUNT_JSON, GA_PROPERTY_ID, GA_MEASUREMENT_ID, GA_API_SECRET

「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "your-value",
        "GA_PROPERTY_ID": "your-value",
        "GA_MEASUREMENT_ID": "your-value",
        "GA_API_SECRET": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add google-analytics --env GA_SERVICE_ACCOUNT_JSON=your-value --env GA_PROPERTY_ID=your-value --env GA_MEASUREMENT_ID=your-value --env GA_API_SECRET=your-value -- npx -y mcp-google-analytics

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "your-value",
        "GA_PROPERTY_ID": "your-value",
        "GA_MEASUREMENT_ID": "your-value",
        "GA_API_SECRET": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-google-analytics"
      ],
      "env": {
        "GA_SERVICE_ACCOUNT_JSON": "your-value",
        "GA_PROPERTY_ID": "your-value",
        "GA_MEASUREMENT_ID": "your-value",
        "GA_API_SECRET": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • GA_SERVICE_ACCOUNT_JSON 秘密 env
    Service account JSON for reading reports: file path or inline JSON (needed for read tools)
  • GA_PROPERTY_ID env
    Numeric GA4 property ID, e.g. 123456789 (needed for read tools)
  • GA_MEASUREMENT_ID env
    Measurement ID of the data stream, e.g. G-XXXXXXXXXX (needed for event-sending tools)
  • GA_API_SECRET 秘密 env
    Measurement Protocol API secret (needed for event-sending tools)

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月8日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント leonardosepulvedat で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

マーケティング・SNSのほかのサーバーとの比較i

  • このカテゴリのほかの3574件のうち0%よりスターが多い
  • このカテゴリのほかの3574件のうち26%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの3574件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

MCP Google Analyticsは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

入力が必要なもの:GA_SERVICE_ACCOUNT_JSON, GA_API_SECRET

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(1.3.0)がレジストリに届いたのは3 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Google Analytics MCP

作者:surendranb

GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.

パソコンで動く★ 244MIT10 日前更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

MCP Google Analytics Server

A Model Context Protocol (MCP) server for Google Analytics 4, providing comprehensive integration with both the Google Analytics Data API (for reading reports) and Measurement Protocol v2 (for sending events).

The GA4 MCP that reads AND writes. Most GA4 MCP servers (including Google's official one) are read-only. This one gives your AI agent the full loop: run reports and funnels, audit your setup (custom dimensions, key events, compatibility checks), send ecommerce and conversion events server-side, and verify them in the realtime report — 26 tools in one npx command.

Built for agencies too: every read tool accepts an optional propertyId, so one conversation can query all your clients' properties — no reconfiguration between clients. See Multi-Property Mode.

⚡ One-Click Install

You only need two values to start (same as any other GA4 MCP): the service account JSON and your property ID. Sending events is an optional extra.

Click Install in Cursor, then paste:

  1. `GA_SERVICE_ACCOUNT_JSON` — path to the downloaded key file, or the JSON itself
  2. `GA_PROPERTY_ID` — the numeric ID in GA4 Admin → Property Settings (e.g. 123456789)

That is enough to ask “users by country this week”. To also send events, add two more keys later (see Send events (optional)).

💡 Keep reports small

Reports can get large. This server is designed with token optimization in mind:

  • All read tools default to 10 results - Adjust the limit parameter as needed
  • Use specific date ranges - Avoid querying years of data at once
  • Select only needed dimensions/metrics - Don't request everything
  • Check [TOKEN_OPTIMIZATION.md](TOKEN_OPTIMIZATION.md) for detailed best practices

See the dedicated Token Optimization Guide for strategies to minimize token usage.

🚀 Quick Start

See QUICKSTART.md for a 5-minute setup guide, or follow the installation steps below.

📦 Installation

Option 1: Install globally via npm
npm install -g mcp-google-analytics
Option 2: Use with npx (no installation needed)
npx mcp-google-analytics

🔧 Configuration

Start with two values. That unlocks reports, funnels, realtime, and property audits — everything most people need, and the same setup every other GA4 MCP asks for.

1. Service account key
  1. In Google Cloud Console, enable Google Analytics Data API.
  2. IAM & Admin → Service Accounts → Create. Download a JSON key.
  3. In GA4: Admin → Property Access Management → add the service account email as Viewer.

Use the file path or paste the JSON into GA_SERVICE_ACCOUNT_JSON.

2. Property ID

GA4 Admin → Property Settings → Property ID (numbers only, e.g. 123456789).

{

"mcpServers": { "google-analytics": { "command": "npx", "args": ["-y", "mcp-google-analytics"], "env": { "GA_SERVICE_ACCOUNT_JSON": "/path/to/service-account.json", "GA_PROPERTY_ID": "123456789" } } } }

You can now ask: *“Show me active users by country this week.”*

Send events (optional)

Only if you want the agent to record events (purchases, signups, custom events). Most GA4 MCPs cannot do this; it is extra, not required.

  1. GA4 Admin → Data Streams → your stream → copy Measurement ID (G-XXXXXXXXXX).
  2. Measurement Protocol API secrets → Create → copy the secret.

Add them next to the two values you already have:

"GA_MEASUREMENT_ID": "G-XXXXXXXXXX",

"GA_API_SECRET": "your-api-secret"

🏢 Multi-Property Mode (Agencies)

Every read tool accepts an optional propertyId argument that overrides the configured GA_PROPERTY_ID — so a single conversation can query any property the service account can access, with no reconfiguration between clients.

  1. Grant your service account "Viewer" access on each client's GA4 property (or at account level).
  2. Set only GA_SERVICE_ACCOUNT_JSON (GA_PROPERTY_ID becomes optional — if set, it acts as the default).
  3. Discover properties, then query any of them:
Show me all my accounts and properties          → ga_get_account_summaries

Compare last week's active users between the → ga_run_report with propertyId "111111" Acme property and the Globex property and again with propertyId "222222"

propertyId accepts both 123456789 and properties/123456789. Event sending (Measurement Protocol) remains tied to the configured GA_MEASUREMENT_ID/GA_API_SECRET, since each data stream has its own secret.

🔌 Integration with Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{

"mcpServers": { "google-analytics": { "command": "npx", "args": ["-y", "mcp-google-analytics"], "env": { "GA_SERVICE_ACCOUNT_JSON": "/path/to/service-account.json", "GA_PROPERTY_ID": "123456789" } } } }

Or if installed globally:

{

"mcpServers": { "google-analytics": { "command": "mcp-google-analytics", "env": { "GA_SERVICE_ACCOUNT_JSON": "/path/to/service-account.json", "GA_PROPERTY_ID": "123456789" } } } }

Restart Claude Desktop after updating the configuration.

🎯 Integration with Cursor

Add to your Cursor MCP settings file:

macOS/Linux: ~/.cursor/mcp.json Windows: %USERPROFILE%\.cursor\mcp.json

{

"mcpServers": { "google-analytics": { "command": "npx", "args": ["-y", "mcp-google-analytics"], "env": { "GA_SERVICE_ACCOUNT_JSON": "/path/to/service-account.json", "GA_PROPERTY_ID": "123456789" } } } }

Restart Cursor after updating the configuration.

🛠️ Available Tools

At a Glance

Reading data (Google Analytics Data API) — all read tools default to 10 rows to save tokens:

ToolPurposeNotes
ga_run_reportCustom reports with dimensions and metricsAdjust limit as needed
ga_run_realtime_reportReal-time data (last 30 minutes)Great for verifying sent events
ga_get_metadataAll available dimensions and metricsLarge response (500+ items), use sparingly
ga_list_accountsList accessible GA accounts
ga_list_propertiesList GA4 propertiesAggregates all accounts if no accountId
ga_get_propertyDetails of the configured property
ga_list_data_streamsData streams of the propertyUseful to find measurement IDs
ga_run_pivot_reportPivot table reportsResponses can be very large
ga_run_funnel_reportFunnel analysis across event stepsUses Data API v1alpha
ga_batch_run_reportsMultiple reports in one request2–5 reports per batch recommended
ga_get_account_summariesAll accounts and properties in one callFastest way to discover IDs
ga_list_custom_dimensionsCustom dimensions of the propertyDiscover API names for reports
ga_list_custom_metricsCustom metrics of the propertyDiscover API names for reports
ga_list_key_eventsKey events (conversions) of the propertyKnow what counts as a conversion
ga_list_google_ads_linksGoogle Ads accounts linked to the property
ga_check_compatibilityValidate dimension/metric combos before reportingAvoids wasted requests and error loops

Sending events (Measurement Protocol):

ToolPurpose
ga_send_eventAny custom GA4 event with parameters
ga_validate_eventTest an event against the debug endpoint without recording it
ga_send_pageviewPage/screen views
ga_send_purchaseEcommerce purchases with transaction and items
ga_send_loginUser logins
ga_send_signupUser registrations
ga_send_view_itemProduct/item detail views
ga_send_add_to_cartAdd-to-cart events
ga_send_begin_checkoutCheckout initiations
ga_send_refundFull or partial refunds
Google Analytics Data API (Reading Data)
ga_run_report

Run custom reports with dimensions and metrics.

Common Dimensions: date, city, country, deviceCategory, browser, pagePath, eventName, sessionSource, sessionMedium, sessionCampaignName

Common Metrics: activeUsers, sessions, screenPageViews, conversions, totalRevenue, engagementRate, averageSessionDuration

Example:

{

"dateRanges": [{"startDate": "7daysAgo", "endDate": "today"}], "dimensions": [{"name": "city"}], "metrics": [{"name": "activeUsers"}], "limit": 10 }

ga_run_realtime_report

Get real-time data (last 30 minutes).

Example:

{

"metrics": [{"name": "activeUsers"}], "dimensions": [{"name": "country"}], "limit": 10 }

ga_get_metadata

Get all available dimensions and metrics for your property.

Warning: Returns 500+ items. Use sparingly.

ga_list_accounts

List all GA accounts accessible to the service account.

ga_list_properties

List GA4 properties, optionally filtered by account ID.

ga_get_property

Get details about the configured property.

ga_list_data_streams

List data streams for the configured property.

ga_run_pivot_report

Run pivot table reports with row/column dimensions.

Example:

{

"dateRanges": [{"startDate": "7daysAgo", "endDate": "today"}], "dimensions": [{"name": "country"}, {"name": "deviceCategory"}], "metrics": [{"name": "activeUsers"}], "pivots": [{"fieldNames": ["deviceCategory"], "limit": 5}] }

ga_run_funnel_report

Run funnel analysis to track user progression.

Note: Funnel reporting uses the Data API v1alpha channel (the only channel where Google exposes it). Each step matches an event: set eventName per step, or omit it to use the step's name as the event name. For advanced matching, pass a full filterExpression.

Example:

{

"dateRanges": [{"startDate": "7daysAgo", "endDate": "today"}], "funnelSteps": [ {"name": "page_view"}, {"name": "add_to_cart"}, {"name": "begin_checkout"}, {"name": "Purchase", "eventName": "purchase"} ] }

ga_batch_run_reports

Run multiple reports in a single request.

Warning: Can return large datasets. Limit to 2-5 reports per batch.

ga_get_account_summaries

Get all accessible accounts with their properties in a single compact call. The fastest way to discover account and property IDs.

ga_list_custom_dimensions / ga_list_custom_metrics

List the custom dimensions and metrics defined for the property, including their API names (e.g., customEvent:plan_type) so yo

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く