QuerySail: Google Analytics MCP
向ChatGPT、Claude、Codex或Cursor詢問您的Google Analytics 4數據。託管、唯讀的MCP伺服器,支援OAuth:按管道、來源、頁面、國家和裝置的報告,期間比較、即時用戶和自訂維度。無需API金鑰,無需安裝。
託管 MCP 伺服器
npx add-mcp 'https://mcp.querysail.com/ga4/mcp'可安裝到 Claude Code、Codex、Cursor 等客戶端
文件
Google Analytics MCP Server (GA4) for ChatGPT, Claude and Codex
QuerySail is a hosted, read-only GA4 MCP server. Ask about users, sessions, channels, landing pages, key events and revenue across every property you can see, in the AI app you already use. To use Google Analytics with Claude or ChatGPT, add one URL and sign in.
Independent product, not made by Google. You sign in to QuerySail through our sign-in provider, WorkOS, and grant Analytics access on Google’s own consent screen.
What you can ask
Plain questions. Your assistant picks the dates, dimensions, metrics and filters, and every answer says what it covers. For worked examples and data limits, read how to connect GA4 to ChatGPT and Claude.
- Which Google Analytics properties can you access?
- How many users and sessions did my site have in the last 28 days?
- Which channels brought the most sessions last month, and how did that change from the month before?
- What are my top landing pages by key events?
- How many people are on the site right now, and from which countries?
- Compare organic search sessions with the same weeks last year.
What it does
- Property discovery. Lists the GA4 properties your connected Google accounts can read, grouped by Analytics account.
- Any report. Every Data API dimension and metric, including your custom definitions and key events, with filters and sorting.
- Comparisons and realtime. What changed between two periods and who is on the site right now.
- Clear coverage. Responses state the dates and time zone used, whether more rows exist, and when Google thresholded or sampled the report.
What it does not do
- It never writes to Google: no editing properties, key events, audiences or settings.
- It cannot read properties your Google account cannot read, or Universal Analytics properties.
- It does not store an analytics archive. Data is fetched when you ask, with a short-lived cache.
- It does not explain why numbers changed. Your assistant interprets them.
Five read-only MCP tools
All are marked read-only for MCP clients.
list_properties
The GA4 properties your connected Google accounts can read, with their exact IDs such as properties/123456789.
list_fields
The dimensions and metrics a property supports, including its custom definitions, so your assistant uses the right names.
run_report
Any metrics by any dimensions for a date range, with filters, sorting, totals and 20 to 100 rows per call with paging.
compare_report
Two periods side by side: the previous period, the same weekdays a year earlier or your own dates, with the top gaining and losing channels, pages or countries.
run_realtime_report
Active users, views and events in the last 30 minutes, by country, device, page or event.
Google's official server and QuerySail
Google publishes its own Google Analytics MCP server. It is open source, and its repository labels it experimental. Both servers read GA4 data, and neither can change your settings. They differ in where they run and how you set them up.
| Google's Google Analytics MCP server | QuerySail | |
|---|---|---|
| Where it runs | On your own computer | Hosted by QuerySail at one URL |
| Setup | Python and pipx, a Google Cloud project with the Analytics Admin and Data APIs turned on, and Application Default Credentials with the analytics.readonly scope | Sign in, approve Google Analytics access on Google's consent screen and add the URL to your AI app |
| AI apps | Apps that can start a local server. Google names Gemini CLI, Gemini Code Assist and Claude Code. | Apps that connect to remote MCP servers, including ChatGPT, claude.ai, Claude Code, Codex, Cursor and VS Code |
| Reports | Standard, realtime and funnel reports, property details and custom definitions | Standard and realtime reports, period comparisons with top gainers and losers, and field lists with custom definitions |
| Cost | Free. You run and update it yourself | $8 per month after the 7-day free trial, in the same plan as Search Console |
If you already work in Google Cloud or need funnel reports, Google's server is a good fit. Details checked against Google's google-analytics-mcp repository on October 19, 2026.
Set up in about five minutes
No Google Cloud project and nothing to install. Included in the same plan as Search Console; see pricing and usage limits.
Connect your AI app to the MCP server
You need a QuerySail account with Google Analytics connected. Start the free trial, connect Google Analytics under Account → Connections, then add this endpoint to your app and sign in with your QuerySail account when it asks:
https://mcp.querysail.com/ga4/mcp
- Open Settings → Security and login and turn on Developer mode. Availability depends on your plan and workspace settings.
- Go to chatgpt.com/plugins and select the plus button.
- Name it QuerySail Analytics, paste the endpoint above as the connection URL and create it.
- Sign in with your QuerySail account when asked, then add QuerySail from the tools menu in a new chat.
Security and permissions
What QuerySail asks Google for, where it keeps your credentials, and how to take access back. The privacy policy has the full detail.
The Google permission
QuerySail asks Google for one Google Analytics permission, the read-only scope https://www.googleapis.com/auth/analytics.readonly. It also asks for your Google account's email address and ID (openid and email) so it can tell your connected accounts apart. Each Google product is a separate connection with its own consent, so connecting one never grants another.
What QuerySail can and cannot do
- It can read the Google Analytics data that your Google account can read, when your assistant asks for it.
- It cannot create or edit properties, data streams, key events, audiences or any other setting. None of its tools write to Google.
- It cannot read properties your Google account has no access to.
- It keeps reports in a 15-minute cache to avoid repeat calls. Realtime reports are not cached, and there is no long-term archive.
Where your credentials are stored
QuerySail encrypts your Google tokens with AES-256-GCM before it stores them, and the encryption key is not kept in the database. Your Google tokens never leave QuerySail's servers. Your AI app gets its own QuerySail token and never sees your Google credentials.
How to disconnect and revoke access
- In Account → Connections, choose Disconnect. QuerySail deletes the stored tokens at once, asks Google to revoke them and removes cached data for that connection.
- You can also remove QuerySail in your Google account at myaccount.google.com/permissions. QuerySail notices within about 15 minutes and stops serving that data.
- To cut off an AI app but keep Google connected, revoke plugin access in Account → Settings.
Questions, answered
Something else? See support.
What is a Google Analytics MCP server?
MCP (Model Context Protocol) is the standard way AI assistants call external tools. A Google Analytics MCP server exposes your GA4 reports as tools, so ChatGPT, Claude or Codex can fetch users, sessions, engagement, key events and revenue when you ask a question, instead of you building reports in the Analytics interface. QuerySail is a GA4 MCP server, so it works with Google Analytics 4 properties only.
Can I use Google Analytics with Claude?
Yes. In Claude Desktop or on claude.ai, add QuerySail's Google Analytics endpoint as a custom connector under Customize → Connectors and sign in with your QuerySail account. In Claude Code, run claude mcp add with the same URL, then sign in through /mcp. Claude can then run GA4 reports, compare periods and check realtime users when you ask.
How is QuerySail different from Google's official Google Analytics MCP server?
Google's server is free and open source, and Google labels it experimental. It runs on your own computer. You set up a Google Cloud project, turn on the Analytics Admin and Data APIs and sign in with your own credentials. QuerySail is hosted. You sign in with Google on the QuerySail website and add one URL to your AI app. Both are read-only.
Do I need a Google Cloud project, service account or API key?
No. You approve read-only Google Analytics access with Google once, on the QuerySail website. Your AI app then signs in with your QuerySail account. There is nothing to install and no key to paste.
Can it change my Analytics settings?
No. QuerySail only asks Google for read-only Analytics access. It cannot create or edit properties, data streams, key events, audiences or any other setting.
What data can my assistant get?
Any Google Analytics 4 dimension and metric the Data API offers, including your custom dimensions, custom metrics and key events: users, sessions, views, engagement, events, conversions and revenue, broken down by date, channel, source and medium, landing page, page, country, device, event and more, with filters. Comparisons show what changed between two periods and which channels or pages gained or lost. Realtime reports cover the last 30 minutes. Universal Analytics properties are not supported.
Does QuerySail store my Analytics data?
Reports are fetched from Google when your assistant asks and kept in a short-lived cache of 15 minutes to avoid repeat calls. Realtime reports are not cached. There is no long-term archive.
How much does it cost?
Google Analytics is included in the same $8 per month plan as Search Console, with unlimited connected properties. The 7-day free trial needs no card and starts with your first successful report in either product.
Is QuerySail made by Google?
No. QuerySail is an independent product that uses the public Google Analytics Data and Admin APIs. It is not affiliated with or endorsed by Google, OpenAI or Anthropic.