How to connect Codex to Google Analytics

Sign in to Google once in Ryze AI, add one MCP URL to OpenAI Codex, then ask for GA4 reports, AI-assistant traffic and property settings from your terminal or editor.

Your MCP URL
https://connector.get-ryze.ai/mcp

Copies the link. In a terminal run codex mcp add ryze --url with it. See the steps

See pricing

By Ira Bodnar, Ryze AI · Updated · Connector tested November 14, 2026

Quick answer

The main way to connect Codex to Google Analytics is the Ryze AI connector. Connect Google Analytics 4 on its card in Ryze AI, then run codex mcp add ryze --url https://connector.get-ryze.ai/mcp followed by codex mcp login ryze. One entry serves the Codex CLI, the ChatGPT desktop app and the IDE extension, you create no Google Cloud project, and all 9 Google Analytics 4 tools only read data.

  1. In Ryze AI open Integrations, click Connect on Google Analytics 4 and sign in to Google with every permission checked
  2. Pick the Property for the workspace and click Save
  3. In Codex run codex mcp add ryze --url https://connector.get-ryze.ai/mcp
  4. Run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection

Codex to Google Analytics at a glance

FactDetail
Main way to connectThe Ryze AI connector, a hosted MCP server that Codex reaches as a Streamable HTTP address
Server addresshttps://connector.get-ryze.ai/mcp
Commands in Codexcodex mcp add ryze --url https://connector.get-ryze.ai/mcp, then codex mcp login ryze for the browser sign-in
Google sign-inGoogle OAuth with the read-only analytics.readonly scope, on a login that holds at least the Viewer role on a GA4 property. No Google Cloud project and no API key
Google Analytics 4 tools9, all of them read tools: 4 for AI-assistant traffic, 3 for reports, 1 for property settings and 1 for listing properties
Can it change GA4No. The connector has no write tool for Google Analytics 4, so it cannot create or edit properties, key events or audiences
Other data in the same chatAny other platform connected in the same Ryze AI workspace is reachable through the same ryze entry
Codex surfacesCLI, ChatGPT desktop app and IDE extension, all reading one config.toml. Free and Go plans get the desktop app only, subject to rollout
Ryze AI pricePaid Ads is $89 per month with a 7-day free trial. Adding the connector is free; the Google Analytics 4 tools need an active plan or trial
Google's own route for CodexGoogle's analytics-mcp server runs on your computer and needs a Google Cloud project. Google's pages do not name Codex as a client for it
Last testedNovember 14, 2026: 8 Google Analytics 4 calls through the connector, from Claude Code. Nothing was run inside Codex

Before you start

  • An OpenAI plan that includes Codex. OpenAI lists Codex in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. Its pricing page shows Free and Go with Codex in the desktop app only, subject to rollout, so on those plans use the desktop app steps. Plus and higher add the CLI and the IDE extension. Codex also runs with an OpenAI API key in the CLI, SDK or IDE extension, billed at API pricing. OpenAI's MCP page sets no plan condition for adding a server.
  • A Google login with access to a GA4 property. The login needs at least the Viewer role on the property. Only Google Analytics 4 properties work; Universal Analytics properties do not. A role that carries the No Revenue Metrics or No Cost Metrics restriction will not return those metrics through any connector.
  • A Ryze AI workspace on a plan or free trial. Paid Ads is $89 per month with a 7-day free trial; SEO Starter is $129 per month with a 3-day free trial and Agency is $279 per month. Adding the connector is free, but the Google Analytics 4 tools need an active plan or trial.

How to connect Codex to Google Analytics with the CLI

Two steps happen in Ryze AI, three in Codex. The server URL is the same for every user.

  1. Connect Google Analytics 4 in Ryze AI

    Create a Ryze AI account or sign in, open Integrations in the left sidebar and find Google Analytics 4 under Analytics. Click Connect, sign in to Google and approve access, keeping every requested permission checked.

  2. Pick the property

    Back in Ryze AI, pick the Property for this workspace (listed as account and property) and click Save. Until a Property is saved the card shows Require setup.

  3. Add the Ryze AI server to Codex

    Run codex mcp add ryze --url https://connector.get-ryze.ai/mcp. In the ChatGPT desktop app or the IDE extension, use the MCP servers settings instead (see the sections below). All three share one MCP configuration.

  4. Sign in and allow the connection

    Run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection. Without a local browser, add --no-browser, open the printed URL and paste the full redirect URL back into the terminal. Inside a running CLI session, /mcp login ryze starts the same sign-in.

  5. Check the server and ask your first question

    Run codex mcp list, or type /mcp inside the Codex TUI, to see the ryze server. If the connector was added before Google Analytics 4 was connected, remove and re-add it, then start a new session. Then ask: List the GA4 properties this login can read.

codex mcp add ryze --url https://connector.get-ryze.ai/mcpcodex mcp login ryze

From a terminal this is the shortest route. codex mcp add writes the ryze entry into ~/.codex/config.toml, and codex mcp login opens the Ryze AI sign-in in your browser. Check the result with codex mcp list, or with /mcp inside the codex TUI. Your Google sign-in stays with Ryze AI; Codex holds only its own Ryze AI sign-in.

The Ryze AI help article for Google Analytics 4 covers the Google side of the connection, and the Ryze AI agent API help page covers API keys.

Sources: OpenAI Codex MCP docs, Codex CLI command reference, Ryze AI Google Analytics guide. Checked November 14, 2026.

ChatGPT desktop app and IDE extension

The ChatGPT desktop app and the IDE extension read the same MCP configuration as the CLI, so a server added in one place appears in the other two. Both use a short form in place of commands, followed by a restart.

ChatGPT desktop app (Codex)

  1. Open Settings, then select MCP servers.
  2. Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
  3. Save, then select Restart.
  4. Select Authenticate next to ryze and complete the Ryze AI sign-in. Type /mcp in the composer to view connected servers.

Codex IDE extension

  1. Open the gear menu, then select MCP servers.
  2. Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
  3. Save, then select Restart extension.
  4. Select Authenticate and complete the Ryze AI sign-in.

config.toml

To keep the server in a file, edit ~/.codex/config.toml, or a project .codex/config.toml in a trusted project. OAuth is the default for an HTTP server; run codex mcp login ryze to sign in. A GA4 report can be long, so the example raises the per-call timeout and sets an output budget for the report tool.

[mcp_servers.ryze] url = "https://connector.get-ryze.ai/mcp" # Optional: raise the defaults (10 and 60 seconds) startup_timeout_sec = 20 tool_timeout_sec = 120 [mcp_servers.ryze.tools.google_analytics__runRawReport] output_token_limit = 20000

For a Ryze AI API key instead of OAuth, add bearer_token_env_var = "RYZE_API_KEY" to the same table and set that environment variable to your rk_live_ key. Adding --bearer-token-env-var RYZE_API_KEY to codex mcp add writes the same setting from the command line. Do not paste the key into the file.

Codex Cloud tasks are left out on purpose. The one cloud remark on OpenAI's MCP page is that local servers and transports may be missing there, and the Codex Cloud page says nothing about MCP, so this guide makes no claim that the connector works in a cloud task. The steps inside Codex were also not run end to end for this guide.

What OpenAI documents about MCP in Codex

TopicWhat OpenAI's documentation says
Where servers are addedcodex mcp add in a shell, Settings > MCP servers in the desktop app, the gear menu > MCP servers in the IDE extension, or a [mcp_servers.<name>] table in config.toml
Shared byCodex CLI, the ChatGPT desktop app and the Codex IDE extension. OpenAI calls them the local Codex clients; one setup serves all three
Config files~/.codex/config.toml for you. A project .codex/config.toml loads only after you trust the project
TransportsSTDIO, a local process started by a command, and Streamable HTTP, a server at an address. The MCP page names no third one
Sign-in to a remote serverOAuth by default, through Client ID Metadata Documents or dynamic client registration. A bearer token read from an environment variable and custom headers are the other options
Tool approvaldefault_tools_approval_mode per server: auto, prompt, writes or approve. tools.<tool>.approval_mode overrides one tool. enabled_tools and disabled_tools work as allow and deny lists
Timeouts and output10 seconds to start a server and 60 seconds per tool call by default, both adjustable per server. tools.<tool>.output_token_limit sets a per-tool output budget
Admin controlAn approved mcp_servers list in requirements.toml, matched on the server name and, for a remote server, its URL. An empty list turns off every MCP server
PlanThe MCP page names no plan for adding a server. The CLI and the IDE extension come with Plus and higher or an API key; Free and Go have the desktop app only, subject to rollout

Sources: OpenAI Codex MCP docs, Codex CLI command reference, Codex pricing, Codex managed configuration. Checked November 14, 2026.

Claude, ChatGPT and Cursor

The same URL works in other MCP clients. Google Analytics 4 is connected once in Ryze AI, so nothing changes on the Google side.

Claude

Open Customize, then Connectors, click Add, choose Add custom connector and enter https://connector.get-ryze.ai/mcp. Click Connect, sign in on the Ryze AI page, choose the workspaces and click Allow connection. Anthropic lists custom connectors on Free, Pro, Max, Ultra, Team and Enterprise, with one custom connector on Free.

ChatGPT

OpenAI says full custom MCP support is for ChatGPT Business and Enterprise/Edu on the web, and Pro can connect custom MCP servers with read and fetch permissions only. On the web, open Plugins, select the plus button, then Add custom MCP server, enter the URL and select Create as a plugin. ChatGPT on the web does not read your local Codex configuration.

Cursor

Add the server to .cursor/mcp.json with the same URL, then sign in on the Ryze AI page when Cursor asks.

{ "mcpServers": { "ryze": { "url": "https://connector.get-ryze.ai/mcp" } } }

Source for the ChatGPT steps: OpenAI's page on connecting a server to ChatGPT. Checked November 14, 2026.

Google access and scopes

Three things decide what Codex can read in Google Analytics 4.

Which Google login
Ryze AI holds the Google sign-in you approved, with the read-only analytics.readonly scope. The login needs at least the Viewer role on a GA4 property. You do not create a Google Cloud project, an OAuth client, a service account or an API key.
Which property
The tools take a property ID, and no property is selected for you inside them. A request for the list of accounts and properties returns the IDs the login can read, and you can name a property in the prompt. You pick a Property for the workspace after connecting.
More than one login
Several Google logins can be connected to one workspace with Add one more account, each with its own Property. One is the primary (set with the star) and the agent uses it by default. The help center advises one workspace per business and a separate workspace for each client, and one Claude or ChatGPT connection can cover up to 20 workspaces.

The scopes and roles behind each request

Ryze AI reaches Google Analytics 4 with the Google login you approved, so the scopes and the role on that login bound what Codex can read. Google's own server asks for the same minimum role. Role restrictions are enforced in the API as well as in the Analytics interface.

Scope or roleWhat it covers, per GoogleIn the Ryze AI connection
analytics.readonlyGoogle describes it as seeing and downloading your Google Analytics data, under both the Data API and the Admin API. runReport accepts itRequested. It is the only Google Analytics scope Ryze AI asks for
openid, email, profileGoogle's basic sign-in scopes: associating you with your personal info, your primary account email and your personal infoRequested, as basic profile scopes next to the Analytics scope
Viewer roleCan see settings and data, can change which data appears in reports, and can see shared assets through the interface or the APIsThe minimum role the login needs on the property
No Revenue Metrics and No Cost MetricsRole restrictions that hide revenue or cost metrics, also enforced in API callsA login with one of them will not return those metrics through the connector
analytics.editEdit Google Analytics management entitiesNot requested, so nothing can be created or changed in GA4
analytics.chatbot.readThe scope for the Ask Advisor chat method, which Google added to the v1alpha Data API on September 14, 2026Not requested; the connector has no Ask Advisor tool
Marketer and Editor rolesMarketer can create, edit and delete audiences, events and key events; Editor has full control of property settingsNot needed and not used

Not part of the connection: any write scope, Universal Analytics properties, and Ask Advisor. GA4 reports visits that arrive from AI assistants; it does not measure whether an assistant mentions your brand.

Sources: Google's OAuth scope list, Analytics roles and restrictions, MCP server docs and the Ryze AI Google Analytics guide. Checked November 14, 2026.

Removing access

To remove access, disconnect Google Analytics 4 under Integrations in Ryze AI. On the Codex side, codex mcp logout ryze deletes the stored sign-in and codex mcp remove ryze deletes the entry. To pause the server and keep its settings, set enabled = false in the [mcp_servers.ryze] table.

What Codex can do in Google Analytics

The Ryze AI connector exposes 9 Google Analytics 4 tools, all of them read tools. Codex calls them by these names through the ryze server.

ToolTypeWhat it does
google_analytics__listAccountSummariesReadLists the GA4 accounts and properties the connected Google login can access, so you can find property IDs.
google_analytics__runRawReportReadRuns a Data API report with chosen dimensions, metrics, named date ranges, filters and ordering, and pages through the results.
google_analytics__runPivotReportReadRuns a Data API pivot-table report.
google_analytics__runRealtimeReportReadRuns a realtime report covering the last 30 minutes.
google_analytics__runAdminReadReadReads an Admin API resource such as key events, custom dimensions or audiences. It is GET only and cannot write.
google_analytics__getAiTrafficByEngineReadReturns traffic from AI referrers grouped by source engine and compared with a prior period.
google_analytics__getAiTrafficDailyReadReturns daily traffic from AI referrers such as ChatGPT and Perplexity.
google_analytics__getAiLandingPagesReadLists the top landing pages that receive AI-referred traffic, up to 200 rows.
google_analytics__getAIReferralsReadLists AI referral sources with their sessions and conversions.

Every tool takes a workspace and an optional connection_id for a specific connected Google login. Revenue shows as zero unless ecommerce tracking and purchase events are set up in GA4, and GA4 and Shopify numbers will not match exactly because they attribute sessions and conversions differently. The tools need an active Ryze AI plan or free trial; without one, the connector can only list workspaces and connect platforms.

Approvals in Codex

Because all 9 Google Analytics 4 tools read, the connector does not change anything in GA4. Codex still lets you set approvals per server. In config.toml, default_tools_approval_mode can be auto, prompt, writes or approve; prompt asks before each call, and writes asks for tools not marked read-only. Per-tool overrides use tools.<tool>.approval_mode. The same ryze entry also carries the tools of other platforms connected in your workspace, so an enabled_tools list keeps Codex to the GA4 names if that is all it should use. The Ryze AI chat itself starts on Skip all approvals; pick Approve write & delete or Manual approve in its Tool approvals picker if you use it too. Scheduled tasks in Ryze AI run without an approval step.

[mcp_servers.ryze] url = "https://connector.get-ryze.ai/mcp" default_tools_approval_mode = "prompt" enabled_tools = [ "google_analytics__listAccountSummaries", "google_analytics__runRawReport", "google_analytics__getAiTrafficByEngine", ]

Google Analytics and Codex limits in numbers

LimitFigures
Daily tokens per property200,000 on a standard property, 2,000,000 on Analytics 360. Daily quotas refresh at midnight Pacific time
Hourly tokens40,000 per property per hour on standard, and 14,000 per Google Cloud project per property per hour. Analytics 360 has 400,000 and 140,000
Concurrent requests10 per property on standard, 50 on Analytics 360
Cost of one requestGoogle says most requests charge 10 tokens or fewer. More rows, dimensions and metrics, complex filters, long date ranges and high-cardinality dimensions such as pagePath raise it. A one-day, one-metric test report cost 1 token
When quota runs outA 429 RESOURCE_EXHAUSTED error for that property. Hourly quotas refresh within an hour
Rows per report10,000 when unspecified and at most 250,000 per request. Larger results are paged with offset
Dimensions in one report9, per Google's report guide. The API answered a 10-dimension request with a 400 in the November 14 test
Metrics and date ranges in one reportThe API answered an 11-metric request with a limit of 10 metrics and a 5-range request with a limit of 4 dateRanges, in the November 14 test. Google's pages do not print those two caps
Realtime windowFrom now back 30 minutes on a standard property, 60 on Analytics 360. Realtime has its own quota with the same figures as core
Demographic dimensions120 potentially thresholded requests per property per hour, for dimensions such as userAgeBracket and audienceName
Admin API1,200 requests per minute and 600 per minute per user. The write quotas do not apply, because the connector only reads
Data delayStandard properties: intraday data typically 2 to 6 hours, daily data 12 hours, and processing can take 24 to 48 hours
Codex waiting time and output10 seconds to start a server, 60 seconds per tool call. output_token_limit budgets one tool's output, before a 20% serialization allowance

Google counts tokens per property, so every user and every tool that reads the same property draws from the same 200,000 a day. Ask for narrow date ranges and few dimensions when you run many reports.

Sources: Data API quotas, runReport reference, report guide, realtime guide, Admin API quotas, data freshness, OpenAI Codex MCP docs. Checked November 14, 2026.

First 3 prompts to run

Each answer comes from your own property, so this page describes what comes back instead of showing sample numbers.

1. Find the property

List every GA4 account and property this Google login can read, with the property IDs.

Tools used: google_analytics__listAccountSummaries

What comes back: Accounts, each with its properties, and for every property its name, type, parent and whether the login can edit it. Use the property ID it returns in later prompts. It ran in the November 14 test.

2. Channels, month over month

For property <ID>, give sessions, key events and revenue by default channel group for last month against the month before. Name the two date ranges.

Tools used: google_analytics__runRawReport

What comes back: One table with a row per channel and a column for each named range. Naming both ranges lets the report keep the periods apart. Revenue reads zero when purchase events are not set up in GA4.

3. Visits from AI assistants

Which AI assistants sent visits to property <ID> in the last 30 days, compared with the 30 days before, and which landing pages did they reach?

Tools used: google_analytics__getAiTrafficByEngine, google_analytics__getAiLandingPages

What comes back: Traffic per source engine against the prior period, then up to 200 landing pages that received AI-referred visits. GA4 reports the visits; it does not say whether an assistant mentions your brand.

These tools only read. Asking Codex to create a key event or an audience will fail, because the connector has no GA4 write tool and requests only analytics.readonly.

10 jobs to hand to Codex

Ten jobs you can give Codex, with the Ryze AI tool behind each one. The last column says whether the default connection covers it. Only the first and the second ran in the test; the rest follow the tool definitions and the facts file.

JobWhat to ask CodexToolDefault connection
Property inventoryList every GA4 property this login can read, with IDs.google_analytics__listAccountSummariesCovered. Ran in the test
Channel comparisonSessions, key events and revenue by default channel group, last month against the month before.google_analytics__runRawReportCovered. A report call ran in the test, within 4 date ranges, 9 dimensions and 10 metrics
Landing pagesTop landing pages by sessions with engagement rate and key event rate for the last 28 days.google_analytics__runRawReportCovered
Revenue by sourcePurchase revenue and purchases by source and medium.google_analytics__runRawReportCovered when ecommerce events exist in GA4 and the role has no No Revenue Metrics restriction
Device splitA pivot of sessions by channel across device categories.google_analytics__runPivotReportCovered
Right nowWho is on the site right now, by country and device, for the last 30 minutes.google_analytics__runRealtimeReportCovered
Tracking setup reviewList the key events, custom dimensions and audiences set up in the property.google_analytics__runAdminReadCovered; read only
AI enginesWhich AI assistants sent visits in the last 30 days, against the 30 days before.google_analytics__getAiTrafficByEngineCovered
AI traffic trendA daily trend of visits from AI assistants such as ChatGPT and Perplexity.google_analytics__getAiTrafficDailyCovered
AI landing pages and sourcesThe landing pages that receive AI-referred visits, and each AI referral source with sessions and conversions.google_analytics__getAiLandingPages, google_analytics__getAIReferralsCovered

6 ways to connect Codex to Google Analytics

Six routes lead from Codex to Google Analytics. Composio, Zapier and Google's agent skills name Codex themselves. Google's two analytics-mcp routes do not name it; Codex runs any STDIO or Streamable HTTP server, so that reading rests on two documents and no tested setup. The Ryze AI connector is the main way here: one codex mcp add command covers all three Codex surfaces and needs no Google Cloud project. The pages for the other five were read on November 14, 2026.

WayWhere it runsSetup in CodexWhat it reaches in GA4Price
Ryze AI connector (the main way)Hosted by Ryze AI, with one address for every usercodex mcp add ryze --url https://connector.get-ryze.ai/mcp and codex mcp login ryze, or Add server in the desktop app or IDE extension. One entry serves all three9 read tools: Data API reports, pivot and realtime reports, Admin API reads, and 4 AI-traffic tools. Sign-in is Google OAuth with analytics.readonlyPaid Ads is $89 per month with a 7-day free trial
Google analytics-mcp, local (Google's route)On your computer, started by Codex as a local command. Open source from Google, version 1.1.0 on November 6, 2026Add a STDIO server: codex mcp add analytics-mcp with --env GOOGLE_APPLICATION_CREDENTIALS and --env GOOGLE_CLOUD_PROJECT, then -- pipx run analytics-mcp. Needs Python 3.10 or higher, pipx or uv, a Google Cloud project with the Analytics Admin and Data APIs enabled, and gcloud sign-inGoogle's docs list 9 read tools, such as run_report, run_realtime_report, run_funnel_report and list_google_ads_links. The README lists 13, with 3 write tools that stay off unless you start it with --allow-write and give it the analytics.edit scopeNo price stated. Apache-2.0 licence
Google analytics-mcp, self-hosted HTTP modeOn infrastructure you run, since version 1.0.0 on November 3, 2026. The README documents Docker and Cloud RunStart it with --transport http and --oauth, then add its address with codex mcp add <name> --url <address>. You create the Google OAuth web client yourself. Google names no chat client for this mode, so whether Codex completes the sign-in is not statedSame tools as the local server. The built-in OAuth provider keeps its registrations and refresh tokens in memory, so a restart means signing in againNo price stated. You pay for the hosting
ComposioHosted by ComposioAdd https://connect.composio.dev/mcp as a Streamable HTTP server and sign in to Composio. Composio's Google Analytics page links a Codex setup guide, and its managed Google OAuth app handles the Google sign-in82 tools on its Google Analytics page, read and write, including Create Audience and Archive Custom DimensionFree is $0 with 10,000 tool calls a month for up to 3 members. Standard is $18 per seat per month
Zapier MCPHosted by ZapierAdd your Zapier MCP server to Codex and sign in. Zapier lists Codex among its popular MCP clients6 Google Analytics 4 actions, read and write: Run Report for a Property, Find Conversion, Create Conversion Event, Create Measurement, Send Measurement Events and API RequestOne tool call uses 2 tasks from your Zapier plan. Free is 100 tasks a month; Professional starts at $19.99 a month
Google AI agent skillsInstruction files in your project directorynpx skills add google/skills/skills/analytics --agent=codex. Needs Node.jsNo data connection of its own. Two skills that guide Codex when it writes code against the Data API and Admin API; Google suggests installing the MCP server next to themNo price stated

Options that do not fit Codex

  • Google's hosted Data API endpoint. A Markdown copy of Google's reference lists https://analyticsdata.googleapis.com/mcp/v1 with 4 read tools. The HTML reference page returned 404 on November 14, 2026, and Google Cloud's list of remote MCP servers does not list Google Analytics. Connecting would need your own Google credentials. Treat it as unannounced; no setup is given here.
  • Windsor.ai and Coupler.io. Their Google Analytics pages name Claude, ChatGPT, Gemini, Perplexity, Cursor, Copilot and others, and neither names Codex. Coupler.io's custom MCP option takes a bearer token, which Codex can send, but that fit is a reading of two documents and was not run. Coupler.io answers from a synced copy of the data, not from GA4 itself.
  • surendranb/google-analytics-mcp. An open source local server with 8 read tools. Its README names Claude Code, Cursor, Antigravity and VS Code extensions, not Codex.
  • Ask Advisor chat method. It is a v1alpha Data API call for your own code, with its own scope, not a connector you add to Codex.

Which one to pick

Ryze AI is the best way to connect Codex to Google Analytics when you want reports with no Google Cloud project, with one caveat: it needs a Ryze AI plan or trial and your GA4 data passes through Ryze AI. Choose Google's analytics-mcp when you need its run_funnel_report or list_property_annotations, or want the data to stay between your machine and Google, and accept the Cloud project and the local Python setup. Composio fits a team that already routes other apps through it and wants write actions. Zapier suits event sending and a few fixed actions. Google's agent skills add guidance for Codex, and pair with whichever data route you pick.

Sources: Google Analytics MCP server docs, analytics-mcp README, analytics-mcp releases, Google AI agent skills, Composio Google Analytics toolkit, Composio pricing, Zapier Google Analytics 4 MCP, Zapier MCP quickstart, Zapier pricing, Codex plugins, OpenAI Codex MCP docs, Ryze AI Google Analytics integration. Checked November 14, 2026.

Sources for the options that do not fit: Google Data API MCP reference (Markdown copy), Google Cloud remote MCP servers, Windsor.ai, Coupler.io, surendranb/google-analytics-mcp, Ask Advisor chat method. Checked November 14, 2026.

Codex, Google Analytics and MCP: dates that matter

DateWhat happened
May 6, 2024The Data API introduced key event dimensions and metrics. conversions became a deprecated metric name and keyEvents replaced it.
October 3, 2025Codex CLI 0.44.0 added support for Streamable HTTP MCP servers, the transport the Ryze AI connector uses.
October 6, 2025Codex CLI 0.45.0 brought experimental OAuth sign-in for MCP servers.
July 9, 2026Codex became part of the ChatGPT desktop app on macOS and Windows.
October 7, 2026Codex CLI 0.161.0 added /mcp login <name> for signing in from a running session.
October 22, 2026analytics-mcp 0.8.0, Google's server, gained its first write tool, the --allow-write flag and MCP tool annotations.
November 3, 2026analytics-mcp 1.0.0 added a multi-tenant Streamable HTTP transport and OAuth 2.1 support, and its release note says the server graduated from experimental.
November 6, 2026analytics-mcp 1.1.0 added Dockerfile and Cloud Run docs and opt-in Admin API write tools. It was the newest version on November 14.
November 10, 2026Google's docs page for its Analytics MCP server was last updated. It lists Antigravity, Claude Desktop, Claude Code and Cursor, and says Gemini CLI is deprecated.
November 13, 2026Codex CLI 0.169.0 came out. It keeps project configuration and MCP servers off in untrusted directories for codex exec.

Sources: Codex changelog, Codex CLI 0.44.0, 0.45.0 release notes, Data API changelog, analytics-mcp releases, Google MCP server docs. Checked November 14, 2026.

How this guide was tested

The Ryze AI connector's Google Analytics 4 tools were tested on November 14, 2026, from Claude Code, against a standard property in a Ryze AI test workspace. The run made 8 Google Analytics 4 calls, all read-only. No account name, property ID or metric value is shown here.

What was runWhat came back
Loaded the definitions of all 9 tools by exact nameEvery name in the tools table returned a definition. None contains a write verb.
listAccountSummariesWorked. It returned accounts with their properties, each with a property, display name, property type, parent and canEdit field.
runRawReport, 1 day and 1 metric (sessions), with the property quota requestedWorked. One row came back with the metric headers, a row count, the property currency and time zone, and a quota block whose totals equal Google's standard-property limits. The request cost 1 token.
runRawReport with a dimension that does not existRefused with 400 INVALID_ARGUMENT and a did-you-mean hint. No data returned.
runRawReport with a metric that does not existRefused with 400 INVALID_ARGUMENT and a did-you-mean hint. No data returned.
runRawReport with a property ID that does not existRefused with status not_allowed and Google's permission message. No data returned.
runRawReport with 10 dimensions, with 11 metrics and with 5 date rangesEach refused with 400 INVALID_ARGUMENT. The messages are in the errors table below.

Not run: runPivotReport, runRealtimeReport, runAdminRead and the 4 AI-traffic tools, because they would return business data from a real account. Their definitions loaded and match the facts. Nothing was run inside Codex: no codex mcp add, no codex mcp login and no tool call from the CLI, the ChatGPT desktop app or the IDE extension. Those steps follow OpenAI's Codex documentation as read on November 14, 2026. No call was made to Google's own server or hosted endpoints, and the routes in the comparison are described from their pages.

Codex and Google Analytics errors and fixes

Did you mean manualSource? Field trafficSauce is not a valid dimension.
400 INVALID_ARGUMENT. The dimension name does not exist in the Data API. Ask again with a real name such as sessionSource, or let Codex read the suggestion from the message. Google lists valid names on its API schema page.
Did you mean sessions? Field sessionz is not a valid metric.
400 INVALID_ARGUMENT. The metric name does not exist. Use the suggested name. conversions is a deprecated name; the current one is keyEvents.
User does not have sufficient permissions for this property.
Returned with status not_allowed. The property ID does not exist, or the connected Google login has no role on it, and Google gives the same answer in both cases. Ask for listAccountSummaries to get the IDs the login can read, or ask a property admin for the Viewer role.
Requests are limited to 9 dimensions within a nested request.
400 INVALID_ARGUMENT for a request with 10 dimensions. Ask for fewer breakdowns, or split the question into two reports.
Requests are limited to 10 metrics within a nested request.
400 INVALID_ARGUMENT for a request with 11 metrics. Ask for 10 or fewer, or have Codex run two reports and join them.
Requests are limited to 4 dateRanges.
400 INVALID_ARGUMENT for a request with 5 ranges. Compare up to 4 periods per report, or break one longer range down by a date dimension.
429 RESOURCE_EXHAUSTED
A quota bucket for the property reached 0. Google's page lists it as the answer when quota runs out. It was not triggered in the test. Wait for the hourly or daily refresh, or ask for fewer rows and shorter ranges.
GA4 tools do not appear in Codex
If the connector was added before Google Analytics 4 was connected in Ryze AI, remove the ryze server, add it again, sign in and start a new session.
Revenue shows as zero
Ecommerce tracking and purchase events are not set up in GA4, or the login's role has the No Revenue Metrics restriction.
codex mcp login opens no browser
Run codex mcp login ryze --no-browser, open the printed URL on another device and paste the full redirect URL back into the terminal.
The server times out on start or on a call
Codex waits 10 seconds to start a server and 60 seconds per tool call by default. Raise startup_timeout_sec or tool_timeout_sec in the [mcp_servers.ryze] table.
Output is cut off
Set tools.google_analytics__runRawReport.output_token_limit in config.toml, or ask for fewer columns and rows.
The ryze table in a project config.toml is ignored
Codex reads a project's .codex/config.toml only in a trusted project, and since CLI 0.169.0 codex exec keeps project MCP servers off in an untrusted directory. Trust the project, or move the table to ~/.codex/config.toml.
A tool replies that a subscription is required
The Google Analytics 4 tools need an active Ryze AI plan or free trial. Start the trial, then retry.
No CLI or IDE extension on a Free or Go plan
OpenAI lists Codex on those plans in the desktop app only, subject to rollout. Use the desktop app steps.

Sources: Data API error codes, Data API quotas, OpenAI Codex MCP docs, Codex changelog. Checked November 14, 2026.

Terms on this page

MCP
The Model Context Protocol, which Codex uses to call tools on outside servers such as the Ryze AI connector.
Streamable HTTP
The transport Codex uses for a server it reaches at an address. Its other transport, STDIO, starts a local process.
Property and property ID
The unit of Google Analytics that reports are made for. Every Data API request names a numeric property ID, shown under Admin, Property settings, and the property must be GA4, not Universal Analytics.
Key event
Google's name for an event that measures an action important to your business, formerly called a conversion. The API metric is keyEvents.
Dimension and metric
A metric is a measurement such as active users or event count. A dimension breaks metrics down, by country or event name for example.
Default channel group
Google's fixed grouping of traffic sources, in the API the dimension sessionDefaultChannelGroup, with values such as Direct, Organic Search, Paid Search and Referral.
Token (Data API quota)
The unit Google charges per report request. A standard property has 200,000 a day and 40,000 an hour, and most requests cost 10 or fewer.

Sources: OpenAI Codex MCP docs, Google property ID guide, key events help, channel groups help, runReport reference, Data API quotas. Checked November 14, 2026.

Frequently asked questions

How do I connect Codex to Google Analytics?

Connect Google Analytics 4 on its card in Ryze AI and save a Property. Then run codex mcp add ryze --url https://connector.get-ryze.ai/mcp, run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection.

Does Google Analytics have an MCP server?

Yes. Google publishes the open source analytics-mcp server, which runs on your computer and calls the Analytics Admin API and Data API. It needs a Google Cloud project with both APIs enabled, and version 1.1.0 came out on November 6, 2026. Google's pages name Antigravity, Claude Desktop, Claude Code, Cursor and the Gemini tools as clients, and do not name Codex.

What is the Google Analytics MCP URL for Codex?

With Ryze AI it is https://connector.get-ryze.ai/mcp. Google's analytics-mcp server runs as a local command and has no address unless you host it yourself. Google also has a hosted Data API address whose reference page returned 404 on November 14, 2026, so this guide does not recommend it.

Can I use Google's own analytics-mcp server in Codex?

Probably, because Codex runs STDIO servers: codex mcp add analytics-mcp with the two environment variables, then -- pipx run analytics-mcp. Google does not name Codex as a client, and this setup was not run for this guide. You also need a Google Cloud project and Application Default Credentials.

Can Codex change my Google Analytics settings?

No, not through the Ryze AI connector. All 9 Google Analytics 4 tools read, the connection requests analytics.readonly, and runAdminRead is GET only. Google's own analytics-mcp has opt-in write tools behind --allow-write.

Which Codex plan do I need?

OpenAI lists Codex in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. Free and Go get Codex in the desktop app only, subject to rollout. Plus and higher add the CLI and the IDE extension. OpenAI's MCP page names no plan condition for adding a server.

Which Google permission does the login need?

At least the Viewer role on a GA4 property. Ryze AI asks Google for the read-only analytics.readonly scope plus basic profile scopes. Keep every requested permission checked on the Google screen.

Does Codex sign in to Google directly?

Not with the Ryze AI connector. Codex signs in to Ryze AI through OAuth or a Ryze AI API key, and Ryze AI holds the Google sign-in. With Google's analytics-mcp, your own Google credentials are read by the local server.

Can Codex see traffic from ChatGPT and Perplexity?

Yes. Four tools report visits from AI referrers by engine against a prior period, by day, by landing page and by referral source with sessions and conversions. GA4 reports visits that arrive from AI assistants; it does not measure whether an assistant mentions your brand.

Which GA4 limits can stop a Codex report?

A standard property has 200,000 tokens a day, 40,000 an hour and 10 concurrent requests, and a report takes at most 9 dimensions. In the November 14 test the API also refused 11 metrics and 5 date ranges. Past a quota the API returns 429 RESOURCE_EXHAUSTED.

Can I connect more than one GA4 property or Google login?

Yes. Several Google logins can be connected to one workspace, each with its own Property, with one primary. Other properties stay reachable when you name them in the prompt. Keep a separate workspace for each client.

Can I run the Ryze AI connector and another server in Codex at the same time?

Yes. Each server is its own [mcp_servers.<name>] table in config.toml, for example ryze and analytics-mcp, and the CLI, the desktop app and the IDE extension read both. OpenAI advises turning off servers you do not need, because each adds context to your messages.

Does this work in Codex cloud tasks?

This page does not claim it does. OpenAI's MCP page covers the CLI, the desktop app and the IDE extension, its Codex Cloud page does not mention MCP, and the connector was not tested in Codex.

Do I need to configure the CLI, the app and the IDE extension separately?

No. The ChatGPT desktop app, the Codex CLI and the IDE extension share one MCP configuration. Restart the app or the extension after you add the server.

How much does it cost to connect Codex to Google Analytics?

Adding the connector is free, but the Google Analytics 4 tools need an active Ryze AI plan or free trial. Paid Ads is $89 per month with a 7-day free trial, SEO Starter is $129 per month with a 3-day free trial, and Agency is $279 per month. Annual billing takes 30% off the first year. Codex is billed under your OpenAI plan or API pricing.

Connect Google Analytics 4 to Codex

Adding the connector is free; the Google Analytics 4 tools need an active plan or trial. Paid Ads is $89 per month with a 7-day free trial; annual billing takes 30% off the first year.

Need help? Read the Ryze AI Google Analytics guide or email Ryze AI support.