Start free

Google Analytics MCP

How to set up Google Analytics MCP and verify your first GA4 report

Choose a connection, then match two paid-channel rows against Traffic acquisition.

Illustration of Google Analytics and AI assistants connected for a GA4 report

Short answer

  • Google Analytics MCP lets an assistant request GA4 reports for an authorized property. Google's developer guide describes a read-only setup.
  • Google's released package defaults to read-only and documents optional writes. Choose a local or hosted connection based on the assistant you use.
  • Start with Sessions for Paid Search and Paid Social. Match the property, dates, filters and session channel dimension in GA4 Traffic acquisition.
  • AdCtrl reads traffic, landing-page and conversion reports from a selected GA4 property. Check your selected property before you run a report.

Run a GA4 traffic report for a property you select

Start free

3-day free trial · no card needed

Video: Google Analytics MCP: set up GA4 in Claude and check the numbersPlays from YouTube (privacy-enhanced mode) when you press play.
Transcript

Can Claude read your Google Analytics? Yes, with a Google Analytics MCP server. MCP connects your AI to a GA4 property you authorize. Claude asks for a report, and the server fetches it. Google's own server runs on your computer. Turn on two Analytics APIs, give the account Viewer access, and add it to Claude Desktop. Google's guide sets it up read-only. Then check it. Ask for last week's sessions for Paid Search and Paid Social. In GA4, open Traffic acquisition with the same dates and channel group. Paid Search matches. Paid Social doesn't, so check the filters and run it again. Or skip the server: connect AdCtrl, pick your GA4 property, and Claude reads your traffic and conversions. AdCtrl. The ad agency inside your AI. Works in ChatGPT and Claude.

Watch on YouTube

Google Analytics MCP lets an AI assistant read reports from a GA4 property you authorize. Choose a connection that fits your assistant. Then ask for Paid Search and Paid Social sessions over a closed date range and compare both rows with Traffic acquisition in GA4.

I build AdCtrl, which can read GA4 reports for a property you select1. I'd start with this check for either setup. If you need campaign and search term reports, start with the Google Ads MCP guide.

Checked 23 November 2026 against Google's setup guide and the published package2, 3.

What is Google Analytics MCP?

Google Analytics MCP gives an assistant a way to request data from GA4. MCP stands for Model Context Protocol. The assistant asks the server for a report and the server uses authorized Google Analytics access to get it. The report scope starts with a property. Pick the dates and the metric for that property.

  • Your assistant: Sends the report request from the conversation.

    (Client)

  • The MCP server: Uses the authorized account to retrieve the requested data.

    (Connection)

  • Your GA4 property: Supplies the report you can open and check against the reply.

    (Data)

Google's server can list properties, read property details and run standard reports through the Google Analytics Admin API and Data API. The standard reporting tool is called run_report2. A useful first request is small enough that you can check every row by hand. Save the traffic explanation for after the numbers match.

Is Google Analytics MCP read-only?

Google's developer guide shows a read-only setup. The published analytics-mcp package at version 1.1.0 documents optional writes that need to be turned on separately. Check the installed package and exposed tools when permission matters.

Google's setup guide

Uses read-only Analytics credentials to list authorized properties and run reports.

Published package 1.1.0

Defaults to reads. With the explicit --allow-write flag and credentials with the Analytics edit scope, the versioned package documents tools to create annotations, custom dimensions and key events. The caller also needs the relevant permission on the property2, 3.

For the traffic check below, give the reading account Viewer access on the intended property and keep Google's write option off. If someone else operates the server, confirm the read tools you will use and which Google identity will access the report.

How do you connect GA4 to Claude or ChatGPT?

Connect GA4 through a local client if you want to run the Analytics package on your own machine. For a web custom connection, choose an authorized service your client can reach.

RouteWhat you needWhere to start
Google's package in Claude Desktop or Claude CodeLocal Python and a package runner, an API-enabled Google Cloud project and credentials with access to the propertyFollow Google's local setup and then open the intended property.
Google's package hosted by your teamAn endpoint your team deploys, with authentication and user access configuredUse the package's HTTP transport. Claude web can add remote connectors. For a ChatGPT web custom connection, follow OpenAI's endpoint or Secure MCP Tunnel steps.
A managed connection such as AdCtrlAn authorized account, a supported assistant and the GA4 property you selectConnect Google Ads first in AdCtrl, add Analytics through its separate Google permission step and select the property you want to read.

The local and hosted paths differ in who runs the server and how your assistant reaches it.

Source: Google setup and package documentation, Anthropic and OpenAI connection support, and AdCtrl product documentation2, 3, 4, 5, 1.

Set up Google's package for a local read

Have the person who manages your Google Cloud project turn on the Google Analytics Admin API and Google Analytics Data API. Give the Google user or service account Viewer access to the GA4 property. Set up Application Default Credentials (ADC), which tell the package which identity to use. Follow Google's local setup guide to create read-only ADC and configure the project.

For Claude Desktop, use the analytics-mcp entry in the guide's configuration. The documented command is pipx with run analytics-mcp as its arguments. Set GOOGLE_APPLICATION_CREDENTIALS to the absolute path of your ADC file and GOOGLE_CLOUD_PROJECT to the Cloud project ID. Claude Code has a separate registration command in the same guide. Keep the credential file local and enter its path in the client configuration.

After loading the connection, ask for the properties it can read. Pick the one you can open in GA4 and write down the numeric property ID. This checks access before you ask about performance. If the server fails to start, verify that the local client can find the package runner. If it starts and requests fail, check the credential path, property access and API project before repeating the request.

Use an authorized web connection

Google's versioned package documents --transport http for teams that operate their own remote endpoint. Before you connect a workspace, have the person responsible for the service verify the endpoint and its authentication. A browser connection reaches that service, so its access settings are part of the setup.

In ChatGPT web, open Plugins, choose the plus button and select Add custom MCP server. The connection accepts a public HTTPS MCP endpoint or a supported Secure MCP Tunnel. Check the workspace permissions in OpenAI's setup instructions4.

Claude's web connector settings handle remote connectors. For a managed route, follow the provider's connection instructions and review the selected GA4 properties before the first query5.

What should you ask Google Analytics MCP first?

Ask for Sessions by Session default channel group. Choose a completed date range and a property you can open yourself. Start with Paid Search and Paid Social. The GA4 Data API calls the dimension sessionDefaultChannelGroup6, 7.

Four checks for a GA4 paid-traffic report. Match the property, use the same complete dates, choose Session default channel group, and compare the Paid Search and Paid Social session totals in GA4.

Match the scope before you check the counts. Compare the two paid channels only when both reads use the same settings.

For Google's connector, type “For the GA4 property ID I give you, run an unfiltered standard report for 9 to 15 November 2026 inclusive. Use sessionDefaultChannelGroup and Sessions. Show Paid Search and Paid Social. Label the results with the ID and dates. Mark a missing row as unavailable. Read only.”

One property and one completed week leave fewer ways to pick up a different number. Write down the metric name beside the two values. Add purchase events or lead outcomes after you have a report you can reproduce.

  1. Confirm the property.

    Manual: Open the intended GA4 property and note its numeric property ID.

    With AdCtrl: Select that property under Connections and identify it in the report request below.

  2. Read the paid-channel rows.

    Manual: Open the standard Traffic acquisition report with no extra comparisons or filters. Select the date range and Session default channel group. Record Sessions for Paid Search and Paid Social.

    With AdCtrl: Use the unfiltered report prompt below. Retrieve the channel group rows, then pick Paid Search and Paid Social from the output. Record the property and dates.

  3. Save your comparison.

    Manual: Export the GA4 report and save the native Sessions column beside the assistant's result.

    With AdCtrl: Keep both results side by side. When a row differs, rerun the read with the native report's confirmed scope.

In AdCtrl, write: only reads your accounts
For the GA4 property I selected, run an unfiltered report for 9 to 15 November 2026 inclusive. Retrieve Sessions by Session default channel group across all channel rows, then show Paid Search and Paid Social from the output. Confirm the property ID and dates. Mark a missing row as unavailable. Read only.

How do you check the MCP answer against GA4?

Check the MCP answer against the same Traffic acquisition report in GA4. Under Reports, open Acquisition and choose Traffic acquisition. Match the GA4 property to the query. Set the same date range and session channel dimension. Clear extra report comparisons and filters for this check. Compare a filtered view only when your connector can reproduce the same filter.

For a record you can compare later, choose Share this report → Download File → Download CSV in GA48. Check the Sessions column on the Paid Search and Paid Social rows. If you requested channel group, use channel group in the export. Session source / medium is a separate breakdown and may return several rows for a channel.

Session channel groupGA4 native exportAnswer in the assistantNext step
Paid Search800 sessions800 sessionsRecord this row as matched.
Paid Social700 sessions500 sessionsCheck property, dates, dimension and filters. Rerun the same read.

In this fictional report, Paid Search matches and Paid Social differs by 200 sessions. Resolve the second row before making a paid-social decision.

Source: Illustrative values. The report uses Google's session-scoped Traffic acquisition dimension6, 7.

For the mismatch, ask for the query scope and review the original tool result if your client shows it. Check whether the output includes all returned rows. An unavailable row needs investigation before you can put a zero in your worksheet. Save the two exports with the dates and property attached if two reads still disagree.

What do you look at after the first report matches?

Once the paid-channel report matches, break Sessions down by Session source / medium to see where traffic came from. Use the same property and dates to compare the assistant's breakdown with the native GA4 report. To see which sources gained or lost sessions, compare with an equivalent earlier period using the same metric, dimension and reporting scope. Record any filter alongside the result so someone else can repeat the check.

If you need the organic queries and pages that brought visitors to the site, use the Search Console MCP guide to verify the click change in Search Console.

If campaign labels are inconsistent, pick a medium for each buying channel and keep it consistent. Use the UTM Builder to create future ad links with that medium and the agreed campaign and source values. Preserve the original report settings when you review earlier weeks.

For a question about revenue or conversions, choose the outcome separately and check its definition first. Use the conversion discrepancy guide to see why Analytics and platform-attributed purchases can disagree. If a specific paid Shopify order is missing in Analytics, follow the Shopify-to-GA4 checkout trace to check that order's path.

What should you verify before relying on a GA4 MCP report?

Save the exact question and the matching native rows so the next person can repeat the report.

  • Can you open the same GA4 property with the intended identity?
  • Did both reads use the same completed dates?
  • Did both use Session default channel group?
  • Did you confirm the Sessions column on both sides?
  • Did the filters or comparisons match?
  • Did you record the two native values and mark any missing row as unavailable?
  • Did you resolve any difference before explaining a campaign change?

Frequently asked questions

Can I connect GA4 MCP to ChatGPT with a local package?

ChatGPT web's custom MCP connection expects a remote endpoint or a supported Secure MCP Tunnel. Use OpenAI's connection instructions for that web route. For a locally configured route, Google's guide documents Claude Desktop and Claude Code.

Which Google Analytics permission do I need for reporting?

Google's setup guide calls for at least Viewer access on the target property for the user or service account you authorize. Keep your chosen reporting identity scoped to the property it needs2.

Does Google Analytics MCP tell me how much I spent on Meta Ads?

The paid-channel Sessions report shows GA4 traffic grouped by its acquisition rules. Get actual Meta campaign spend from Meta or from your connected Meta Ads account in AdCtrl. Keep that figure beside the Analytics sessions if you need both in your review7, 1.

Why can I see the property but the report request fails?

Check that the intended Cloud project has both Analytics APIs active for a local install. Confirm the property role and the credential file in your client. Follow the setup guide's troubleshooting steps if you see a credential or quota error.

What to do next

Run the two-row check on one GA4 property and save it next to the native CSV. Once it matches, use the weekly paid media review to decide which change is worth investigating. To run the read against an Analytics property you select, connect AdCtrl.

Sources

  1. How AdCtrl works and what it can do, AdCtrl. Accessed 23 November 2026.
  2. Try the Google Analytics MCP server, Google for Developers. Accessed 23 November 2026.
  3. analytics-mcp 1.1.0: published release and tool list, Google Analytics on PyPI, 6 November 2026. Accessed 23 November 2026.
  4. Connecting custom MCP servers in ChatGPT, OpenAI Help Center. Accessed 23 November 2026.
  5. When to use desktop and web connectors, Claude Help Center. Accessed 23 November 2026.
  6. [GA4] Traffic acquisition report, Google Analytics Help. Accessed 23 November 2026.
  7. API dimensions and metrics, Google for Developers. Accessed 23 November 2026.
  8. [GA4] Share & export reports, Google Analytics Help. Accessed 23 November 2026.

Keep going