ga4-firebase-mcp
Supports Firebase projects and their Google Analytics 4 data, including Firebase project lookups and configuration using a Firebase project ID.
Provides tools for working with Google Analytics 4 properties, including saved configuration, access checks, Data API reports such as custom reports, realtime, pivots, period comparisons, funnels, cohorts, active users, and acquisition reports, plus Admin API settings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ga4-firebase-mcp show realtime active users for my GA4 property"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ga4-firebase-mcp
MCP server for Google Analytics 4, including the Analytics of Firebase projects. 36 tools: configuration that is remembered across sessions, Firebase lookups, Data API reports (custom reports, realtime, pivots, period comparison, funnels, cohorts, active users, acquisition) and Admin API settings. Every tool states which Google API, GA4 role and scope it needs; access errors come back with the exact steps to fix them, and ga4_check_access checks everything at once.
docs/HERRAMIENTAS.md: every tool, its parameters, dimensions and metrics.
docs/DIMENSIONES.md: every dimension and metric of the property, generated from its metadata.
Install from npm
npx -y -p ga4-firebase-mcp ga4-firebase-mcp-setup --firebase-project <firebase-project-id>That registers the server in Claude Code as npx -y ga4-firebase-mcp, checks your Google credentials and saves the property. It takes the same options as npm run setup (below). To register only the server:
claude mcp add ga4 -s user -- npx -y ga4-firebase-mcpRequirements: Node 18+, and for credentials either Google Cloud CLI (gcloud auth application-default login) or a service account JSON. Your Google account needs at least Viewer access to the GA4 property.
Related MCP server: GA4 MCP Server
Setup from source
Easiest: open Claude Code in this folder and say "instala este MCP". CLAUDE.md tells the agent what to ask and what to run.
By hand, one command does everything (dependencies, build, Claude Code registration, Google credentials check, and optionally saving a property). It is safe to re-run:
npm run setup -- --firebase-project <firebase-project-id>Options: --property-id <id> --quota-project <gcp-project> instead of a Firebase project; --key-file <json> for a service account; --login to run the Google sign-in if it's missing (opens a browser); --write to include write access (create custom dimensions); --name / --scope for the Claude Code registration. Exit code 0 means ready, 2 means the user must do something (shown with →), and 1 means an error, with the explanation.
To share it, copy the folder without node_modules and dist; the installer uses its own path, so it works from any location.
Then, from any Claude session, configure a property in plain words, e.g. "configura GA4 con el proyecto de Firebase mi-proyecto-firebase". That calls ga4_configure, tests the connection and saves it to ~/.config/ga4-mcp/config.json (mode 600; override with GA4_MCP_CONFIG).
Authentication per property: Application Default Credentials (gcloud auth application-default login), a credentials JSON file (service account or authorized user), or a raw access token.
GA4_PROPERTIES / GA4_PROPERTY_ID / GA4_QUOTA_PROJECT environment variables still work as read-only properties.
Regenerate the dimensions reference
npm run build
npm run docs:dimensions -- <property-name>License
MIT. See LICENSE.
Available Tools
36 toolsga4_account_summariesA
List every Google Analytics account and property these credentials can access, with property ids and names. Useful to find the property id to configure. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; cualquier rol en al menos una cuenta de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_acquisitionA
Where new users come from: first-user source, medium and campaign, with new users, active users and key events. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), level, limit, +1 more.
ga4_active_usersA
Daily active users with their 7-day and 28-day rolling counts (DAU, WAU, MAU) and stickiness ratios, optionally split by platform or another dimension. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), property, split_by.
ga4_audiencesB
Audiences defined in the property, with their membership rules. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_batch_reportsA
Run up to 5 reports in one call (Data API batchRunReports). Each request uses the raw RunReportRequest JSON shape: dateRanges, dimensions, metrics, dimensionFilter, orderBys, limit… Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: requests (required), property.
ga4_bigquery_linksA
BigQuery export links of the property: target project, daily or streaming export, and which streams are exported. Raw event data with every parameter lives there. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_change_historyA
Recent configuration changes in the property: who changed what and when (Admin API searchChangeHistoryEvents). Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Editor o Administrador en la cuenta de GA4; OAuth scope analytics.edit. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: days, property.
ga4_check_accessA
Check, for a saved property, which Google APIs are enabled and reachable (Data API, Admin API, Firebase Management API) and whether the credentials can write (analytics.edit scope). Returns which tools work, which are blocked, and the exact steps to unblock each. Call it before using Admin tools (custom dimensions, streams, key events...) or when a tool fails for access.
Inputs: property.
ga4_check_compatibilityA
Check which dimensions and metrics can be combined in one report. Pass the ones you plan to use; the answer marks each as COMPATIBLE or INCOMPATIBLE and lists what else fits. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: metrics, property, dimensions, only_compatible.
ga4_cohort_retentionA
Weekly or monthly retention of first-time users: one cohort per week (or month) of first visit, with active users in each following period and the share retained. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: start_date (required), cohorts, periods, property, +1 more.
ga4_compare_periodsA
Compare two date ranges side by side: each row gets the metric in the current period, the previous period, and the relative change. Good for week over week or month over month. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: metrics (required), current_end (required), previous_end (required), current_start (required), +6 more.
ga4_configureA
Save a GA4 property so every other tool can use it by name, and remember it across sessions. Give either property_id or firebase_project (the linked GA4 property is looked up). Choose how to authenticate with auth_type. The connection is tested before saving, unless skip_test is true. Saving an existing name replaces it. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4; con firebase_project, además Firebase Viewer en ese proyecto. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: name (required), key_file, auth_type, skip_test, +6 more.
ga4_create_custom_dimensionA
Register an event parameter (for example destination) as a custom dimension so reports can use it as customEvent:. This changes the property for everyone. Data is only available from the day it is registered, not before. Needs the Editor role and the analytics.edit scope. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Editor en la propiedad de GA4; OAuth scope analytics.edit. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: display_name (required), parameter_name (required), scope, property, +1 more.
ga4_custom_dimensionsB
Event and user parameters registered as custom dimensions. Only these parameters can be used in reports, as customEvent: or customUser:. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_custom_metricsB
Numeric event parameters registered as custom metrics, usable in reports as customEvent:. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_data_retentionB
How long GA4 keeps event-level and user-level data for explorations. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_data_streamsB
Data streams of the property: one per Android app, iOS app or website, with package name, bundle id or URL. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_event_countsA
Event count and unique users for a list of events (or every event starting with a prefix), optionally over time (day, ISO week or month) and split by one more dimension such as platform or country. Unique users are deduplicated within each period, so they cannot be summed across periods. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), events, prefix, +3 more.
ga4_firebase_appsA
List the Android, iOS and web apps of a Firebase project, with their app ids, package names and bundle ids. Requires: Firebase Management API (firebase.googleapis.com) enabled on the quota project; Firebase Viewer (o Lector) en el proyecto de Firebase. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: firebase_project (required).
ga4_firebase_linksB
Firebase projects linked to the property. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_funnelA
Sequential funnel over GA4 events (Data API runFunnelReport, v1alpha): counts users who completed each step in order, with completion and abandonment rates per step. Optionally broken down by a dimension such as platform. The endpoint is alpha and can return user counts that disagree with ga4_event_counts for the same events and dates (for example more users at a step than ever fired its event): cross-check before reporting. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: steps (required), end_date (required), start_date (required), property, +3 more.
ga4_key_eventsB
Events marked as key events (formerly conversions) in the property. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_list_propertiesA
List the GA4 properties this server remembers: name, property id, Firebase project, quota project, how it authenticates (secrets masked) and which one is the default.
Inputs: no named parameters.
ga4_metadataA
List the dimensions and metrics available in the GA4 property, including custom event parameters registered as custom dimensions (customEvent:*). Use before ga4_run_report to find valid API names. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: search, property, custom_only, with_descriptions.
ga4_pivot_reportA
Pivot table report (Data API runPivotReport): rows and columns from different dimensions, e.g. platform across columns and eventName down rows. Each pivot lists its fieldNames and limit. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: pivots (required), metrics (required), end_date (required), dimensions (required), +4 more.
ga4_property_detailsA
Property settings: display name, time zone, currency, industry, service level and creation date. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_property_from_firebaseA
Find the GA4 property linked to a Firebase project, with the data stream for each Android and iOS app. Use it before ga4_configure when you only know the Firebase project. Requires: Firebase Management API (firebase.googleapis.com) enabled on the quota project; Firebase Viewer (o Lector) en el proyecto de Firebase. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: firebase_project (required).
ga4_realtime_reportA
Realtime report for the last 30 minutes (Data API runRealtimeReport). Realtime has its own, smaller set of fields: dimensions like eventName, platform, country, city, unifiedScreenName, appVersion, minutesAgo; metrics activeUsers, eventCount, screenPageViews, keyEvents. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: limit, metrics, property, dimensions, +4 more.
ga4_remove_propertyA
Forget a saved GA4 property. Properties that come from environment variables can't be removed here.
Inputs: name (required).
ga4_run_reportA
Run any GA4 Data API report. Dimensions and metrics use API names (see ga4_metadata), e.g. dimensions ["eventName","platform"], metrics ["eventCount","totalUsers"]. Filters and orderBys use the Data API JSON shape. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: metrics (required), end_date (required), start_date (required), limit, +7 more.
ga4_screen_viewsB
App screens (or web pages) by views, users and engagement time. Optionally only screens whose name contains a text. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), limit, contains, +1 more.
ga4_set_defaultA
Choose which saved GA4 property tools use when a call names none.
Inputs: name (required).
ga4_step_conversionA
Funnel built from unique users per event (not sequential): for each event in order, users, share of the first step and share kept from the previous step, optionally split by a dimension such as platform. Reliable where ga4_funnel's alpha counts are not, but a user can count at a later step without having done the earlier ones. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: steps (required), end_date (required), start_date (required), property, +1 more.
ga4_tech_breakdownA
Users and events by platform, app version, operating system version or device model; optionally only for some events. Useful to spot a version or device where a step fails. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), by, limit, +2 more.
ga4_test_connectionA
Check that a saved property's credentials can read its GA4 data: returns active users and events for the last 7 days, or the API error. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: property.
ga4_top_eventsA
Most frequent events in a period, with event count, unique users and events per user. Optionally only events starting with a prefix. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.
Inputs: end_date (required), start_date (required), limit, prefix, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 36 tools
Most tools target clearly distinct GA4 surfaces (top events vs. realtime vs. pivot vs. batch reports; custom dimensions vs. custom metrics; list vs. create dimension). A few pairs are genuinely close — ga4_top_events vs. ga4_event_counts, ga4_funnel vs. ga4_step_conversion, ga4_check_access vs. ga4_test_connection, and the three Firebase tools (property_from_firebase / firebase_apps / firebase_links) — but the descriptions explicitly cross-reference and differentiate them, which mitigates the risk.
All 36 tools share a uniform ga4_ prefix and snake_case, so the family is immediately recognizable. Most names are noun-phrase report/resource names (ga4_active_users, ga4_audiences, ga4_data_streams) while a handful use verb_noun (ga4_create_custom_dimension, ga4_list_properties, ga4_run_report, ga4_configure); the mix is readable but not a single strict verb_noun pattern.
36 tools is heavy for one server and well past the comfortable 3-15 range, partly because many convenience wrappers (top_events, event_counts, active_users, acquisition, tech_breakdown, screen_views, cohort_retention, compare_periods, step_conversion) are thin specializations of ga4_run_report. The breadth of GA4 Data + Admin + Firebase + connection-management domains justifies a large surface, but consolidation would make selection easier.
Reporting coverage is excellent — generic, batch, pivot, realtime, funnel, cohort, and many prebuilt reports — and admin read coverage spans properties, streams, audiences, key events, links, retention, and change history. The main gap is write/CRUD depth: only custom dimension creation exists, with no update/delete of dimensions, key events, or streams, though connection setup, access diagnostics, and metadata discovery are all present.
Maintenance
Related MCP Connectors
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Google Search Console, GA4 and Bing Webmaster data for SEO and AI-search work. 20 read-only tools.
200+ read/write tools for GA4, Search Console, Google Ads, Shopify, WooCommerce, Shopware & more.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables comprehensive integration with Google Analytics 4, allowing users to read analytics reports and send custom events through both the Data API and Measurement Protocol v2.26625 npm3MIT
- FlicenseAqualityDmaintenanceEnables interaction with Google Analytics 4 to manage accounts, run standard or realtime reports, and validate event parameters. It supports dual authentication methods and integrates with GTM for end-to-end data collection orchestration.8-
- AlicenseAqualityBmaintenanceEnables read-only access to Google Analytics 4 data through seventeen tools covering reports, realtime data, funnels, pivots, metadata, and admin lists. It runs locally with service account credentials and lets users query properties via standard MCP clients.17MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Google Analytics data via natural language, providing tools for account and property insights, core reports, funnels, realtime reports, and custom dimensions/metrics.Apache 2.0