ai-google-analytics-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GA4_KEYMASTER_HINTS | No | Optional: Enable keymaster hints (set to 'true'). | |
| GA4_DEFAULT_ACCOUNT_ID | No | Default Google Analytics account ID to use when not specified. | |
| GA4_KEYMASTER_DATABASE | No | Optional: Path to keymaster database for status hints. | |
| GA4_LAUNCHER_REGISTRY_JSON | No | Optional: Read launcher registry.json for project integration. | |
| GA4_LAUNCHER_REGISTRY_WRITABLE | No | Optional: Allow writing to launcher registry (set to 'true' to enable). | |
| GOOGLE_APPLICATION_CREDENTIALS | Yes | Path to the Google service account JSON key file for authentication. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_ga4_auth_setup_instructionsA | Return GCP/GA auth steps. Prefer service account if gcloud ADC shows 'This app is blocked'. |
| list_ga_account_summariesB | List GA account summaries and child properties (read-only Admin API). |
| provision_ga4_propertyC | Create a new GA4 property for a project under a GA account. account_id: numeric id only (e.g. 12345678) or accounts/12345678. |
| create_web_data_streamC | Create a web data stream for a GA4 property. Returns measurement_id (G-XXXXXXXX). property_id: numeric or properties/. |
| render_ga4_gtag_snippetA | Return HTML gtag snippet for a measurement ID. |
| inject_ga4_gtag_into_fileB | Inject or update GA4 gtag in a local HTML/layout file (absolute path recommended). Set dry_run=true to preview without writing. |
| render_ga4_nextjs_componentA | Return a Next.js client component (next/script) for GA4. mode: env (read NEXT_PUBLIC_GA_MEASUREMENT_ID) or inline (embed id). consent_gated: only load gtag after localStorage cookie consent is accepted. |
| scaffold_ga4_nextjs_trackingB | Scaffold GA4 for a Next.js app: write GoogleAnalytics.tsx, wire layout.tsx, and set NEXT_PUBLIC_GA_MEASUREMENT_ID in .env.local (when mode=env). web_root must be the Next.js package root (directory containing package.json). |
| save_project_ga4_configB | Write .ga4.config.json in a project root for agents and humans to reference later. |
| provision_project_ga4_setupA | End-to-end: create property + web stream, optionally save .ga4.config.json and inject gtag. If registry_slug is set and GA4_LAUNCHER_REGISTRY_* env is configured, syncs analytics.ga4 metadata. |
| get_ga4_integration_statusB | Report optional launcher registry and keymaster hook availability (graceful when unset). |
| list_registry_projects_for_ga4A | List launcher registry projects with .ga4.config.json and .keymaster hints when registry env is set. |
| resolve_project_for_ga4C | Resolve registry slug and/or filesystem path for GA4 provisioning (paths, website_url, agent hints). |
| sync_ga4_to_launcher_registryA | Write GA4 metadata to launcher registry project.analytics.ga4 (requires writable env). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| workflow_resource |
TDQS
Scored across 14 tools
Most tools have distinct purposes (e.g., creating a property vs. creating a web stream vs. scaffolding Next.js). However, provision_ga4_property and provision_project_ga4_setup partially overlap, but descriptions clarify the latter is end-to-end.
Tool names consistently use snake_case and follow a verb_noun pattern (e.g., create_, get_, list_, provision_). Minor inconsistency between 'get' and 'list' for similar lookup operations, but overall patterns are predictable.
14 tools cover the GA4 provisioning and integration domain without unnecessary redundancy. Each tool addresses a specific task, and the count feels well-scoped for a focused server.
The tool set covers the main lifecycle: listing accounts, creating properties and streams, injecting gtags, and scaffolding Next.js. Missing update/delete operations, but these are less common in initial setup workflows.