Integration · Codex × Google Analytics
Run Google Analytics inside Codex
NotFair connects Codex to live Google Analytics through the same hosted MCP endpoint used across the product. Properties, Data API reports, realtime, metadata, custom dimensions, and key events.
Connect your Google Analytics account
Authorize once at notfair.co — then open Codex and start asking real questions about your account.
Setup
Connect Codex in three steps
Codex uses NotFair's hosted Streamable HTTP endpoint. NotFair hosts Google OAuth for GA4. You authorize properties without creating a Cloud project for the MCP client.
1. Register NotFair as an MCP server
From any shell where Codex CLI is installed.
codex mcp add NotFair-GoogleAnalytics --url https://notfair.co/api/mcp/notfair2. Authorize Google Analytics
Open /connect/google_analytics on notfair.co, complete the hosted connection, and select the accounts or properties Codex may use.
3. Start a session
Open Codex CLI and ask it to diagnose Google Analytics using live tools.
Capabilities
What Codex can do with NotFair
Read live Google Analytics data
Properties, Data API reports, realtime, metadata, custom dimensions, and key events.
Counted tool surface
12 Google Analytics tools, measured from the production registrar and guarded by a drift test.
Hosted credentials
NotFair hosts Google OAuth for GA4. You authorize properties without creating a Cloud project for the MCP client.
Platform-true writes
Reporting is read-only. createKeyEvent and deleteKeyEvent are inverses. archiveCustomDimension is irreversible and cannot reuse parameterName. Writes wait for approval. runScript never wraps mutations. Google requires both analytics.readonly and analytics.edit for this combined surface. NotFair does not claim Google Ads impact review on GA4.
Example workflows
Prompts that lead to real account work
Channel report
“Run a last-28-days report of sessions and conversions by sessionDefaultChannelGroup.”
A Data API report with sampling caveats.
Realtime check
“Show realtime active users for the selected property.”
runRealtimeReport output for the targeted propertyId.
Key-event preview
“Preview creating a key event. Do not execute until I approve. Explain whether archiveCustomDimension can be undone.”
A staged Admin API write. Archive is labeled irreversible.
Why NotFair for Codex + Google Analytics
The hosted MCP endpoint is the same. The Google Analytics contract is not. NotFair keeps tool counts, OAuth, and write limits honest for this platform.
- 12 Google Analytics tools — not a vendor-wide total reused as a Google Analytics count
- NotFair hosts Google OAuth for GA4. You authorize properties without creating a Cloud project for the MCP client.
- Reporting is read-only. createKeyEvent and deleteKeyEvent are inverses. archiveCustomDimension is irreversible and cannot reuse parameterName. Writes wait for approval. runScript never wraps mutations.
- Same remote endpoint in Claude, Codex, Cursor, Windsurf, Gemini CLI, and OpenClaw
FAQ
Common questions about using OpenAI Codex CLI with Google Ads through NotFair.
Yes. NotFair's hosted MCP endpoint is the same across clients. Codex speaks MCP and can call the same tools. Google publishes googleanalytics/google-analytics-mcp as an experimental local, read-only server.
Key-event create/delete are inverses. Custom-dimension archive cannot be undone. Google Ads impact review is not claimed.
NotFair advertises 12 Google Analytics tools.
Other integrations
Switching clients, or curious how this compares?
ChatGPT + Google Ads
NotFair connects ChatGPT to live Google Analytics through the same hosted MCP endpoint used across the product. Properties, Data API reports, realtime, metadata, custom dimensions, and key events.
Claude Code + Google Ads
NotFair connects Claude Code to live Google Analytics through the same hosted MCP endpoint used across the product. Properties, Data API reports, realtime, metadata, custom dimensions, and key events.
Cursor + Google Ads
NotFair connects Cursor to live Google Analytics through the same hosted MCP endpoint used across the product. Properties, Data API reports, realtime, metadata, custom dimensions, and key events.