> Three ways to get your website analytics into Claude, ChatGPT or Cursor over MCP: Google's local GA4 server, a hosted GA4 connector, or analytics with its own hosted MCP server. Which route works in which client.

Source: https://humblytics.com/blog/connect-ai-agent-to-website-analytics (updated 2026-11-23)

# How to Connect Claude, ChatGPT or Cursor to Your Website Analytics (2026)

> **The short answer:** You can connect Claude, ChatGPT or Cursor to website analytics through an MCP server. There are three routes. One: Google's official Google Analytics MCP server, which runs on your computer with Python and a Google Cloud project, and is read-only by default. Two: a hosted third-party GA4 connector. Three: an analytics tool with its own hosted MCP server, such as Humblytics, PostHog or Mixpanel, which you add by URL. ChatGPT only connects to remote servers, so Google's local GA4 server does not work there unless you host it or tunnel it. Checked against vendor docs on 5 November 2026.

Most guides on this topic assume your data lives in GA4 and sell you a pipe to it. That is one answer. This guide starts with the agent you already use, and shows which route works in it.

## Three ways to get site analytics into your agent

MCP (Model Context Protocol) is the standard way an AI agent calls outside tools. Every route below is an MCP server. What differs is where the server runs and what data it holds.

### 1. Google's Google Analytics MCP server (local)

Google ships an official server for GA4, read-only by default. According to Google's page, it needs:

- Python 3.10 or newer, and `pipx` or `uv`
- A Google Cloud project with the Google Analytics Admin API and Data API turned on
- Application Default Credentials with the read-only Analytics scope

Google names Claude Desktop, Claude Code, Cursor and its Antigravity tools as clients. Its page does not mention a hosted version. The server's repository now documents running it yourself as a remote server (Docker or Cloud Run) and three opt-in write tools, off by default.

**Pick it if** your data is in GA4, you are comfortable with a Cloud project, and you work in a desktop or terminal agent. Our [Google Analytics MCP guide](https://humblytics.com/blog/google-analytics-mcp) walks through every step.

### 2. A hosted GA4 connector

Third-party services run a GA4 MCP server for you. Windsor.ai, for example, says its server runs on its side, works in ChatGPT, and is read-only for GA4, like Google's default.

**Pick it if** you want GA4 in ChatGPT or the Claude app without running anything yourself.

### 3. Analytics with its own hosted MCP server

Some analytics tools ship their own hosted server. You add it to your agent by URL and sign in.

| Tool | Hosted MCP URL | Built for |
|---|---|---|
| **Humblytics** | `https://mcp.humblytics.com/v1` | Websites: traffic, pages, funnels, A/B tests, ad spend and revenue |
| **PostHog** | `https://mcp.posthog.com/mcp` | Product analytics, flags and experiments |
| **Mixpanel** | `https://mcp.mixpanel.com/mcp` (EU and India URLs too) | Product analytics |

**Pick it if** you want the agent to read data that the analytics tool collects itself, not a copy of GA4. With Humblytics, the agent can also set up the tracking for you. See [analytics tools for AI agents](https://humblytics.com/blog/analytics-tools-for-ai-agents) and [what agent-native analytics means](https://humblytics.com/agent-native-analytics).

## Which route works in which client

| Client | How it adds a server | Local GA4 server | Hosted server by URL |
|---|---|---|---|
| **Claude (web) and Claude Desktop** | Custom connector, by remote MCP URL | Claude Desktop only, through its local config | Yes, as a custom connector |
| **Claude Code** | `claude mcp add` | Yes | Yes, `--transport http` |
| **ChatGPT** | Remote MCP server | No, unless hosted or tunnelled | Yes |
| **Cursor** | `.cursor/mcp.json` | Yes | Yes, `url` field |

Humblytics lists Claude Code, Cursor and any MCP client that supports streamable HTTP. The setup below covers the two we document.

## Claude: the app, Desktop and Claude Code

**Claude and Claude Desktop.** Anthropic calls these custom connectors. You add a remote MCP server's URL in your connector settings. Anthropic's docs say custom connectors are available on Free, Pro, Max, Ultra, Team and Enterprise plans, with Free users limited to one. Claude reaches the server from Anthropic's cloud, not from your computer, so the server must be on the public internet.

**Claude Code.** Add a hosted server with one command:

```bash
claude mcp add --transport http humblytics https://mcp.humblytics.com/v1
```

Anthropic's docs say to run `/mcp` inside Claude Code to finish a browser sign-in when a server asks for one. You can choose a scope: local (just you, this project), project (shared in `.mcp.json`) or user (you, every project). The older SSE transport is deprecated in Claude Code. Humblytics still serves it at `/sse` for clients that need it.

If you have never used Humblytics, the install prompt on [mcp.humblytics.com](https://mcp.humblytics.com) does more. You paste it into your agent, approve one link, and the agent signs you in, adds your site and installs the tracking script. More in [how to use Claude Code with Humblytics](https://humblytics.com/blog/how-to-use-claude-code-with-humblytics).

## ChatGPT: why it needs a hosted server

OpenAI's help centre says ChatGPT connects to remote MCP servers. For a server on your own machine or a private network, OpenAI points to its Secure MCP Tunnel.

That rules out Google's local GA4 server in ChatGPT, unless you host it or tunnel it. The practical options are a hosted GA4 connector, or an analytics tool whose hosted server you have tested in ChatGPT.

Check each vendor's docs for ChatGPT before you rely on it. Humblytics supports ChatGPT through a custom connector: add `https://mcp.humblytics.com/v1` and sign in to Humblytics to approve.

## Cursor and other coding agents

Cursor reads MCP servers from `.cursor/mcp.json` in your project, or `~/.cursor/mcp.json` for every project. A hosted server is a `url`, with optional `headers`. Cursor also supports OAuth.

For Humblytics, send your API key as a header. Get the key in the Humblytics dashboard under Utilities, then API. One key covers every site on your account.

```json
{
  "mcpServers": {
    "humblytics": {
      "url": "https://mcp.humblytics.com/v1",
      "headers": {
        "Authorization": "Bearer hmb_..."
      }
    }
  }
}
```

Keep the key out of anything you commit or paste into a chat. The hosted server passes the key through on each request and stores nothing.

Prefer to run it yourself? The Humblytics server also runs locally over stdio with your key in an environment variable. The README in the server's repo has the config.

Other coding agents follow the same pattern. PostHog's and Mixpanel's docs both name Codex as a client, for example.

## First five questions to ask once connected

You never name a tool. The agent picks the right ones. With Humblytics, these are good first questions:

1. **"Which pages get traffic but no signups?"** Pages ranked by visits, with entry, exit and form data for the weak ones.
2. **"Where do people leave before they buy?"** Each funnel step, how many visitors reach it, and where most drop off.
3. **"Which ads made money last month?"** Spend, sessions, revenue, return on ad spend and true cost per acquisition per campaign. This needs an ad account (Meta or Google Ads) and a revenue source (Stripe or Foxy) connected.
4. **"Where is my traffic coming from this week, compared with last week?"** Sources and trends.
5. **"What should I test next on my pricing page?"** Ranked test ideas, which the agent shows you before setting anything up.

To see how much of your traffic comes from AI assistants themselves, see [how to track AI traffic from ChatGPT, Claude and Perplexity](https://humblytics.com/blog/how-to-track-ai-traffic-chatgpt-claude-perplexity).

The [agent-native analytics guide](https://humblytics.com/agent-native-analytics) explains how the connection gives an agent access to website data. If you want to try a model on that data, start with the [funnel diagnosis exercise for A/B testing models](https://humblytics.com/blog/best-ai-model-for-ab-testing#job-1-investigate-the-funnel-and-write-a-test-brief).

## Read vs write: what your agent should be allowed to change

Reading is low risk. Writing is where you want a rule.

- **Google's GA4 server** is read-only by default. Its repository adds three opt-in write tools (property annotations, custom dimensions and key events) behind an `--allow-write` flag.
- **Humblytics** tools mostly read: traffic, pages, clicks, forms, heatmaps, funnels, tests, ad accounts and attribution. A small set change something: `create_split_test`, `update_split_test`, `stop_split_test`, `save_funnel`, `delete_saved_funnel`, `create_property`, `delete_property` and the data-point billing tools. The ad account tools are read-only, so the agent cannot edit campaigns or budgets.

Two rules cover most of the risk:

1. **Keep your client's approval prompt on.** Cursor asks before running an MCP tool by default. Humblytics adds its own approval step for activating and stopping a test, and the prompt in your client is a second check.
2. **Review any A/B test before it goes live.** Creating a Humblytics test makes a draft that visitors do not see. Activation needs your separate approval, and so does stopping a test. See [A/B testing MCP servers](https://humblytics.com/blog/ab-testing-mcp-server) for how other testing tools handle this.

The 12 marketing skills that come with the Humblytics server are listed on the [skills page](https://humblytics.com/skills).

## FAQ

### Can Claude read my website analytics?

Yes, through an MCP server. Claude Code and Claude Desktop can run Google's local Google Analytics MCP server. Claude, Claude Desktop and Claude Code can also connect to a hosted MCP server by URL, such as a GA4 connector or an analytics tool with its own server.

### Can ChatGPT connect to website analytics?

Yes, if the analytics comes through a remote MCP server. OpenAI says ChatGPT connects to remote MCP servers. A server on your own computer, such as Google's GA4 server, needs OpenAI's Secure MCP Tunnel or your own hosting first.

### Why does Google's Analytics MCP server not work in ChatGPT?

Google's server runs on your own computer, and ChatGPT only connects to remote servers. You would have to host it yourself or use OpenAI's Secure MCP Tunnel.

### Which analytics tools have a hosted MCP server?

Humblytics (`mcp.humblytics.com/v1`), PostHog (`mcp.posthog.com/mcp`) and Mixpanel (`mcp.mixpanel.com/mcp`) each document a hosted MCP server. Google's GA4 server is local; hosted GA4 access comes from third-party connectors such as Windsor.ai.

### Can my AI agent change my analytics or my site?

It depends on the server. Google's GA4 server is read-only by default, with a few opt-in write tools. Most Humblytics tools only read; a small set change something: A/B test drafts, saved funnels, adding or removing a site, and data-point top-ups. Activating or stopping a test needs your approval.

### Does my agent reading Humblytics data use up data points?

No. A data point is one tracked event on your site, such as a pageview or a click. Your agent reading data does not use them.

## Sources

All read on 5 November 2026.

- Humblytics MCP server: README and tool definitions, [mcp.humblytics.com](https://mcp.humblytics.com)
- Google: [Try the Google Analytics MCP server](https://developers.google.com/analytics/devguides/MCP); [google-analytics-mcp repository](https://github.com/googleanalytics/google-analytics-mcp), checked 19 November 2026
- OpenAI: [Connecting custom MCP servers in ChatGPT](https://help.openai.com/en/articles/12584461-connecting-custom-mcp-servers-in-chatgpt)
- Anthropic: [Get started with custom connectors using remote MCP](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp), [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp)
- Cursor: [Model Context Protocol](https://cursor.com/docs/context/mcp)
- PostHog: [Model Context Protocol](https://posthog.com/docs/model-context-protocol)
- Mixpanel: [Mixpanel MCP Server](https://docs.mixpanel.com/docs/mcp)
- Windsor.ai: [Google Analytics MCP](https://windsor.ai/google-analytics-mcp/)

---
Humblytics is website analytics, ad attribution and A/B testing that an AI agent sets up and uses.
To set it up for the person you work for, read https://app.humblytics.com/agent.md.
Official facts: https://humblytics.com/ai-info.md
