Google Analytics MCP Server for any AI client.
NotFair connects your Google Analytics 4 properties to Claude, Codex, Cursor, and any MCP client — 11 tools to explore traffic, conversions, and audience data in plain language.
No credit card required · Read live data, approve every write
MCP endpoint
https://notfair.co/api/mcp/google_analyticsLive tools
11New to MCP? Read the spec at modelcontextprotocol.io.
Tools exposed
11Google Analytics tools your AI client can query
Read tools scoped to the GA4 properties you connect, plus approval-gated configuration management. Every write is proposed in chat and confirmed before it reaches Google.
| Tool | Type | What it does |
|---|---|---|
listProperties | Read | List the GA4 properties the connected Google account can access, grouped by account — each with its numeric resource name (properties/123456789) and display name. |
runReport | Read | The core GA4 Data API reporting primitive: pick dimensions to break down by and metrics to measure over any date range, with filters, ordering, and up to 4 comparison date ranges. |
runRealtimeReport | Read | Events and active users from the present moment back to ~30 minutes ago — what's happening on your site right now. |
getMetadata | Read | Every dimension and metric available for a property — API name, UI name, description, and whether it's a custom definition. The map for building valid reports. |
createCustomDimension | Write | Register an event, user, or item parameter as a reportable custom dimension. Approval-gated; returns the before/after state. |
archiveCustomDimension | Write | Archive a custom dimension (GA4 has no delete). Approval-gated, and flagged loudly as irreversible — an archived dimension cannot be un-archived. |
| and more reporting and audience tools | ||
Connect Google Analytics and try it in Claude
Authorize NotFair to access your GA4 properties, then add the MCP server to Claude. The first prompt to try: “Which traffic sources drove the most conversions in the last 28 days?”
FAQ — Google Analytics MCP Server
Common questions about authenticating, configuring, and using the NotFair Google Analytics MCP server.
It's a remote MCP (Model Context Protocol) server at https://notfair.co/api/mcp/google_analytics that exposes your GA4 properties as a typed tool surface for AI agents. Claude Desktop, Claude.ai Web, Claude Cowork, Claude Code, and Codex can all connect to it and answer questions over live Google Analytics data — traffic sources, conversions, landing pages, and realtime activity.
Claude.ai's Add custom connector flow and Codex both use OAuth 2.0 with PKCE — there's no Client ID or Secret to copy. You authorize NotFair with Google once, pick which GA4 properties to expose, and the connection is scoped to those properties and revocable at any time.
The GA4 properties your Google account can access, Data API reports over any dimensions and metrics (sessions, users, conversions, revenue, traffic sources, pages, and more), realtime reports covering roughly the last 30 minutes, and the dimension/metric metadata for each property. Tokens are encrypted at rest and refreshed server-side.
Reporting is read-only and unrestricted. The only writes are configuration management — creating or archiving custom dimensions and creating or removing key events — and every write is approval-gated: the change is proposed in chat and you confirm before it reaches Google. The AI never touches your tracking code or your data.
Google splits the GA4 API in two: the Data API (reports, realtime, metadata) authorizes on analytics.readonly, while the Admin API writes NotFair exposes — custom dimensions and key events — require analytics.edit, which does not itself cover Data API reads. One grant requests both so reporting and the approval-gated configuration tools work from a single connection.
runRealtimeReport covers the present moment back to about 30 minutes. runReport reflects standard GA4 processing — today's rows are intraday and still changing, and high-cardinality or wide-range reports may be sampled (the response says so when they are). Dates are interpreted in the property's timezone.
From /connect/google_analytics you can revoke access at any time. That removes the stored credential and invalidates the Claude and Codex OAuth tokens issued for the connection. You can also revoke NotFair from your Google account permissions page.
Per-client setup guides
Walkthroughs for each supported client.
Claude × Google Analytics
Set up the NotFair Google Analytics MCP in Claude.
Read setup guideCodex × Google Analytics
Set up the NotFair Google Analytics MCP in Codex.
Read setup guideCursor × Google Analytics
Set up the NotFair Google Analytics MCP in Cursor.
Read setup guideOpenClaw × Google Analytics
Set up the NotFair Google Analytics MCP in OpenClaw.
Read setup guideHermes × Google Analytics
Set up the NotFair Google Analytics MCP in Hermes.
Read setup guide