Run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp, type /mcp, and sign in with your PaidSync login. Claude Code then reaches your Google Analytics 4 properties through 26 tools: custom reports, realtime checks, key events, custom dimensions, audiences and Google Ads links. Claude Code asks before it runs each tool, and GA4 writes apply on the first call, with no dry run.
One command. OAuth sign-in, no key pasted. Free plan, 15 tasks a month, no card.
Claude Code talks to remote MCP servers over Streamable HTTP. PaidSync is one of them. Add it once and the same terminal that edits your code can query and configure your GA4 properties.
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcpBy default that registers the server for the current project only. Add --scope user to make it available in every project on your machine. Run claude mcp list to confirm it is there, then start a session and type /mcp to sign in.
Takes 10 seconds. Google or email sign-in. The free plan is 15 tasks a month at $0, no card.
Click Connect on Google Analytics 4. GA4 authorizes via Google OAuth, with the Google account that has access to your properties. It uses the same Google sign-in as Google Ads and asks for the analytics scopes, analytics.edit and analytics.readonly.
Already inside Claude Code? Ask it to run connect_ga4. The tool returns an OAuth link to open in your browser.
Inside a session, list_ga4_accounts and list_ga4_properties show every property your sign-in can reach. Name the property in your prompt, or pin it in your project’s CLAUDE.md so every session uses it.
In your terminal, run:
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcpStart a session, type /mcp, pick paidsync, and sign in with your PaidSync login in the browser window that opens. Claude Code stores the OAuth token for you. No key is pasted anywhere.
Setting this up for a team? Commit a .mcp.json at the repo root so every engineer gets the same connector:
{
"mcpServers": {
"paidsync": { "type": "http", "url": "https://mcp.paidsync.ai/mcp" }
}
}Prefer an API key, for example for headless runs? Send it in a header, never in the URL, where it would end up in logs:
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp --header "Authorization: Bearer $PAIDSYNC_API_KEY"In a committed .mcp.json, add "headers": { "Authorization": "Bearer ${PAIDSYNC_API_KEY}" } so the key stays in each engineer's environment and never enters git. Applying a change to Google Ads still requires the OAuth sign-in. On other platforms a key can apply changes too, so treat it like a password and prefer OAuth.
In a Claude Code session ask: “Show me sessions and key events by source and medium for the last 28 days”
Claude Code runs a GA4 report on the property and returns the table. The connection is live.
Each prompt below maps to tools in the PaidSync GA4 group. Claude Code picks the tool. The last column says whether the call can change anything in the property.
| Ask | Tools it calls | Changes your account? |
|---|---|---|
| “List my GA4 properties and their data streams” | list_ga4_properties, list_ga4_data_streams | No |
| “Sessions and conversions by source and medium, last 28 days” | run_ga4_report | No |
| “Is the purchase event firing right now?” | run_ga4_realtime_report | No |
| “Which key events are set up, and is Google Ads linked?” | list_ga4_conversion_events, list_ga4_google_ads_links | No |
| “Which enhanced measurement events are on for the web stream?” | get_ga4_enhanced_measurement | No |
| “Mark generate_lead as a key event” | create_ga4_conversion_event | Yes, after you confirm |
| “Add a custom dimension for the plan_tier event parameter” | create_ga4_custom_dimension | Yes, after you confirm |
| “Link Google Ads account 123-456-7890 to this property” | create_ga4_google_ads_link | Yes, after you confirm |
The -p flag runs Claude Code without the interactive session. Sign in once through /mcp and the stored OAuth token carries over. A report that lands in a file looks like this:
claude -p "Run a GA4 report for the last 7 days of sessions and key events by source and medium, and flag any source whose key events dropped against the week before." \
--allowedTools "mcp__paidsync" \
--output-format json > reports/ga4-$(date +%F).jsonReads run straight through, and so do writes. --allowedTools "mcp__paidsync" allows every PaidSync tool, writes included, with no prompt. For an unattended job, allow only the read tools it needs, each by name as mcp__paidsync__tool_name.
Of the 26 GA4 tools, 11 only read and 13 can write. Reads and reports cover properties, data streams, key events, custom dimensions and metrics, audiences, Google Ads links, enhanced measurement, custom reports through run_ga4_report and the last 30 minutes through run_ga4_realtime_report.
Writes change property configuration: properties, data streams, key events, custom dimensions and metrics, audiences, enhanced measurement and Google Ads links. None of the GA4 writes has a dry run. Each one applies on the first call, so read the arguments in the Claude Code prompt before you allow it. Deletes need confirm_destructive.
Over MCP, the approval step is Claude Code’s own prompt. It asks before it runs a tool unless you allowed it with --allowedTools or in your settings. PaidSync adds checks on its side. Deletes, pauses and budget changes need confirm_destructive, and a pre-write rule check blocks unsafe arguments. The approval card and one-tap undo apply only in the PaidSync workspace.
create_ga4_conversion_event can mark it as a key event.setup_ga4_event creates a GA4 event tag in a GTM workspace, so it needs GTM connected too.delete_ga4_conversion_event stops it counting as a key event. GA4 keeps collecting the event itself.run_ga4_report for anything older.Sign up at paidsync.ai, connect Google Analytics 4 in the dashboard with your Google sign-in, then run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp in your terminal. Type /mcp inside a session, pick paidsync, and sign in with your PaidSync login.
Yes. Claude Code can mark key events, add custom dimensions and metrics, create audiences, change enhanced measurement and link Google Ads. GA4 writes have no dry run and apply on the first call, so the Claude Code prompt is your check. Deletes need an explicit confirm.
Yes. run_ga4_realtime_report shows the last 30 minutes, so you can fire a test event on your site and ask Claude Code whether it arrived.
Yes. Once you have signed in through /mcp, claude -p reuses the stored OAuth token. Reads run straight through. Writes need care. No one is there to answer the Claude Code prompt, so any write tool you allowed with --allowedTools runs straight through. For an unattended job, allow only the read tools it needs.
Yes. The free plan is $0 for 15 tasks a month with no card. Pro starts at $99 a month and Team at $249 a month.
26 GA4 tools. One command in Claude Code.