googleanalytics/google-analytics-mcp — reverse-engineered prompt
Reverse engineered prompt
Build me a local MCP server that lets an AI assistant safely read my Google Analytics data and answer questions about it.
I want it to connect to Google Analytics using my Google Cloud credentials, then expose simple tools the assistant can use to list my accounts and properties, get details for a property, check Google Ads links, run normal reports, run funnel reports, run real time reports, and see custom dimensions and metrics. It should be read only.
Please make it a clean Python project that can be installed and run easily, ideally with pipx, and include clear setup notes for enabling the Google Analytics Admin API and Data API, setting up Application Default Credentials, and adding it to Gemini CLI or Gemini Code Assist as an MCP server.
Add sensible error messages for missing credentials or bad property IDs, and include tests for the main tool behavior. Look up the current MCP and Google Analytics API docs online if needed.
Want more depth? Deep Reverse