> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# Can I query my Google Analytics 4 data from Cursor or Claude?

> Yes: with Google's open-source MCP server you run yourself, or with nextanalytica, which reads GA4 as a source next to your own visits.

Updated: 2026-12-01

Yes, two ways. Google's open-source Google Analytics MCP server runs on your computer with Python and Google Cloud credentials, or on a server you host, and reads any GA4 report. nextanalytica is hosted: connect GA4 as a source and your agent reads its daily sessions, key events, pages, countries and devices, back to the property's start, next to nextanalytica's own visits.

## How do you do it?

1. For Google's server: a Google Cloud project, two APIs, credentials, then `claude mcp add`.
2. For nextanalytica: connect GA4 in Sources, then add the MCP address.

## What can you ask your agent?

- "Compare this month's GA4 sessions with last year's, by channel."

## Next steps

- [Google Analytics MCP server](/docs/compare/google-analytics-mcp)
- [Google Analytics 4](/docs/sources/ga4)

Canonical address: https://nextanalytica.app/docs/answers/query-ga4-from-cursor-or-claude
