Google Analytics in Claude Code

Add Caybl.ai to Claude Code as a remote MCP server and your GA4 data is available from the terminal. One command, one browser authorization, then ask.

  • Free to connect and read
  • Read-only by default
  • One command to add

Can Claude Code read Google Analytics?

Yes. Claude Code connects to remote MCP servers, which is the same mechanism the Claude desktop and web apps use for custom connectors. Because Caybl.ai is hosted, one connection covers all three - you authorize once and the same GA4 access is there whether you are in the terminal or the browser.

Steps

Step 1

Sign in with Google

Connect Google Analytics through Google’s own consent screen.

Step 2

Copy your endpoint

From your Caybl.ai dashboard.

Step 3

Add it to Claude Code

claude mcp add for the remote HTTP transport - it opens the browser to authorize.

Step 4

Ask

“Did organic traffic to the docs drop after last Tuesday’s deploy?”

Add it at user scope to have it in every project, or project scope to keep it to the one repository. Project scope is usually right when a repo maps to a specific website.

Skill, plugin, connector, or MCP server?

These names get used interchangeably and it is a fair source of confusion. For live data from an outside service, the mechanism Claude actually uses is MCP. A connector is what the Claude apps call an MCP server you have added. Skills and plugins package instructions and behaviour rather than a live connection to your account. Caybl.ai is an MCP server, which is why a single connection works across Claude Code, desktop and web.

Why this beats a local Google Analytics MCP server

The self-hosted route is free and genuinely works, but it asks you to create a Google Cloud project, enable the Data API, generate credentials, grant your service account access to the GA4 property, and keep a local process running. The failure modes are well documented and unpleasant: credentials in the default gcloud path can deadlock the server until the call times out, and a service account missing property access returns empty results with no error at all - so it looks like you have no data rather than no permission.

Caybl.ai removes that surface entirely. There is no key file, no local process, and access is granted through the standard Google consent screen you can revoke at any time.

The reasoning runs in Claude Code on your own plan. Caybl.ai only fetches the Google Analytics data needed for the question you asked.

Questions worth asking from the terminal

  • Compare“Compare traffic to the pages I changed this week against the previous week.”
  • Analyze“Which routes have the highest bounce rate on mobile?”
  • Diagnose“Did the redirect I shipped on Monday cost us any organic entrances?”
  • Analyze“What are the top landing pages for this site, and which convert worst?”

“Did the redirect I shipped on Monday cost us any organic entrances?”

“Organic entrances to /docs/getting-started are down 18% since Monday - the redirect target is missing the old URL’s top ranking query in its title.”

Illustrative example - not real account data.

Add Google Analytics to Claude Code

Hosted, one command. No service accounts, no local server.

Get started free

FAQ

Sources

  • Claude Code documentation - connecting remote MCP servers
  • Google Analytics Data API (v1) - official Google documentation
  • Model Context Protocol (MCP) - the open standard for connecting AI clients to data