Account, Security & Privacy
Where your data goes
- GA4 data goes from your computer straight to Google. The GA4 MCP runs on your computer and calls Google's Analytics Admin and Data APIs directly. Reports and settings never pass through Tag Pilot; they go only to the AI client you run.
- Tag Pilot only brokers the token exchange. To sign you in and keep you signed in, the GA4 MCP sends the one-time Google sign-in code, and later the refresh token, to Tag Pilot's API. The API adds Tag Pilot's Google OAuth client credentials, forwards the request to Google and returns Google's answer.
- Tag Pilot stores no Google tokens and no GA4 data, and never logs tokens or codes. It records only which API key made a request, and when, to show Last used on your GA4 MCP page and to apply rate limits.
What your AI client does with the answers is up to that client and its terms.
What is stored where
| What | Where |
|---|---|
| Your Tag Pilot API key | Your AI client's MCP config (TAGPILOT_API_KEY) |
| Google refresh and access token | On your computer: ~/.config/tagpilot/ga4-mcp/<id>.json |
| Key label, created and last used time | Your Tag Pilot account |
- The token file is readable only by you (mode 600, in a mode 700 folder on macOS and Linux).
<id>is derived from your API key, so each key has its own file. - Change the folder with
GA4_MCP_CONFIG_DIR. npx -y @tagpilot/ga4-mcp statuslists the saved sign-ins with their paths.- Google access tokens last about an hour and are refreshed through Tag Pilot's API automatically.
Google permission
The only permission requested is https://www.googleapis.com/auth/analytics.readonly, shown by Google as See and download your Google Analytics data. It covers listing accounts and properties, reading settings and running reports. None of the tools can create, change or delete anything in GA4.
The GA4 MCP can only see what the signed-in Google account can see: properties where it has at least the Viewer role.
Revoking access
Any of these steps works on its own; do all three to remove everything.
-
Revoke the key on the GA4 MCP page. Token refreshes stop, so the GA4 MCP stops working within the hour (when the current access token expires).
-
Delete the local token:
npx -y @tagpilot/ga4-mcp logoutThis removes every saved Google sign-in on this computer. To remove only one key's, put the key in front:
TAGPILOT_API_KEY=tpk_your_key npx -y @tagpilot/ga4-mcp logout. You can also delete the files in~/.config/tagpilot/ga4-mcp/yourself. (Version 0.1.1 and later; 0.1.0 always needs the key.) -
Remove the access at Google on myaccount.google.com/permissions. This invalidates the refresh token everywhere.
Removing the server from your AI client stops it from running, but leaves the token file and the key in place.
Several Google accounts
Each key signs in to one Google account. To see properties from another Google account:
- Switch accounts: run
npx -y @tagpilot/ga4-mcp logout(addTAGPILOT_API_KEY=…in front to sign out only that key), then ask again and choose the other account in the browser. - Use both at once: create a second key and add a second server with its own name, for example
ga4-client. Each key keeps its own token file, so each server stays signed in to its own Google account.
claude mcp add ga4-client --env TAGPILOT_API_KEY=tpk_second_key -- npx -y @tagpilot/ga4-mcp
Often simpler: ask the client's admin to add your own Google account as a Viewer on their GA4 property.
Several computers
Create one key per computer (the GA4 MCP page suggests a label like Work laptop). Each computer signs in to Google on its own and keeps its token locally, and you can revoke one computer's key without affecting the others. The Last used column shows which keys are still in use.
Don't copy token files between computers.
Keeping the key safe
- The key can't read GA4 data or your Tag Pilot data by itself: it only lets the GA4 MCP exchange Google tokens. Still, treat it like a password.
- Don't commit project MCP config files (such as
.cursor/mcp.jsonor.vscode/mcp.json) that contain the key to a shared repository. - Lost or leaked? Revoke it on the GA4 MCP page and create a new one.
Open source
The package is open source under Apache 2.0, so you can check exactly what it does: source on GitHub, package on npm.