ruchernchong_mcp-server-google-analytics

ruchernchong_mcp-server-google-analytics

0

The Google Analytics MCP Server is a Model Context Protocol server designed to access and analyze Google Analytics 4 data. It offers features such as tracking page views, user behavior, and events over customizable date ranges. The server is built with security best practices and requires specific Google Cloud credentials to operate.

Google Analytics MCP Server

An MCP server implementation for accessing Google Analytics 4 (GA4) data using the Model Context Protocol TypeScript SDK.

Features

  • Get page view metrics with customizable dimensions
  • Track active and new users over time
  • Analyze specific events and their metrics
  • Monitor user behavior metrics (session duration, bounce rate)
  • Flexible date range selection for all queries

Prerequisites

  • Node.js 20 or higher
  • Google Analytics 4 property
  • Google Cloud project with Analytics Data API enabled
  • Service account credentials with appropriate permissions

Setup

  1. Create a Google Cloud project and enable the Analytics Data API
  2. Create a service account and download the credentials JSON file
  3. Grant the service account appropriate access to your GA4 property
  4. Set up environment variables

Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License.