Claude supports MCP server connections natively through the Claude desktop app. Once you connect the Safe MCP server, you can query any Google Analytics 4 property using plain language, without leaving the Claude interface.
This guide walks through the setup and shows you what you can do once it is connected.
What you need
- A Claude account with access to the Claude desktop app (claude.ai/download)
- A Google Analytics account with at least one GA4 property
- A Safe MCP account (free trial available)
Step 1: Get your MCP server URL
Log in to your Safe MCP account and copy your personal MCP server URL from the account page. It will look like:
https://api.safe-mcp.com/mcp
Step 2: Add the server to Claude desktop
Open the Claude desktop app settings. Navigate to the Connections or MCP Servers section (the exact label depends on your app version).
Click Add server and paste your MCP server URL. Give the connection a name like “Google Analytics” so you can identify it.
Save the connection. Claude will verify it is reachable.
Step 3: Authorize your Google Analytics account
The first time you ask Claude a Google Analytics question, the Safe MCP server will prompt you to authorize access to your Google account.
Follow the OAuth flow — this is the standard Google permissions screen. Safe MCP requests read-only analytics scope, so it cannot modify your GA setup.
Once authorized, your credentials are stored securely and you will not need to authorize again.
Step 4: Run your first query
Ask Claude something like:
“What were my top 10 landing pages by sessions last week, and what was the conversion rate for each?”
Claude will call the Safe MCP server, retrieve the data from your GA4 property, and return the answer directly in the chat.
What you can analyze
Once connected, you can run any of the following directly in Claude:
Traffic and acquisition
- Sessions, users, and pageviews by channel, source, and medium
- New vs returning user splits
- Geographic and device breakdowns
Conversion analysis
- Conversion rate by landing page, channel, or campaign
- Goal completions and revenue by segment
- Funnel drop-off analysis across multi-step flows
Campaign performance
- Paid campaign efficiency (cost per conversion, ROAS)
- Session quality by campaign and ad group
- Budget allocation recommendations based on current data
Trend analysis
- Week-over-week and month-over-month comparisons
- Seasonal pattern identification
- Anomaly detection across key metrics
Tips for better results
Be specific about dates. “Last 7 days” works, but “last 7 days vs the same period three weeks ago” gives Claude more signal to work with.
Ask follow-up questions. Once Claude returns the first result, drill in. “Now break that down by device” or “Which of those pages has the most room to improve?” costs nothing and adds depth.
Request a narrative. If you want more than a table, ask for one: “Summarize what this means for our next sprint” or “What is the single most important thing to act on here?”
Next steps
Once you have the basics working, explore the top GA4 prompts for marketing teams for a ready-made prompt library you can use right away.
Query your Google Analytics with AI
Connect Safe MCP to ChatGPT or Claude and start analyzing your GA4 data using plain language.