@@ -92,6 +92,14 @@ Here are some sample `gcloud` commands you might find useful:
9292 --scopes=https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform
9393 ```
9494
95+ When the ` gcloud auth application-default ` command completes, copy the
96+ ` PATH_TO_CREDENTIALS_JSON ` file location printed to the console in the
97+ following message. You'll need this for the next step!
98+
99+ ```
100+ Credentials saved to file: [PATH_TO_CREDENTIALS_JSON]
101+ ```
102+
95103### Configure Gemini
96104
971051 . Install [ Gemini
@@ -102,31 +110,8 @@ Here are some sample `gcloud` commands you might find useful:
1021101 . Create or edit the file at ` ~/.gemini/settings.json ` , adding your server
103111 to the ` mcpServers ` list.
104112
105- ``` json
106- {
107- "mcpServers" : {
108- "analytics-mcp" : {
109- "command" : " pipx" ,
110- "args" : [
111- " run" ,
112- " --spec" ,
113- " git+https://github.com/googleanalytics/google-analytics-mcp.git" ,
114- " google-analytics-mcp"
115- ]
116- }
117- }
118- }
119- ```
120-
121- 1 . **Optional:** Configure the `GOOGLE_APPLICATION_CREDENTIALS` environment
122- variable in Gemini settings. You may want to do this if you always want to
123- use a specific set of credentials, regardless of which Application Default
124- Credentials are selected in your current environment.
125-
126- In `~/.gemini/settings.json`, add a `GOOGLE_APPLICATION_CREDENTIALS`
127- attribute to the `env` object. Replace `PATH_TO_ADC_JSON` in the following
128- example with the full path to the ADC JSON file you always want to use for
129- your MCP server.
113+ Replace ` PATH_TO_CREDENTIALS_JSON ` with the path you copied in the previous
114+ step.
130115
131116 We also recommend that you add a ` GOOGLE_CLOUD_PROJECT ` attribute to the
132117 ` env ` object. Replace ` YOUR_PROJECT_ID ` in the following example with the
@@ -145,8 +130,8 @@ Here are some sample `gcloud` commands you might find useful:
145130 " google-analytics-mcp"
146131 ],
147132 "env" : {
148- "GOOGLE_APPLICATION_CREDENTIALS" : " PATH_TO_ADC_JSON " ,
149- "GOOGLE_CLOUD_PROJECT " : " YOUR_PROJECT_ID"
133+ "GOOGLE_APPLICATION_CREDENTIALS" : " PATH_TO_CREDENTIALS_JSON " ,
134+ "GOOGLE_PROJECT_ID " : " YOUR_PROJECT_ID"
150135 }
151136 }
152137 }
0 commit comments