Skip to content

fix(google): GA funnel on v1alpha + Workspace MCP agentic-client readiness - #562

Merged
JonasJesus42 merged 2 commits into
mainfrom
fix/ga4-funnel-v1alpha
Nov 3, 2026
Merged

JonasJesus42 merged 2 commits into
mainfrom
fix/ga4-funnel-v1alpha

Conversation

@yuriassuncx

@yuriassuncx yuriassuncx commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Two Google fixes, kept together on request.

1. google-analytics: run-funnel-report uses v1alpha

runFunnelReport only exists on the GA4 Data API v1alpha; the tool called v1beta and every call failed with Google Analytics API error: 404 (verified 2026-10-21 via a Studio connection, property 355495152; the same steps on v1alpha return the funnel table). decocms/reports already does this in api/connectors/data/ga4.ts. Insights MCP's INTERACTIONS_DASHBOARD needs it for "did X, then purchased".

2. google-workspace: ready for Google's is_agentic OAuth clients

Google's notice: from 2026-11-11 its Workspace MCP servers only accept OAuth clients marked agentic; from 2026-11-12 the flag is permanent (changing it = new client ID, everyone reconnects).

Which MCPs here are affected (checked in code):

  • google-workspace — affected. It proxies to gmailmcp / drivemcp / calendarmcp / chatmcp / people.googleapis.com/mcp/v1. Without the flag it stops working on 11/11.
  • REST-based ones (google-gmail, google-drive, google-calendar, google-analytics, google-search-console, ...) — not affected on 11/11; Google still asks to mark agent clients.
  • Nothing here uses the Data Analytics API with Gemini (Conversational Analytics), so the 2027-01-01 billing change does not apply.

Code changes:

  • mcp-proxy.ts: a "not marked as an AI agent" rejection now says exactly that and that re-auth will not help (today every 403 says "missing scope, re-authenticate").
  • main.ts: optional GOOGLE_WORKSPACE_CLIENT_ID / GOOGLE_WORKSPACE_CLIENT_SECRET for a dedicated agentic client; falls back to the shared GOOGLE_CLIENT_ID.
  • README section with the dates and the decision.
  • mcp-proxy.test.ts (2 tests, pass).

Still a console action (not code)

Mark the OAuth client(s) used by these MCPs as agentic in Google Cloud (projects decocms, deco-chat-460601) before 2026-11-11. If the shared GOOGLE_CLIENT_ID is also used for non-agent traffic (e.g. human sign-in), create a separate agentic client and set the two new env vars instead.

🤖 Generated with Claude Code


Summary by cubic

Fixes GA4 funnel reports (the v1beta path for runFunnelReport always 404s) and gets google-workspace ready for Google's 2026-11-11 requirement that Workspace MCP OAuth clients be marked agentic.

google-analytics

  • run-funnel-report now calls the Data API's v1alpha endpoint, where runFunnelReport exists.

google-workspace

  • 403s and backend errors that mention "agentic" or "AI agent" now explain the client isn't marked agentic and that re-authenticating won't help, instead of the generic missing-scope hint.
  • Optional GOOGLE_WORKSPACE_CLIENT_ID/GOOGLE_WORKSPACE_CLIENT_SECRET allow a dedicated agentic client, falling back to the shared GOOGLE_CLIENT_ID; switching clients invalidates existing refresh tokens, so users reconnect once.
  • README documents the deadline and the Google Cloud Console action required.

Written for commit f582a1e. Summary will update on new commits.

View guided diff Turn on auto-fix

The v1beta path does not exist for funnels, so run-funnel-report always
returned 'Google Analytics API error: 404' (verified 2026-10-21 against
property 355495152; the same request succeeds on v1alpha). decocms/reports
already works around it the same way in api/connectors/data/ga4.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yuriassuncx yuriassuncx changed the title fix(google-analytics): run-funnel-report uses v1alpha (v1beta 404s) fix(google): GA funnel on v1alpha + Workspace MCP agentic-client readiness Oct 21, 2026
…ow a dedicated client

From 2026-11-11 Google's Workspace MCP servers (gmailmcp, drivemcp,
calendarmcp, chatmcp, people) reject OAuth clients not marked as agentic.
This package proxies to exactly those servers, so it is the one MCP here
that breaks if the client is not marked.

- mcp-proxy: a 'not marked as an AI agent' rejection now says so and that
  re-auth will not help, instead of the generic 403 missing-scope hint.
- main: optional GOOGLE_WORKSPACE_CLIENT_ID/SECRET for a dedicated agentic
  client (falls back to the shared GOOGLE_CLIENT_ID).
- README: the deadline, what to mark, and which MCPs are unaffected (REST).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/airtable October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/blog-generator October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/content-scraper October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/deco-llm October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/deco-news-weekly-digest October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/discord-read October 21, 2026 16:41 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/figma-mcp October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/flux October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-analytics October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-big-query October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-calendar October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-calendar-sa October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-drive October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-meet October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-search-console October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-sheets October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-slides October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-tag-manager October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/google-workspace October 21, 2026 16:42 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/grafana October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/grain October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/hyperdx October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/magento October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/meta-ads October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/nanobanana October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/object-storage October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/pandadoc October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/perplexity October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/registry October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/shopify October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/slack-mcp October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/veo October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/vtex October 21, 2026 16:43 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/vtex-docs October 21, 2026 16:44 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/wake October 21, 2026 16:44 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/whatsappagent October 21, 2026 16:44 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/youtube-channel-admin October 21, 2026 16:44 In progress
@deco-hosting
deco-hosting Bot requested a deployment to preview/pr-562/youtube-search October 21, 2026 16:44 In progress

@JonasJesus42 JonasJesus42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. GA: runFunnelReport now on the Data API v1alpha (the v1beta path 404s); every other Data API call stays on v1beta. Workspace: notAgenticError only replaces the error message when Google's body mentions agentic/AI agent; the optional GOOGLE_WORKSPACE_CLIENT_ID/SECRET fall back to the shared client (createGoogleOAuth config.clientId ?? env.GOOGLE_CLIENT_ID). LGTM.

@JonasJesus42
JonasJesus42 merged commit aaa10ee into main Nov 3, 2026
2 of 40 checks passed

This branch is being deployed

38 in progress deployments
preview/pr-562/youtube-search — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/youtube-channel-admin — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/whatsappagent — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/wake — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/vtex-docs — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/vtex — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/veo — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/slack-mcp — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/shopify — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/registry — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/perplexity — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/pandadoc — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/object-storage — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/nanobanana — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/meta-ads — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/magento — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/hyperdx — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/grain — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/grafana — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-workspace — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-tag-manager — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-slides — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-sheets — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-search-console — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-meet — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-drive — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-calendar-sa — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-calendar — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-big-query — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/google-analytics — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/flux — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/figma-mcp — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/discord-read — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/deco-news-weekly-digest — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/deco-llm — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/content-scraper — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/blog-generator — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
preview/pr-562/airtable — 5c3590f3 Deployed Oct 21, 2026 by deco-hosting[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants