BigQuery MCP Server
SEO analysis over the Google Search Console bulk export in BigQuery, with optional GA4 revenue joins
Runs Google Analytics 4 reports and schema lookups for one GA4 property from an AI client
By surendranb (individual) Python Local · stdio Data and analytics
57 popularity score ★ 244 ↓ 6.9k/mo
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GA4_PROPERTY_ID, GOOGLE_APPLICATION_CREDENTIALS. Replace each <NAME> with your value.
claude mcp add google-analytics-4-ga4 -e GA4_PROPERTY_ID=<GA4_PROPERTY_ID> -e GOOGLE_APPLICATION_CREDENTIALS=<GOOGLE_APPLICATION_CREDENTIALS> -- npx -y @surendranb/google-analytics-mcp{
"mcpServers": {
"google-analytics-4-ga4": {
"command": "npx",
"args": [
"-y",
"@surendranb/google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}{
"mcpServers": {
"google-analytics-4-ga4": {
"command": "npx",
"args": [
"-y",
"@surendranb/google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}{
"servers": {
"google-analytics-4-ga4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@surendranb/google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}[mcp_servers.google-analytics-4-ga4]
command = "npx"
args = ["-y", "@surendranb/google-analytics-mcp"]
[mcp_servers.google-analytics-4-ga4.env]
GA4_PROPERTY_ID = "<GA4_PROPERTY_ID>"
GOOGLE_APPLICATION_CREDENTIALS = "<GOOGLE_APPLICATION_CREDENTIALS>"gemini mcp add --scope user -e GA4_PROPERTY_ID=<GA4_PROPERTY_ID> -e GOOGLE_APPLICATION_CREDENTIALS=<GOOGLE_APPLICATION_CREDENTIALS> google-analytics-4-ga4 npx -- -y @surendranb/google-analytics-mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs GA4_PROPERTY_ID, GOOGLE_APPLICATION_CREDENTIALS. Replace each <NAME> with your value.
claude mcp add google-analytics-4-ga4 -e GA4_PROPERTY_ID=<GA4_PROPERTY_ID> -e GOOGLE_APPLICATION_CREDENTIALS=<GOOGLE_APPLICATION_CREDENTIALS> -- uvx google-analytics-mcp{
"mcpServers": {
"google-analytics-4-ga4": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}{
"mcpServers": {
"google-analytics-4-ga4": {
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}{
"servers": {
"google-analytics-4-ga4": {
"type": "stdio",
"command": "uvx",
"args": [
"google-analytics-mcp"
],
"env": {
"GA4_PROPERTY_ID": "<GA4_PROPERTY_ID>",
"GOOGLE_APPLICATION_CREDENTIALS": "<GOOGLE_APPLICATION_CREDENTIALS>"
}
}
}
}[mcp_servers.google-analytics-4-ga4]
command = "uvx"
args = ["google-analytics-mcp"]
[mcp_servers.google-analytics-4-ga4.env]
GA4_PROPERTY_ID = "<GA4_PROPERTY_ID>"
GOOGLE_APPLICATION_CREDENTIALS = "<GOOGLE_APPLICATION_CREDENTIALS>"gemini mcp add --scope user -e GA4_PROPERTY_ID=<GA4_PROPERTY_ID> -e GOOGLE_APPLICATION_CREDENTIALS=<GOOGLE_APPLICATION_CREDENTIALS> google-analytics-4-ga4 uvx -- google-analytics-mcpGA4_PROPERTY_ID |
Required: Numeric ID of the GA4 property to query; can instead come from the sign-in session file. |
|---|---|
GOOGLE_APPLICATION_CREDENTIALS |
Required: Absolute path to a Google service-account JSON key with Viewer access; not needed if the browser sign-in session file exists. |
GA4_SESSION_FILE |
Optional: Path to the browser sign-in session file; defaults to ~/.config/ga4-mcp/session.json. |
DO_NOT_TRACK |
Optional: Set to 1 to turn off usage telemetry (DISABLE_TELEMETRY, NO_TELEMETRY or GA_MCP_TELEMETRY=false also work). |
A local stdio server, written in Python by an independent developer (not Google), that queries the Google Analytics 4 Data API for one GA4 property. Its main tool, get_ga4_data, runs a report over chosen dimensions and metrics; when called with no arguments it returns daily totalUsers, newUsers and sessions from 7daysAgo to yesterday, up to 1000 rows by default. Before running a query it first asks GA4 for a row estimate, and if more than 2,500 rows would come back it returns a warning with suggestions instead of the data, unless the caller sets proceed_with_large_dataset or a limit of 2,500 or less (ga4_mcp/tools/reporting.py at v2.11.6).
The other tools help the assistant pick valid field names: searching and browsing the property's dimension and metric schema, which is fetched once at start, and listing the properties the credentials can see. A search_skills tool pulls analysis playbooks (traffic drops, channel attribution, e-commerce, AI-referral traffic and others) as Markdown from the main branch of the project's GitHub repository at call time.
The README's tool table does not match the released code. At v2.11.6 the server registers 12 tools; list_accounts, get_property_metadata, run_realtime_report, skill_read and skills_list from the README are not among them, while search_schema, get_property_schema, the category browsing tools, get_troubleshooting_guide, setup_ga4_access and check_for_updates are (ga4_mcp/tools/*.py, ga4_mcp/coordinator.py). There is no realtime report in this version.
The npm package is only a wrapper: it starts the PyPI package through uvx.
| Runtime | Python 3.10+orNode.js |
|---|
Python 3.10 or later with uv (the uvx command); the npm wrapper also needs Node and still calls uvx. A Google Analytics 4 property ID in GA4_PROPERTY_ID, and Google credentials with Viewer access to that property: either a service-account JSON key named in GOOGLE_APPLICATION_CREDENTIALS, or a session file at ~/.config/ga4-mcp/session.json written by the maker's browser sign-in installer (curl -fsSL https://ga4.builditwithai.xyz/install | bash).
Read-only reporting on the GA4 Data API: it cannot change GA4 configuration, audiences or properties. One property per server, set at start. Queries estimated above 2,500 rows return a warning instead of data unless proceed_with_large_dataset is set or limit is 2,500 or below; limit defaults to 1000. Despite the README, v2.11.6 has no realtime report tool and no list_accounts tool. The README says MCP_TELEMETRY_OPT_OUT=1 turns telemetry off, but the code at v2.11.6 does not read that variable; it honours DO_NOT_TRACK, DISABLE_TELEMETRY, NO_TELEMETRY or GA_MCP_TELEMETRY=false (ga4_mcp/telemetry.py).
Suits analysts and site owners who want an assistant to answer questions from one GA4 property's reports, and who can create a service account and grant it Viewer access. Its tools only read, so the property itself is not at risk of changes. It is not from Google: Google's experimental server at github.com/googleanalytics/google-analytics-mcp, which we also list, covers the Admin and Data APIs and has a realtime report tool, so pick that one for realtime data or vendor-maintained code. Pick something else too if you want no third-party telemetry or token gateway in the path.
get_ga4_datalist_propertiessearch_schemaget_property_schemalist_dimension_categorieslist_metric_categoriesget_dimensions_by_categoryget_metrics_by_categorysearch_skillsget_troubleshooting_guidesetup_ga4_accesscheck_for_updates