mcp google analytics for VS Code
io.github.leonardosepulvedat/mcp-google-analytics
GA4 MCP that reads AND writes: reports, funnels, audits, and server-side events. 26 tools.
client:VS Code
transport:stdio
runtime:npm
Install mcp google analytics in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "ga-service-account-json",
"description": "GA_SERVICE_ACCOUNT_JSON",
"password": true
},
{
"type": "promptString",
"id": "ga-property-id",
"description": "GA_PROPERTY_ID",
"password": true
},
{
"type": "promptString",
"id": "ga-measurement-id",
"description": "GA_MEASUREMENT_ID",
"password": true
},
{
"type": "promptString",
"id": "ga-api-secret",
"description": "GA_API_SECRET",
"password": true
}
],
"servers": {
"mcp-google-analytics": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-analytics"
],
"env": {
"GA_SERVICE_ACCOUNT_JSON": "${input:ga-service-account-json}",
"GA_PROPERTY_ID": "${input:ga-property-id}",
"GA_MEASUREMENT_ID": "${input:ga-measurement-id}",
"GA_API_SECRET": "${input:ga-api-secret}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs