How to Analyze Google Analytics with Claude AI Using MCP
Nov 23, 2025

How to Analyze Google Analytics with Claude AI Using MCP

A complete tutorial for marketers on setting up Google Analytics MCP for Claude Desktop. Learn to analyze your data with AI, understand the limitations, and discover alternative solutions.

Ryohei Kameyama
Ryohei Kameyama
CEO

If you're a marketer working with Google Analytics, you've probably wished you could just ask questions about your data in plain English. "Why did conversions drop last week?" "Which landing pages are performing poorly on mobile?" Instead of clicking through dashboards and exporting data to spreadsheets, what if you could just ask Claude AI directly?

That's exactly what MCP (Model Context Protocol) makes possible.

What is MCP?

MCP is a standard protocol that allows AI assistants like Claude to connect to external data sources and tools. Think of it as a bridge that lets Claude access your Google Analytics data, Search Console metrics, or other analytics platforms—without you having to copy and paste numbers back and forth.

When you set up a Google Analytics MCP server, Claude can:

  • Query your GA4 data directly
  • Answer specific questions about your metrics
  • Identify trends and anomalies
  • Suggest improvements based on your actual data

Instead of spending 30 minutes building reports, you can have a natural conversation: "Show me pages where bounce rate increased more than 20% this month" or "What are the top traffic sources for users who convert?"

Want to Try This Without the Setup?

If you're curious about analyzing your analytics with AI but want to skip the technical setup, Eyes offers this capability ready to use. You can connect your Google Analytics and start asking questions immediately—no code required.

For those who want to understand how this works under the hood or prefer to run everything locally, let's walk through the setup process.


Setting Up Google Analytics MCP for Claude Desktop

This tutorial will guide you through setting up the official Google Analytics MCP server. I'll explain each step assuming no prior technical knowledge.

What You'll Need

  • A computer (Mac, Windows, or Linux)
  • Claude Desktop app installed (download here)
  • A Google Analytics 4 property that you have access to
  • About 30-45 minutes for initial setup

Step 1: Install Python and pipx

The Google Analytics MCP server is built with Python and distributed via pipx. pipx is a tool that installs Python applications in isolated environments.

For Mac:

  1. Open Terminal (find it in Applications > Utilities)
  2. Install pipx using Homebrew (if you don't have Homebrew, visit brew.sh first):
    brew install pipx
    pipx ensurepath
    
  3. Restart your terminal or run:
    source ~/.zshrc
    
  4. Verify the installation:
    pipx --version
    

For Windows:

  1. First, make sure Python 3.10 or higher is installed (python.org)
  2. Open Command Prompt or PowerShell
  3. Install pipx:
    python -m pip install --user pipx
    python -m pipx ensurepath
    
  4. Restart your terminal and verify:
    pipx --version
    

Step 2: Install Google Cloud CLI

You'll need the Google Cloud CLI (gcloud) to authenticate with Google's services.

For Mac:

  1. Download the installer from cloud.google.com/sdk/docs/install
  2. Extract the archive and run:
    ./google-cloud-sdk/install.sh
    
  3. Restart your terminal, then initialize:
    gcloud init
    

For Windows:

  1. Download the installer from cloud.google.com/sdk/docs/install
  2. Run the installer and follow the prompts
  3. Open a new Command Prompt and run:
    gcloud init
    

Step 3: Enable Required APIs in Google Cloud

For the MCP server to access your Google Analytics data, you need to enable two APIs in Google Cloud Platform.

  1. Go to console.cloud.google.com
  2. Create a new project (or select an existing one)
  3. Enable the Google Analytics Admin API:
    • Click the menu (☰) and go to "APIs & Services" > "Library"
    • Search for "Google Analytics Admin API"
    • Click it and press "Enable"
  4. Enable the Google Analytics Data API:
    • Go back to the API Library
    • Search for "Google Analytics Data API"
    • Click it and press "Enable"

Step 4: Create OAuth Credentials

Now you need to create OAuth credentials for authentication.

  1. In Google Cloud Console, go to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "OAuth client ID"
  3. If prompted, configure the OAuth consent screen first:
    • Choose "External" user type
    • Fill in the required fields (app name, support email)
    • Add your email to test users
    • Save and continue through the screens
  4. Back in Credentials, click "Create Credentials" > "OAuth client ID"
  5. Choose "Desktop app" as the application type
  6. Name it something like "Claude Desktop GA Access"
  7. Click "Create"
  8. Download the credentials JSON file
  9. Save it somewhere safe (e.g., ~/.config/google/client_secret.json)

Step 5: Authenticate Your Account

Now you'll authenticate using the Google Cloud CLI. This creates the Application Default Credentials that the MCP server will use.

  1. Open your terminal
  2. Run the following command (replace the path with where you saved your credentials file):
    gcloud auth application-default login \
      --scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform \
      --client-id-file=/path/to/your/client_secret.json
    
  3. A browser window will open asking you to log in to Google
  4. Choose the Google account that has access to your Analytics property
  5. Grant the permissions requested
  6. You'll see a message indicating success, and the command will output the path where your credentials were saved (typically something like /Users/yourname/.config/gcloud/application_default_credentials.json)

Important: Note down this credentials file path—you'll need it in the next step.

Step 6: Configure Claude Desktop

Now you need to tell Claude Desktop about the MCP server.

  1. Find your Claude Desktop configuration file:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Open it in a text editor (TextEdit on Mac, Notepad on Windows). If the file doesn't exist, create it.

  3. Add the MCP server configuration:

    {
      "mcpServers": {
        "analytics-mcp": {
          "command": "pipx",
          "args": ["run", "analytics-mcp"],
          "env": {
            "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/application_default_credentials.json",
            "GOOGLE_PROJECT_ID": "your-google-cloud-project-id"
          }
        }
      }
    }
    

    Replace:

    • /path/to/application_default_credentials.json with the actual path from Step 5
    • your-google-cloud-project-id with your Google Cloud project ID (find it in the Cloud Console)
  4. Save the file

Step 7: Restart Claude Desktop and Test

  1. Completely quit Claude Desktop (make sure it's not just minimized)
  2. Open Claude Desktop again
  3. Start a new conversation and try asking:
    • "What Google Analytics properties do I have access to?"
    • "Show me the top 10 pages by pageviews for the last 7 days"
    • "What's my bounce rate trend over the past month?"

If everything is set up correctly, Claude will query your Google Analytics data and give you answers based on your actual metrics.

Congratulations! You've successfully set up Claude to analyze your Google Analytics data.


Understanding the Limitations

Now that you have this working, it's important to understand some practical limitations of this setup:

Authentication is Tied to Your Account

The authentication token you created is linked to your personal Google account. This means:

  • Only your Google Analytics properties are accessible
  • If you work with clients or manage multiple organizations, you'd need separate setups for each account
  • You can't easily switch between different accounts

For agencies or consultants who need to analyze multiple clients' data, this becomes cumbersome. You'd need to reconfigure authentication each time you switch clients.

Desktop-Only Access

This MCP server runs locally on your computer, which means:

  • You can only use it on the specific machine where you set it up
  • It won't work on other computers unless you repeat the entire setup process
  • You can't access it from your phone or tablet
  • If you're traveling or working from a different device, you're out of luck

No Easy Sharing with Team Members

When you find an interesting insight, there's no simple way to share it:

  • You can't send a link to the analysis
  • Team members would need to set up their own MCP servers
  • Everyone needs their own authentication and Claude Desktop configuration
  • Collaboration requires copy-pasting results or screenshots

Maintenance Required

Technical things change:

  • Python and pipx updates might break compatibility
  • Google might update their API
  • The MCP server code might need updates
  • You'll need to troubleshoot any issues yourself

When Eyes Makes More Sense

If you found this tutorial helpful, you now understand both the power and the limitations of running your own analytics MCP server. For individual use on a single machine, it works great. But many marketing teams run into the constraints pretty quickly.

This is exactly why we built Eyes.

Eyes provides the same AI-powered analytics conversations you just experienced, but solves the limitations:

Multi-Account Support: Connect multiple Google Analytics properties, even from different Google accounts. Perfect for agencies managing client accounts or companies with multiple brands.

Access Anywhere: Use Eyes from your desktop, laptop, phone, or tablet. The analysis is cloud-based, so you can check insights during a client meeting or while traveling.

Team Collaboration: Share analysis links with teammates or clients. When you discover "mobile conversion rates dropped 15% on these three landing pages," you can send a link that shows exactly what you found—no screenshots needed.

No Setup or Maintenance: Connect your Google Analytics account and start analyzing immediately. No code to download, no credentials to manage, no updates to worry about.

Broader Data Integration: Eyes connects to Google Analytics, Search Console, and PageSpeed Insights automatically, giving you a complete picture without juggling multiple MCP servers.

If you're managing analytics for a team, working with multiple accounts, or need to access insights from anywhere, try Eyes free. You'll get all the AI analysis capabilities you just set up, without the friction.

For those who prefer to keep everything local and self-hosted, the MCP setup you just completed will serve you well. Both approaches make analytics more accessible—it just depends on your specific needs.


Final Thoughts

Whether you choose to run your own MCP server or use a tool like Eyes, the important thing is making analytics more approachable. Too many marketing decisions get made on gut feeling because the data is hard to access or interpret.

AI can change that. When you can have a natural conversation with your data—asking follow-up questions, testing hypotheses, drilling into anomalies—analytics becomes less about building reports and more about understanding your users.

I hope this tutorial helps you get started with AI-powered analytics, whichever path you choose.


Have questions about setting up MCP servers or want to share your experience? Feel free to reach out at contact@geteyes.ai

Pages

Home

About

Pricing

Blog

Privacy Policy

Terms of Service

Pages

Home

About

Pricing

Blog

Privacy Policy

Terms of Service

Pages

Home

About

Pricing

Blog

Privacy Policy

Terms of Service

Using Framer React Export version 3.2.1

covelline, LLC

Towa Ikebukuro Coop 801, 5-8-9 Nishi-Ikebukuro, Toshima-ku, Tokyo 171-0021, Japan

Tel: +81-3-6912-5502

How to Analyze Google Analytics with Claude AI Using MCP