MCP auth bridge for GA4 and Search Console
Provides read-only tools for Google Analytics 4 accounts and properties, historical and realtime reports, and available dimensions and metrics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP auth bridge for GA4 and Search Console
Connect Claude, Cursor, Grok Bot, or any remote MCP client to your Google Analytics 4 and Search Console data.
You deploy your own Cloudflare Worker and Google OAuth client. There is no shared hosted service, and you do not need Google app verification for personal use.
Quick setup
1. Deploy
Easiest: click Deploy to Cloudflare. It creates the KV namespace and asks for:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
You can leave those blank for a minute and set them after Google Cloud is ready.
Or with Wrangler:
npm install
npx wrangler login
npx wrangler kv namespace create OAUTH_KVPut the new namespace id into wrangler.jsonc, then:
npx wrangler secret put GOOGLE_CLIENT_ID
npx wrangler secret put GOOGLE_CLIENT_SECRET
npx wrangler deployOpen your Worker URL. The home page walks through the rest and shows the exact redirect URI to copy.
2. Google Cloud (same project for everything)
Paste the redirect URI from your Worker home page, for example:
https://<your-worker>.workers.dev/callbackAdd these scopes under Data access:
openidhttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/analytics.readonlyhttps://www.googleapis.com/auth/webmasters.readonly
Enable these APIs:
Set the consent screen to In production (audience settings).
Testing mode expires refresh tokens after 7 days. Google may show an “unverified app” warning for these scopes — choose Advanced and continue. That is normal for a private app. Workspace users can use Internal instead.
Put the client id and secret on the Worker if you have not already:
npx wrangler secret put GOOGLE_CLIENT_ID
npx wrangler secret put GOOGLE_CLIENT_SECRETReload /. Both secrets should say Set.
3. Connect an AI client
Copy the MCP URL from the setup page:
https://<your-worker>.workers.dev/mcp
Client | What to do |
Claude | Add a custom connector with that URL |
Cursor | Add a remote MCP / HTTPS server with that URL |
Grok Bot | Add a custom connector → Remote HTTPS → paste the URL → leave Client ID blank |
The first connection opens this Worker’s consent page, then Google. Sign in with an account that can view the GA4 property and Search Console property.
Related MCP server: gsc-mcp-connector
What you get
Read-only tools for:
GA4 accounts and properties
Historical and realtime reports
Available dimensions and metrics
Search Console sites, performance, sitemaps, and URL inspection
Reports come back compact (short heading + table). Errors say the useful thing: API not enabled, no access to the property, bad field name, or dead refresh token.
Local development
npm install
cp .dev.vars.example .dev.varsPut a Google client id and secret in .dev.vars, and add http://localhost:8794/callback as a redirect URI.
npm run devThen open http://localhost:8794.
npm run typecheck
npm run lint
npm testOptional knobs
Leave these blank unless you need them:
HOSTED_DOMAIN— only allow Google accounts on one Workspace domainMCP_RESOURCE— pin tokens to a public MCP URL that differs from the request host
Want this hosted?
Self-hosted only for now.
Notes
Unofficial. Not affiliated with Google.
The MCP URL is public. A caller still needs a bearer token from this Worker, issued only after the consent screen and Google sign-in. Google refresh tokens stay encrypted in KV. The MCP client never receives them.
The home page shows whether the two Google secrets are set. It does not show their values.
Leave the Worker URL private if you do not want other people to start a connection. Set
HOSTED_DOMAINto allow only verified accounts on one Workspace domain.Live Google OAuth and live Analytics/Search Console calls are not covered by the unit tests — confirm with your own account after deploy.
MIT licensed. Brand icons on the setup/auth pages come from theSVG.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for GA4, Google Ads and Search Console. Google OAuth, nothing to install.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Google Search Console, GA4 and PageSpeed MCP server for Claude, ChatGPT and Cursor. Free, hosted.
Hosted MCP server for marketing agencies: connect Google Ads, GA4, Search Console, Meta, LinkedIn and more to Claude or ChatGPT. Pull reports and make changes via OAuth login, no setup.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to read Google Analytics 4 data, deployed as a Cloudflare Worker with service account authentication.2-
- AlicenseNot gradedqualityNot gradedmaintenanceSelf-hosted Google Search Console MCP server deployable to Cloudflare Workers in 15 minutes. Enables querying GSC data (sites, search analytics, URL inspection, sitemaps) via natural language through MCP-capable clients like ChatGPT or Claude.MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server exposing Google Analytics 4 and AdSense APIs (reports, metadata, admin reads) via Cloudflare Workers with OAuth authentication.MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying Google Analytics 4 data from Claude via a secure, read-only Cloudflare Workers MCP server with per-user OAuth sign-in, requiring no local installation.-