SEO Skill

Google Analytics MCP server

Add one URL to your agent, sign in with Google, and ask about your Google Analytics: sessions from search beside your Search Console clicks, the pages search sends people to, and visits from ChatGPT, Perplexity and other AI assistants.

Run it in a terminal, then sign in with Google.

Or run it on your machine

Installs the CLI, signs you in and adds the skill to your agents. Site crawls and Bing data run this way, on your own machine. A crawl fetches many pages, and Bing blocks our hosted server.

What a Google Analytics MCP server does

A Google Analytics MCP server lets an AI agent such as Claude, Codex or ChatGPT read your Google Analytics data through the Model Context Protocol, so it answers from your real numbers instead of guessing.

The SEO Skill MCP server is hosted at https://seoskill.dev/mcp. There is nothing to install and no Google Cloud project to create. It is read-only and built for one job: what happens after someone clicks your site in search. These are the questions it answers:

Ask your agentWhat comes back
Did search traffic drop, or all traffic?Organic Search sessions from Google, from every search engine and from all channels, beside your Search Console clicks.
Which pages does search send people to?Each landing page from Organic Search with sessions, users, engaged sessions and key events.
How much traffic do ChatGPT and Perplexity send?Sessions from 12 AI assistants by source, and the pages they land on.
What changed after the release on 15 September?Sessions and clicks in equal periods before and after the date.

Connect Google Analytics to Claude, Codex or ChatGPT in 3 steps

You need a Google account with Viewer access to the Google Analytics property, and access to at least one Search Console property on the same account. That Google sign-in is your SEO Skill account, with no password or separate signup.

  1. Add the server to your agent. In Claude Code, run the command below. The Codex command and the URL for other clients are at the top of this page.
    claude mcp add --transport http seoskill https://seoskill.dev/mcp
  2. Sign in with Google when your client asks. The sign-in asks for read-only access, so nothing the agent does can change your Google Analytics settings.
  3. Ask a first question to check the connection:
    Which Google Analytics properties can you see?

In claude.ai and the Claude apps you add the same URL as a custom connector instead of running a command, and in ChatGPT as a custom MCP server. The Google Analytics setup guides show each client step by step (Claude, ChatGPT, Codex, Cursor, VS Code, Gemini CLI, Windsurf and Le Chat).

Prefer a terminal? npm i -g seo then seo start signs you in with Google on your own machine, and the same reports run from the command line.

See Google Analytics sessions beside Search Console clicks

Ask for the SEO report and your agent sets Google Analytics sessions next to Search Console clicks for the same dates, each against the previous period:

Run the SEO report for example.com

You don't pick a property. The server reads the properties your Google account can see, finds the one whose web stream matches the site, and names it in the answer (no hunting for a nine-digit property ID). The report shows three session counts:

  • Organic Search sessions from Google, the number to set beside your clicks.
  • Organic Search sessions from every search engine, with Bing and DuckDuckGo listed when they send visits.
  • Sessions from all channels, so you can tell a search drop from a drop in all your traffic.

Clicks and sessions rarely match, and they should not be added together. Search Console counts clicks on Google's results. Google Analytics counts sessions, which start only when its tag loads, so consent banners and ad blockers hide some of them. When Google Analytics days use another time zone from Search Console, the answer says so.

Worked example: a 16% drop in clicks on example.com

Say Search Console clicks to example.com fell from 5,020 to 4,210 over 28 days. The SEO report for those dates reads like this, trimmed to the lines that matter (the numbers are made up for this example, and the wording is the report's own):

Totals: clicks 4210 (was 5020, -16.1%), ...

Google Analytics, property Example (123456789), matched by its web stream https://example.com: Organic Search sessions from Google 5480 (was 6610, -17.1%), from every search engine 6350 (was 7420, -14.4%), sessions from all channels 11900 (was 12150, -2.1%). Sessions are Google Analytics' own count, not Search Console clicks.

Visits from AI assistants (ChatGPT, Perplexity, Claude, Gemini, Copilot and others): 214 sessions (was 162, +32.1%). By source: chatgpt.com 151 (was 118), perplexity.ai 38 (was 29), gemini.google.com 14 (was 9), claude.ai 11 (was 6).

Clicks fell 16.1% and Organic Search sessions from Google fell 17.1%, so two separate counts agree. Sessions from all channels fell only 2.1%, so the site did not lose its tracking and the rest of its traffic held up. The drop is in Google search.

The next question is when it started. Ask your agent to compare the periods either side of the first bad day:

Compare example.com before and after 2026-10-14

seo compare lists the pages and queries that moved most, the sessions in each period and any Google updates in the window. An update with matching dates is a lead to check before you blame it.

Find the landing pages from search that convert

For every landing page from Organic Search, ask:

Show the Google Analytics search landing pages for example.com for the last 90 days

Each page comes back with sessions, users, engaged sessions and key events, most sessions first, using Google Analytics' own names for each number. Without dates it reads the last 28 days. The answer says when Google Analytics hid small rows or grouped some into "(other)", so a missing page is unknown rather than zero.

Key events also change the order of the SEO report. Its quick wins, low click-through rate, striking distance and second page lists put pages with key events from Organic Search first. A page one spot from the top 3 that brings in sign-ups is a better use of an afternoon than one that only gets read.

In a terminal, list your properties, then pass the numeric ID to the report:

seo analytics google properties
seo analytics google report --property 123456789

How to track AI referral traffic in Google Analytics

Google Analytics records a visit from an AI assistant under the session source the assistant passes in its referrer or a utm_source tag, such as chatgpt.com or perplexity.ai. In the default channel group those visits are mixed in with Referral (or Direct), so AI referral traffic has no line of its own until you make one.

These are the session sources SEO Skill counts as AI assistants:

AI assistantSession source in Google Analytics
ChatGPTchatgpt.com, chatgpt, chat.openai.com
Perplexityperplexity.ai, perplexity
Claudeclaude.ai
Geminigemini.google.com
Copilotcopilot.microsoft.com, copilot.com
DeepSeek, Grok, Le Chatchat.deepseek.com, grok.com, chat.mistral.ai
Meta AI, You.com, Phind, Poemeta.ai, you.com, phind.com, poe.com

Ask your agent for AI assistant visits

How many visits did AI assistants send example.com in the last 28 days, and which pages did they land on?

The answer gives sessions from AI assistants against the previous period, split by source, with the top landing pages. Ask for a comparison around a date to see whether a content change moved them. Nothing needs setting up in Google Analytics first.

Build an AI assistants channel in Google Analytics

To see the same visits inside Google Analytics, add a custom channel group. You need the Editor role on the property.

  1. Open Admin, then Data display, then Channel groups, and choose Create new channel group.
  2. Choose Add new channel, name it AI assistants, and add a condition: Source matches regex.
  3. Paste the regex below, which matches the sources in the table, and save the channel.
  4. Choose Reorder and drag AI assistants above Referral, then save the group.
  5. In Reports, open Acquisition, then Traffic acquisition, and pick the new group as the dimension.
(www\.)?(chatgpt\.com|chatgpt|chat\.openai\.com|perplexity\.ai|perplexity|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|copilot\.com|chat\.deepseek\.com|meta\.ai|grok\.com|chat\.mistral\.ai|you\.com|phind\.com|poe\.com)

The order matters because Google Analytics puts each visit in the first channel it matches. Custom channel groups also apply to past data, so the new channel shows history straight away (per Google's custom channel groups guide, read in November 2026). That guide's own AI example starts with ^.*ai|, which matches any source containing "ai", such as mail.yahoo.com, so a list of exact sources is safer.

What AI referral traffic leaves out

Only visits that pass a referrer or a utm_source tag can be counted. An AI app that sends neither shows up as Direct, and clicks from Google's AI Overviews and AI Mode arrive from Google, in Organic Search. Read the AI assistants line as a minimum. To see the questions people ask AI and whether AI answers cite you, use AI search tracking.

Google's official server or a hosted Google Analytics MCP

Google publishes its own Google Analytics MCP server, open source and labelled experimental. It runs on your machine with Python 3.10 or higher, a Google Cloud project with the Analytics Admin and Data APIs turned on, and Google Application Default Credentials.

Pick Google's server when you need any Google Analytics report: realtime visitors, funnels, your custom dimensions and metrics, or account settings. Pick SEO Skill when your questions are about search, because it sets sessions beside Search Console clicks and finds the property for you, from one URL and a Google sign-in. They can sit in the same client. The comparison with Google's Google Analytics MCP server covers setup and tools line by line.

What this Google Analytics MCP does not read

It reads a fixed set of search reports, not any Google Analytics report you can build. There is no realtime data, ecommerce revenue, funnel or custom dimension, and it cannot change a setting. Landing pages cover Organic Search only.

Clicky and Simple Analytics work in the hosted server too. Fathom, Plausible and other tools work in the CLI on your own machine through a small provider package, and the analytics docs show how.