MCP Ecommerce

Analytics

Google Analytics MCP Server

An open-source server that lets an assistant read GA4 properties: reports, realtime data and property settings.

What it is and why it matters

The Google Analytics MCP server lets an AI assistant read your GA4 data by asking questions in plain language. It turns requests such as 'which landing pages convert best from paid traffic' into the right GA4 report, runs it and explains the result.

Like Google's Ads server it is open source, runs on your machine and is read-only. Its value is speed: marketers get answers without building custom reports. Its limit is the data itself. GA4 only shows what was tracked, so consent choices, ad blockers and tracking gaps all carry through into the assistant's answers.

What it does

  • Runs GA4 reports
  • Reads realtime data
  • Lists properties and custom dimensions

Best for

Answering traffic and conversion questions in plain language.

How to connect it

  1. In a Google Cloud project, enable the Google Analytics Admin API and the Google Analytics Data API.
  2. Authenticate with Google credentials that have read access to the GA4 properties you want, as the project's README describes.
  3. Install and run the server on your computer following the README.
  4. Add it to your AI tool's MCP settings and ask which GA4 properties it can see, to confirm the connection.

Exact commands and addresses change. Use the official documentation for the current steps.

Questions you can ask it

  • Which channels drove the most purchases last month and what was the conversion rate for each?
  • Compare mobile and desktop add-to-cart rate for paid traffic over the last 30 days.
  • Which landing pages have high sessions but a very low conversion rate?
  • Show realtime users and the top pages right now.

What it cannot do

  • It cannot change GA4 settings, events or conversions.
  • It cannot recover data that was never collected, so tracking loss stays invisible.
  • Standard GA4 limits still apply, including thresholds and sampling on some reports.

Staying safe

  • Grant read-only access to only the properties needed.
  • Remember analytics can contain personal data in custom dimensions. Keep it out of prompts you share.
  • Cross-check key numbers in the GA4 interface before reporting them to a client.

Watch out for: GA4 numbers are only as good as the tracking behind them. Consent loss and ad blockers create gaps.

Frequently asked questions

+Does Google Analytics have an MCP server?

Yes. Google publishes an open-source Google Analytics MCP server for GA4. It is read-only and runs locally with Google credentials.

+Will the numbers match what I see in GA4?

They come from the same API, so they should match the reports it runs. Differences usually come from the date range, attribution model or filters used in the question.

+Can it help with server-side tracking problems?

It can show symptoms such as lower purchase counts than the store reports, but it cannot fix tracking. That requires changes to how events are collected and sent.

Related guides

Other servers to compare