Google Analytics MCP Server

Researchstdio
Repositorio

Google's official MCP server for Google Analytics 4. Lets AI agents run reports against the GA4 Data API, discover dimensions and metrics, and explore account and property metadata with server-side aggregation and safe defaults. Runs locally (via pipx) and connects to MCP-compatible clients for conversational analysis of website traffic and user behavior.

Conectar

Añade esta configuración a .claude/mcp.json

{
  "mcpServers": {
    "google-analytics": {
      "command": "npx",
      "args": [],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "<YOUR_GOOGLE_APPLICATION_CREDENTIALS>"
      }
    }
  }
}

Herramientas (2)

run_report

Run a Google Analytics 4 report with the given metrics, dimensions, and date range.

{
  "type": "object",
  "required": [
    "property_id",
    "metrics"
  ],
  "properties": {
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Metrics to include (e.g. activeUsers, sessions)"
    },
    "date_range": {
      "type": "object",
      "description": "Start and end dates for the report"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensions to break down by (e.g. country, deviceCategory)"
    },
    "property_id": {
      "type": "string",
      "description": "GA4 property ID"
    }
  }
}

get_property_details

Retrieve metadata and available dimensions/metrics for a GA4 property.

{
  "type": "object",
  "required": [
    "property_id"
  ],
  "properties": {
    "property_id": {
      "type": "string",
      "description": "GA4 property ID"
    }
  }
}

Recursos

Este servidor no expone ningún recurso.

Prompts

Este servidor no expone ningún prompt.

Información del servidor

Autor
Google Analytics (@googleanalytics)
Repositorio
https://github.com/googleanalytics/google-analytics-mcp
Estrellas
0
Última actualización
12 de julio de 2026