Google Analytics MCP Server

Connect your Google Analytics data using Model Context Protocol.

Google Analytics MCP Server
Local MCP Bridge

Connecting to Google Analytics (GA4)

Setting Up Your Google Analytics (GA4)

Setting Up Your Google Analytics (GA4)

To get started, you'll need to create service accounts with Google Cloud Console.

  • Visit Google Cloud Console and create an account

  • In the search bar (at the top of the page), type API Library and select the Library item

  • Then, in the Search for APIs & Services, search for Google Analytics

  • Next, locate and enable both… - Google Analytics Admin API - Google Analytics Data API

  • Then, go back to the search bar (it may be hidden and look like a )

  • Search for Service Accounts

  • Create a service account by following the steps

  • Assign either Owner or Viewer as its Role

  • You’ll notice that the service account has an email address. Jot it down.

  • When done, select the account and scroll to the right to find the Actions column

  • Click on Manage Keys

  • Click on the Add key button

  • Select JSON and create it. This will download a file that you will need later.

  • Now, visit Google Analytics and add the email of the service account as an authorized user.

  • Phew! You’re now set up with your credentials

Visit Google Cloud Console
{
  "mcpServers": {
    "analytics-mcp": {
      "command": "pipx",
      "args": [
        "run",
        "--spec",
        "git+https://github.com/googleanalytics/google-analytics-mcp.git",
        "google-analytics-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "PATH_TO_ADC_JSON"
      }
    }    
  }
}

Update Your Local MCP Bridge

You'll need to add an entry into the mcp-config.json file.

  • Run the MCP Bridge

  • Locate the config file

  • Add the entry for Google Analytics. You’ll need to replace PATH_TO_ADC_JSON with the path to the JSON file that you previously downloaded.

Restart the Local MCP Bridge

Restart the Local MCP Bridge

Once the MCP Bridge loads, you'll see Google Analytics and its tools listed in the window.

  • Remember to add your Local MCP Bridge to the list of MCP Servers in your knowledge base.

Learn about Local MCP Bridge...

Connect Using MCP Today

Unlock powerful analytics insights through Google Analytics MCP integration.