Skip to content
VS Code

Google Analytics 4 for VS Code

io.github.mindstone/mcp-server-google-analytics

Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools

client:VS Code transport:stdio runtime:npm

Install Google Analytics 4 in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "google-application-credentials",
      "description": "GOOGLE_APPLICATION_CREDENTIALS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ga4-property-id",
      "description": "GA4_PROPERTY_ID",
      "password": true
    }
  ],
  "servers": {
    "mcp-server-google-analytics": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-google-analytics"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "${input:google-application-credentials}",
        "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