GA4 Analytics MCP for VS Code
com.renzojohnson/ga4-mcp
GA4 MCP server: Google Analytics 4 reports, realtime data, property admin and Search Console.
client:VS Code
transport:stdio
runtime:npm
Install GA4 Analytics MCP in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "google-application-credentials",
"description": "GOOGLE_APPLICATION_CREDENTIALS",
"password": true
},
{
"type": "promptString",
"id": "google-oauth-client-id",
"description": "GOOGLE_OAUTH_CLIENT_ID",
"password": true
},
{
"type": "promptString",
"id": "google-oauth-client-secret",
"description": "GOOGLE_OAUTH_CLIENT_SECRET",
"password": true
},
{
"type": "promptString",
"id": "google-oauth-refresh-token",
"description": "GOOGLE_OAUTH_REFRESH_TOKEN",
"password": true
}
],
"servers": {
"ga4-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@renzo.johnson/ga4-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "${input:google-application-credentials}",
"GOOGLE_OAUTH_CLIENT_ID": "${input:google-oauth-client-id}",
"GOOGLE_OAUTH_CLIENT_SECRET": "${input:google-oauth-client-secret}",
"GOOGLE_OAUTH_REFRESH_TOKEN": "${input:google-oauth-refresh-token}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs