Codex · Google Analytics
Manage Google Analytics from Codex CLI with the same hosted MCP Claude uses
NotFair is a hosted Google Analytics MCP for OpenAI's Codex CLI. One terminal command registers the server. Codex then reads live GA4 data and stages writes for approval. 12 Google Analytics tools.
12 Google Analytics tools
Turn Codex Into Your Marketing Engine
Bring ads, search, analytics, CRM, and WordPress into your AI client. Explore each integration to see its supported actions.
Choose a platform
Choose your AI client
Install the MCP
codex mcp add NotFair-GoogleAnalytics --url https://notfair.co/api/mcp/notfairSign in and start asking
Audit my Google Analytics account and rank fixes by impact.How it works
From install to an approved GA4 change
Connect GA4
NotFair hosts Google OAuth for GA4. You authorize properties without creating a Cloud project for the MCP client.
Add Codex
From any shell where Codex CLI is installed: `codex mcp add NotFair-GoogleAnalytics --url https://notfair.co/api/mcp/notfair`. Codex walks through OAuth and registers the MCP.
Ask, then approve writes
Codex can inspect Properties, Data API reports, realtime, metadata, custom dimensions, and key events. Writes wait for your confirmation. Google requires both analytics.readonly and analytics.edit for this combined surface. NotFair does not claim Google Ads impact review on GA4.
What the client can do
Reports first. Config writes with honest limits.
Google's experimental GA4 MCP is local and read-only. NotFair adds hosted OAuth plus gated custom-dimension and key-event writes, and it does not claim Google Ads impact review on Analytics.
Data API reports
runReport with sampling and (other)-row caveats. runScript can fan out up to five reports and never wraps mutations.
Realtime and metadata
runRealtimeReport and getMetadata so the client can inspect active users and available dimensions before proposing a config change.
Key events are inverses
createKeyEvent and deleteKeyEvent reverse each other after approval.
Archive is irreversible
archiveCustomDimension cannot be undone, and parameterName cannot be reused. The client must surface that limit.
GA4 tools
12 Google Analytics tools the client can call
The advertised count is measured from registerGoogleAnalyticsTools() and guarded by a drift test. The table below is a representative subset.
| Tool | Type | Description |
|---|---|---|
listProperties | read | Discover accessible GA4 properties grouped by account. |
runReport | read | Run a Data API report with freshness and sampling metadata. |
runRealtimeReport | read | Active users and realtime dimensions for the selected property. |
getMetadata | read | Available dimensions and metrics, including custom definitions. |
createKeyEvent | write | Approval-gated. Inverse of deleteKeyEvent. |
archiveCustomDimension | write | Approval-gated and irreversible. parameterName cannot be reused. |
Full tool surface: /google-analytics-mcp.
Google Analytics + Codex FAQ
Direct answers for operators connecting Google Analytics to OpenAI Codex CLI through NotFair.
Connect Google Analytics at notfair.co, run `codex mcp add NotFair-GoogleAnalytics --url https://notfair.co/api/mcp/notfair`, then ask Codex to inspect live data. Writes stay staged until you approve them.
Same hosted MCP endpoint, different client. Codex CLI calls NotFair using OpenAI's MCP support. Claude's connector and Claude Code call the same server from Anthropic's clients.
Only with explicit approval. 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.
Google publishes googleanalytics/google-analytics-mcp as an experimental local, read-only server.
Related pages
Keep evaluating the same connection.
Google Analytics MCP
Tool surface, endpoint, and 12 Google Analytics tools.
Google Analytics Codex setup guide
One-liner install for OpenAI Codex CLI.
Google Analytics for Claude
Same hosted MCP endpoint on Claude's first-class landing.
Google Analytics for ChatGPT
ChatGPT-style workflows through an MCP-capable OpenAI client.
Google Analytics for Grok Bot
Marketplace install for the same hosted MCP tools.
Compare Google Analytics MCP servers
Sourced benchmark with public verification prompts.
Google Analytics write safety
Reporting is read-only. createKeyEvent and deleteKeyEvent are inverses. archiveCustomDimension is irreversible and cannot reuse parameterName. Writes wait for approval. runScript never wraps mutations.
Connect Google Analytics to Codex
Reporting is read-only. createKeyEvent and deleteKeyEvent are inverses. archiveCustomDimension is irreversible and cannot reuse parameterName. Writes wait for approval. runScript never wraps mutations.