MCP directory
ST

SEO Tools: Google Analytics 4

by github.com/antohins · v1.8.0 · updated Aug 25, 2026

Google Analytics 4: reports, traffic sources, landing pages, events, realtime (read-only).

npm

Run it locally

Install the package and point your AI client at it.

Environment variables

  • GOOGLE_CLIENT_ID

    Google OAuth client ID (Desktop app), shared with the gsc server.

  • GOOGLE_CLIENT_SECRETsecret

    Google OAuth client secret.

  • GA4_REFRESH_TOKENsecret

    OAuth refresh token (obtained via ga4_oauth_start / ga4_oauth_finish).

  • GA4_SA_JSON

    Path to a service-account JSON key (alternative to OAuth).

  • GA4_PROPERTY_ID

    Default GA4 property id (numeric, e.g. 123456789).

  • GA4_OAUTH_PORT

    Loopback port for the OAuth flow (default 8586).

More from github.com/antohins

More MCP servers