An MCP server for accessing Google Analytics 4 data.
An MCP server implementation for accessing Google Analytics 4 (GA4) data, built 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
Available Functions
getPageViews
Get page view metrics for a specific date range:
getActiveUsers
Get active users metrics:
getEvents
Get event metrics:
getUserBehavior
Get user behavior metrics:
Security Considerations
- Always use environment variables for sensitive credentials
- Implement appropriate CORS settings
- Follow the principle of least privilege when setting up service account permissions
- Regularly rotate service account credentials
- Monitor API usage and implement rate limiting if needed
Contributions are welcome!
Installation
The author hasn't published this server yet. Once published, it will be available for installation.
Server Statistics
LicenseMIT
LocalNo
Published12/20/2024