Skip to content
VS Code

Google Analytics 4 for VS Code

com.getmcpads/google-analytics

Google Analytics 4 MCP server: 27 read tools.

client:VS Code transport:stdio runtime:npm

Install Google Analytics 4 in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "ga4-client-id",
      "description": "GA4_CLIENT_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ga4-client-secret",
      "description": "GA4_CLIENT_SECRET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ga4-refresh-token",
      "description": "GA4_REFRESH_TOKEN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ga4-property-id",
      "description": "GA4_PROPERTY_ID",
      "password": true
    }
  ],
  "servers": {
    "google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@getmcpads/google-analytics-mcp-server"
      ],
      "env": {
        "GA4_CLIENT_ID": "${input:ga4-client-id}",
        "GA4_CLIENT_SECRET": "${input:ga4-client-secret}",
        "GA4_REFRESH_TOKEN": "${input:ga4-refresh-token}",
        "GA4_PROPERTY_ID": "${input:ga4-property-id}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Google Analytics 4 in other clients