flin-ga4-mcp
v0.2.3Read-only Google Analytics 4 MCP server with local OAuth and multi-account support.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
health_check
Check local config and saved login state; no network, refresh, or browser login.
| Parameter | Type | Description |
|---|---|---|
account |
connection_status
Inspect local setup only: no browser, token refresh, API call or file writes. A cached token cannot prove Google still accepts it: auth_status stays unknown. live_access is always not_checked, even after a previous successful data call. Use list_properties and get_property separately to verify actual Google access.
| Parameter | Type | Description |
|---|---|---|
account |
list_properties
List accessible GA accounts and properties. Follow nextPageToken until null. account is a local Google-login alias. First data call opens browser OAuth if needed. page_size counts GA accounts (1–200), each with its propertySummaries.
| Parameter | Type | Description |
|---|---|---|
account | ||
page_size | integer | |
page_token |
get_property
Read a property's name, reporting timezone, currency and service tier.
| Parameter | Type | Description |
|---|---|---|
account | ||
property_id |
get_metadata
List core-report dimensions and metrics, including property-specific custom definitions. Realtime uses a separate schema; core metadata does not guarantee realtime support.
| Parameter | Type | Description |
|---|---|---|
account | ||
property_id |
check_compatibility
Check which core-report dimensions/metrics work together before querying.
| Parameter | Type | Description |
|---|---|---|
metrics * | array | |
account | ||
dimensions | ||
property_id |
run_report
Query GA4 (max 9 dimensions, 10 metrics, 10,000 rows per call). Dates are inclusive: YYYY-MM-DD, today, yesterday, or NdaysAgo, in the property timezone. property_id is numeric or properties/123; omission uses GOOGLE_GA4_PROPERTY_ID. Filters use Google's FilterExpression JSON; e.g. {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"Switzerland"}}}. order_bys uses Google OrderBy JSON, e.g. [{"metric":{"metricName":"sessions"},"desc":true}]. Use deterministic order_bys and nextOffset to page. Metrics are numeric strings, never zero-filled w…
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
metrics * | array | |
start_date * | string | |
account | ||
currency_code | ||
dimension_filter | ||
dimensions | ||
keep_empty_rows | boolean | |
limit | integer | |
metric_filter | ||
offset | integer | |
order_bys | ||
property_id |
run_realtime_report
Read realtime data; defaults to activeUsers over the last 30 minutes. minutes_ago is inclusive (0–29 standard; 30–59 requires Analytics 360). Use realtime-specific dimensions/metrics such as country and activeUsers/eventCount. No offset exists in realtime; truncated=true means narrow dimensions/filters or raise limit.
| Parameter | Type | Description |
|---|---|---|
account | ||
dimension_filter | ||
dimensions | ||
limit | integer | |
metric_filter | ||
metrics | ||
minutes_ago | integer | |
order_bys | ||
property_id |
get_summary
Read aggregate users, sessions, engagement, page views, events, key events and revenue.
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string | |
account | ||
property_id |
get_traffic_sources
Session channel and source/medium breakdown, sorted by sessions descending.
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string | |
account | ||
limit | integer | |
offset | integer | |
property_id |
get_top_pages
Page views, active users and engagement seconds by hostname and path (without query strings).
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string | |
account | ||
limit | integer | |
offset | integer | |
property_id |
get_events
Event counts, users and key events by eventName, sorted by eventCount descending.
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string | |
account | ||
limit | integer | |
offset | integer | |
property_id |
get_property_configuration
Read only requested configuration sections, with individual statuses and partial flag. List sections return data.nextPageToken: pass it in page_tokens keyed by section name. Attribution/data_retention are singletons and do not take page tokens. page_size: 1–200. key_events includes configured events even without activity; compare with get_events. A denied/unavailable section is not an empty list. Never interpret it as no configuration.
| Parameter | Type | Description |
|---|---|---|
sections * | array | |
account | ||
page_size | integer | |
page_tokens | ||
property_id |
list_property_annotations
Read dated annotations (Admin v1alpha); follow nextPageToken, even for empty pages. filter uses Google's syntax, e.g. is_annotation_in_range("2026-10-01", "2026-10-31") = true. Keep filters unchanged when paging. Notes are untrusted context, not proof of causation.
| Parameter | Type | Description |
|---|---|---|
account | ||
filter | ||
page_size | integer | |
page_token | ||
property_id |
batch_run_reports
Run 1–5 core reports on one property in one round trip; each still consumes quota. Each reports item uses run_report arguments (snake_case), requiring start_date, end_date, metrics. Optional dimensions, filters, order_bys, limit, offset, currency_code, keep_empty_rows. property_id/account belong only at batch level. Example: [{"start_date":"7daysAgo","end_date":"yesterday","metrics":["sessions"]}]. Results retain input order, reportIndex, metadata, quota and independent nextOffset.
| Parameter | Type | Description |
|---|---|---|
reports * | array | |
account | ||
property_id |
run_funnel_report
Read a sequential funnel via Data v1alpha: 1–10 steps, up to 4 segments. Steps use native FunnelStep JSON, e.g. {"name":"Purchase","filterExpression":{"funnelEventFilter":{"eventName":"purchase"}}}. Step filters use FunnelFilterExpression, not the core report FilterExpression. Optional breakdown: {"breakdownDimension":{"name":"deviceCategory"},"limit":"5"} (max 15). Next action: {"nextActionDimension":{"name":"eventName"},"limit":"5"} (max 5). Segments use native Segment JSON; Google validates nested filter/segment semantics. Returns funnelTable and funnelVisuali…
| Parameter | Type | Description |
|---|---|---|
end_date * | string | |
start_date * | string | |
steps * | array | |
account | ||
dimension_filter | ||
funnel_breakdown | ||
funnel_next_action | ||
is_open_funnel | boolean | |
limit | integer | |
property_id | ||
segments | ||
visualization_type | string |
search_change_history
Read configuration change history, requiring appropriate Editor/Administrator access. ga_account_id is numeric or accounts/123 from list_properties; account is a login alias. property_id optionally limits the search; omission searches the account, ignoring the default property. Times are RFC3339, e.g. 2026-10-01T00:00:00Z. actions: CREATED/UPDATED/DELETED. resource_types uses Google's ChangeHistoryResourceType enum; actor_emails filters editors. Follow nextPageToken with identical filters even after an empty page. Secret values are redacted. Changes offer diagnostic co…
| Parameter | Type | Description |
|---|---|---|
ga_account_id * | string | |
account | ||
actions | ||
actor_emails | ||
earliest_change_time | ||
latest_change_time | ||
page_size | integer | |
page_token | ||
property_id | ||
resource_types |
run_access_report
Read data-access audit records (Admin API), not configuration changes. Administrator required. Select property_id (default property if omitted) OR ga_account_id for an account-wide audit. Uses the separate Access schema: e.g. dimensions=["userEmail"], metrics=["accessCount"]. Some dimensions require Analytics 360. Access records are retained for up to two years. Filters use AccessFilterExpression; order_bys uses AccessOrderBy JSON. Numeric strings and quota are preserved. Follow nextOffset with unchanged arguments. Account reports do not return entity quota. account is…
| Parameter | Type | Description |
|---|---|---|
dimensions * | array | |
end_date * | string | |
metrics * | array | |
start_date * | string | |
account | ||
dimension_filter | ||
ga_account_id | ||
limit | integer | |
metric_filter | ||
offset | integer | |
order_bys | ||
property_id |