Google Analytics MCP Server

Official

Query Analytics property information and reports through the experimental first-party MCP server.

Local serverstdioPythonApache-2.0

What is the Google Analytics Official MCP Server?

Google Analytics MCP is an experimental local server published by the Google Analytics project. It connects an assistant to the Analytics Admin and Data APIs for property information and reporting.

Ask a question with a defined scope

Start by identifying the property and date range. Then name the dimensions and metrics you want: traffic by channel, an event trend or a funnel stage. Ask the assistant to preserve those choices with the result so another person can reproduce the report.

Authentication and setup

The documented setup uses Python with pipx and Google Application Default Credentials. Enable the Admin and Data APIs in the selected Cloud project and use credentials with access to the intended Analytics property. The README requires the analytics read-only scope.

Reports still need interpretation

Check property time zone, filters, attribution and metric definitions before comparing totals with a dashboard. Realtime reports and historical reports answer different questions. An assistant can summarize the returned data, but the report settings determine what the numbers mean.

Operational considerations

The repository labels this integration experimental. Test one property and a small report before using it for routine analysis. Keep credential files outside source control and confirm that the account can read only the resources your workflow needs.

Explore analytics MCP integrations or browse the official server directory.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_account_summariesList available analytics accounts and properties.
get_property_detailsInspect the selected property.
list_google_ads_linksInspect linked advertising accounts.
run_reportQuery a core Analytics Data API report.
run_funnel_reportQuery a funnel report.
get_custom_dimensions_and_metricsInspect a property's custom reporting fields.
run_realtime_reportQuery a realtime report.

How to install the Google Analytics Official MCP Server

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

Configure ADC and enable both Analytics APIs first. Replace the credential path and project ID with your own values.

Configuration

Python, pipx, enabled Analytics Admin and Data APIs, Application Default Credentials and property access.

VariableDescriptionRequired
GOOGLE_APPLICATION_CREDENTIALSPath to the configured Application Default Credentials JSON file.Yes
GOOGLE_PROJECT_IDCloud project ID used in the documented client configuration.Optional