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. |
Capabilities
Features and capabilities supported by this server
| 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 |
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HappyMonkeyAI/ai-google-analytics-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server