Rewritten in November 2026. The first version of this post pointed at a third-party connector and skipped the parts that actually trip people up. This one covers Google’s own server, what Copilot Studio needs from it, and what the answers can and can’t tell you.
An MCP server lets an AI assistant call another system’s tools. MCP is the Model Context Protocol, an open standard most assistants now support. A Google Analytics MCP server gives Copilot a small set of read-only tools, such as “list my properties” and “run a report”, so it can answer a question like “Which landing pages lost organic sessions last month?” with your real GA4 numbers instead of a guess.
The three ways to give Copilot your GA4 data
- Google’s open-source Google Analytics MCP server. Google publishes it on GitHub (
googleanalytics/google-analytics-mcp). It talks to the GA4 Admin API and Data API using your own Google sign-in, and it is read-only unless you deliberately switch writing on. This is the option we recommend, because nobody else sits between you and your data. - The same server, hosted for your team. Copilot Studio can’t start a program on your computer. It connects to an MCP server at a URL. So for Copilot, you run Google’s server in its HTTP mode on a small cloud service (Google Cloud Run is the usual choice), and each person signs in with their own Google account.
- A third-party hosted connector. Several companies sell GA4-to-Copilot connectors that you set up in a few clicks. It’s the fastest route, but your analytics data passes through their service, so read their security and data-retention terms before you connect a client’s property.
The rest of this guide covers options 1 and 2.
What you need first
- A Google Cloud project with the Google Analytics Admin API and Google Analytics Data API enabled.
- At least Viewer access to the GA4 properties you want to ask about. Copilot will only ever see what your Google account can see.
- For running it yourself: Python 3.10 or newer and pipx.
- For Copilot: access to Copilot Studio in your Microsoft 365 tenant, and permission to add tools to an agent.
Step 1: Try the server on your own machine
Before you host anything, check that it can read your data. Sign in with the read-only Analytics scope:
gcloud auth application-default login --scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform
Then run the server with pipx run analytics-mcp, pointing GOOGLE_APPLICATION_CREDENTIALS at the credentials file the command above printed and GOOGLE_CLOUD_PROJECT at your project ID. Connect it to any MCP client that runs local servers (Claude Code, Gemini CLI or Cursor all work) and ask it to list your properties. If that works, the Google side is set up correctly.
Step 2: Host it so Copilot can reach it
Copilot Studio only supports MCP servers that use the Streamable HTTP transport (its older SSE support ended in August 2025). Google’s server has an HTTP mode for exactly this: you deploy it as a container, give it an HTTPS URL, and turn on its Google OAuth sign-in so every user authorises with their own account. The project’s README has the current flags and a Cloud Run guide; follow that rather than a copied command, because the options have changed several times this year.
Two things to decide while you deploy:
- Keep it read-only. Writing (creating key events, custom dimensions or annotations) needs an extra flag and the
analytics.editpermission. Leave it off unless you have a reason. An assistant that can only read can’t break your tracking. - Limit who can sign in. Use an OAuth consent screen set to your organisation, and only give the service the APIs it needs.
Step 3: Add the server to your Copilot agent
In Copilot Studio, open your agent, then:
- Go to Tools, select Add a tool, then New tool.
- Under Create new, choose Model Context Protocol.
- Fill in Server name (for example “Google Analytics”), Server URL (your HTTPS endpoint) and Server description. Write the description for the agent, not for people: “Reads Google Analytics 4 reports: traffic, landing pages, sources, key events and realtime users for properties the signed-in user can access.” Copilot uses it to decide when to call the server.
- For authentication, choose OAuth 2.0, then Manual, and enter the client ID, client secret, authorisation URL and token URL from your Google OAuth client. Copilot Studio shows a callback URL: add it to the OAuth client’s authorised redirect URIs in Google Cloud.
- Select Create, then Create a new connection, sign in with Google, and select Add to agent.
Step 4: Ask good questions
Copilot works best when you name the property, the date range and what you want compared:
- “For the smartseo property, compare organic sessions by landing page, October vs September.”
- “Which traffic sources brought the most key events in the last 28 days?”
- “How many people are on the site right now, and on which pages?”
Check the first few answers against the GA4 interface. If a number looks wrong, ask Copilot which dimensions, metrics and date range it used. Usually the question was read differently, not the data.
What it can’t tell you
- Search terms. GA4 doesn’t receive Google search queries; they show as “(not provided)”. Search queries live in Search Console, which this server doesn’t read.
- Anything GA4 doesn’t collect. If a form submit or purchase isn’t tracked as an event, no assistant can report it. Fix the tracking first; our Google Tag Manager and GA4 guides cover how.
- Big, wide reports. The Data API allows up to nine dimensions in one report, applies data thresholds to small numbers, and has a daily quota. Ask focused questions rather than “give me everything”.
If you just want the answers
Setting this up is worth it if your team already lives in Microsoft 365. If you only need to know how your site is doing, the SMARTSEO app’s Analytics module connects Google Analytics and Search Console in a couple of clicks and explains your visits and search clicks in plain words, with no Cloud project to run. If you’d like the Copilot setup done for you, ask us.