How to Connect Claude, ChatGPT or Cursor to Your Website Analytics (2026)
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.

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. 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, read-only server for GA4. According to Google's page, it needs:
- Python 3.10 or newer, and
pipxoruv - 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.
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 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.
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 and what agent-native analytics means.
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:
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 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.
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.
{
"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:
- "Which pages get traffic but no signups?" Pages ranked by visits, with entry, exit and form data for the weak ones.
- "Where do people leave before they buy?" Each funnel step, how many visitors reach it, and where most drop off.
- "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.
- "Where is my traffic coming from this week, compared with last week?" Sources and trends.
- "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.
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. It cannot change GA4 settings.
- Humblytics has 45 tools. 35 only read: traffic, pages, clicks, forms, heatmaps, funnels, tests, ad accounts and attribution. 10 change something:
create_split_test,update_split_test,stop_split_test,save_funnel,delete_saved_funnel,create_property,delete_propertyand three billing tools. The ad account tools are read-only, so the agent cannot edit campaigns or budgets.
Two rules cover most of the risk:
- Keep your client's approval prompt on. Cursor asks before running an MCP tool by default. The Humblytics server does not enforce approval itself. The prompt in your client is the check.
- Review any A/B test before it is created. A new Humblytics test goes live to real visitors as soon as it is created. The server tells your agent to show you the plan first. See A/B testing MCP servers for how other testing tools handle this.
The 12 marketing skills that come with the Humblytics server are listed on the skills page.
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. The Humblytics server has 45 tools, and 10 change something: A/B tests, saved funnels, adding or removing a site, and billing top-ups.
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
- Google: Try the Google Analytics MCP server
- OpenAI: Connecting custom MCP servers in ChatGPT
- Anthropic: Get started with custom connectors using remote MCP, Connect Claude Code to tools via MCP
- Cursor: Model Context Protocol
- PostHog: Model Context Protocol
- Mixpanel: Mixpanel MCP Server
- Windsor.ai: Google Analytics MCP