1- # Google Analytics MCP Server
1+ # Google Analytics MCP Server (Experimental)
22
33This repo contains the source code for running a local
44[ MCP] ( https://modelcontextprotocol.io ) server that interacts with APIs for
@@ -15,37 +15,37 @@ to provide several
1515
1616### Retrieve account and property information :orange_circle :
1717
18- * ` get_account_summaries ` : Retrieves information about the user's Google
19- Analytics accounts and properties.
20- * ` get_property_details ` : Returns details about a property.
21- * ` list_google_ads_links ` : Returns a list of links to Google Ads accounts for
22- a property.
18+ - ` get_account_summaries ` : Retrieves information about the user's Google
19+ Analytics accounts and properties.
20+ - ` get_property_details ` : Returns details about a property.
21+ - ` list_google_ads_links ` : Returns a list of links to Google Ads accounts for
22+ a property.
2323
2424### Run core reports :orange_book :
2525
26- * ` run_report ` : Run a Google Analytics report using the Data API.
27- * ` get_dimensions ` : Retrieves Core Reporting Dimensions for a specific
28- property, including its custom dimensions.
29- * ` get_metrics ` : Retrieves Core Reporting Metrics for a specific property,
30- including its custom dimensions.
31- * ` get_standard_dimensions ` : Returns a list of standard dimensions.
32- * ` get_standard_metrics ` : Returns a list of standard metrics.
33- * ` run_report_date_ranges_hints ` : Provides hints about the expected values
34- for the ` date_ranges ` argument for the ` run_report ` tool.
35- * ` run_report_metric_filter_hints ` : Provides hints about the expected values
36- for the metric_filter argument for the ` run_report ` and
37- ` run_realtime_report ` tools.
38- * ` run_report_dimension_filter_hints ` : Provides hints about the expected
39- values for the dimension_filter argument for the ` run_report ` and
40- ` run_realtime_report ` tools.
26+ - ` run_report ` : Run a Google Analytics report using the Data API.
27+ - ` get_dimensions ` : Retrieves Core Reporting Dimensions for a specific
28+ property, including its custom dimensions.
29+ - ` get_metrics ` : Retrieves Core Reporting Metrics for a specific property,
30+ including its custom dimensions.
31+ - ` get_standard_dimensions ` : Returns a list of standard dimensions.
32+ - ` get_standard_metrics ` : Returns a list of standard metrics.
33+ - ` run_report_date_ranges_hints ` : Provides hints about the expected values
34+ for the ` date_ranges ` argument for the ` run_report ` tool.
35+ - ` run_report_metric_filter_hints ` : Provides hints about the expected values
36+ for the metric_filter argument for the ` run_report ` and
37+ ` run_realtime_report ` tools.
38+ - ` run_report_dimension_filter_hints ` : Provides hints about the expected
39+ values for the dimension_filter argument for the ` run_report ` and
40+ ` run_realtime_report ` tools.
4141
4242### Run realtime reports :hourglass_flowing_sand :
4343
44- * ` run_realtime_report ` : Run a Google Analytics realtime report using the
45- Data API.
46- * ` get_realtime_dimensions ` : Retrieves the list of realtime reporting
47- dimensions.
48- * ` get_realtime_metrics ` : Retrieves the list of realtime metrics.
44+ - ` run_realtime_report ` : Run a Google Analytics realtime report using the
45+ Data API.
46+ - ` get_realtime_dimensions ` : Retrieves the list of realtime reporting
47+ dimensions.
48+ - ` get_realtime_metrics ` : Retrieves the list of realtime metrics.
4949
5050## Setup instructions
5151
@@ -77,7 +77,6 @@ Navigate to the `analytics-mcp` directory, then complete the following steps.
7777 pip install .
7878 ` ` `
7979
80-
8180# ## Configure credentials :key:
8281
8382Configure your [Application Default Credentials
@@ -93,7 +92,7 @@ https://www.googleapis.com/auth/analytics.readonly
9392
9493Here are some sample `gcloud` commands you might find useful:
9594
96- * Set up ADC using user credentials and an OAuth web client after
95+ - Set up ADC using user credentials and an OAuth web client after
9796 downloading the client JSON to `YOUR_WEB_CLIENT_JSON_FILE`.
9897
9998 ```shell
@@ -102,7 +101,7 @@ Here are some sample `gcloud` commands you might find useful:
102101 --client-id-file=YOUR_WEB_CLIENT_JSON_FILE
103102 ```
104103
105- * Set up ADC using service account impersonation.
104+ - Set up ADC using service account impersonation.
106105
107106 ``` shell
108107 gcloud auth application-default login \
@@ -187,31 +186,31 @@ Launch Gemini Code Assist or Gemini CLI and type `/mcp`. You should see
187186
188187Here are some sample prompts to get you started:
189188
190- * Ask what the server can do:
189+ - Ask what the server can do:
191190
192191 ` ` `
193192 what can the analytics-mcp server do?
194193 ` ` `
195194
196- * Ask about a Google Analytics property
195+ - Ask about a Google Analytics property
197196
198197 ` ` `
199198 Give me details about my Google Analytics property with ' xyz' in the name
200199 ` ` `
201200
202- * Prompt for analysis:
201+ - Prompt for analysis:
203202
204203 ` ` `
205204 what are the most popular events in my Google Analytics property in the last 180 days?
206205 ` ` `
207206
208- * Ask about signed-in users:
207+ - Ask about signed-in users:
209208
210209 ` ` `
211210 were most of my users in the last 6 months logged in?
212211 ` ` `
213212
214- * Ask about property configuration:
213+ - Ask about property configuration:
215214
216215 ` ` `
217216 what are the custom dimensions and custom metrics in my property?
0 commit comments