SEO Skill

Google Analytics MCP for Codex

Ask Codex which landing pages bring sessions and key events from search, then let it work on those pages in your repo. It reads your Google Analytics on each request.

Get started free
  1. 1

    Add the server, then sign in. The CLI, IDE extension and desktop app share this config:

    codex mcp add seoskill --url https://seoskill.dev/mcp
    codex mcp login seoskill
  2. 2

    Check it with /mcp in Codex, or codex mcp list.

codex mcp login opens the Google sign-in in your browser. Codex keeps the token for later sessions.

Prompts to try in Codex

Ask in plain words and your agent picks the tool. Only visits that pass a referrer or tag count as coming from an AI assistant. An AI app that sends neither shows up as Direct.

The Google Analytics MCP server page has more prompts and a worked example.

  • Sessions dropped but clicks did not. Is our tracking broken?

    Search Console clicks beside sessions from search and from all channels. If clicks held and every channel fell, Codex can search your templates for the Google Analytics tag.

  • Which landing pages from search have the fewest engaged sessions?

    Landing pages from Organic Search with sessions, engaged sessions and key events. Codex can open the weakest ones and look at what visitors see first.

  • Did the redesign we shipped on 2026-10-01 change sessions?

    Sessions and clicks in equal periods before and after that date.

  • Which pages do AI assistants send people to?

    Visits from ChatGPT, Perplexity, Claude, Gemini and Copilot, by source, with the pages they land on.

Check tracking after a release

A release that drops the analytics tag from one template looks like a traffic drop in every dashboard. Ask Codex to compare the days before and after the release. If Search Console clicks held steady while sessions fell, the tag is the first suspect.

Codex has the code open, so it can search for the tag in your layouts and show you which templates lost it.

Name the site once in AGENTS.md

Codex reads AGENTS.md at the root of your repo. Add a line such as "Our site is example.com" and Codex knows which site to ask about without you naming it each time.

You still do not pick a property ID. The server finds the Google Analytics property whose web stream matches the site and names it in the answer.

Google Analytics in other AI clients

The same server and sign-in, with each client's own setup steps.

More data for Codex

One server reads all of these. Add a key or a site and your agent can use it.

Questions about Google Analytics in Codex