cloud-infrastructure

Gemini Cloud Assist

by googlecloudplatform

Connect Gemini Cloud Assist to Google Cloud APIs for speech to text, speech recognition, and Drive management via natura

Connect to Gemini Cloud Assist APIs, enabling you to manage and troubleshoot your Google Cloud environment using natural language.

github stars

53

Natural language troubleshooting interfaceOfficial Google Cloud integration

best for

  • / Google Cloud engineers troubleshooting complex infrastructure issues
  • / DevOps teams needing root cause analysis for cloud problems
  • / Cloud administrators managing Google Cloud environments

capabilities

  • / Create Cloud Assist investigations for troubleshooting
  • / Run investigations and get automated analysis reports
  • / Fetch existing investigation data and results
  • / Add user observations to refine ongoing investigations

what it does

Connects to Google Cloud's Gemini Cloud Assist APIs to create, run, and manage troubleshooting investigations for your Google Cloud environment using natural language.

about

Gemini Cloud Assist is an official MCP server published by googlecloudplatform that provides AI assistants with tools and capabilities via the Model Context Protocol. Connect Gemini Cloud Assist to Google Cloud APIs for speech to text, speech recognition, and Drive management via natura It is categorized under cloud infrastructure. This server exposes 4 tools that AI clients can invoke during conversations and coding sessions.

how to install

You can install Gemini Cloud Assist in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

Apache-2.0

Gemini Cloud Assist is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Gemini Cloud Assist MCP server

npm @google-cloud/gemini-cloud-assist-mcp package

This server connects Model Context Protocol (MCP) clients such as the Gemini CLI to the Gemini Cloud Assist APIs. It allows you to use natural language to understand, manage, and troubleshoot your Google Cloud environment directly from the local command line.

[!NOTE] The Google Cloud Platform Terms of Service (available at https://cloud.google.com/terms/) and the Data Processing and Security Terms (available at https://cloud.google.com/terms/data-processing-terms) do not apply to any component of the Gemini Cloud Assist MCP Server software.

To learn more about Gemini Cloud Assist, see the Gemini Cloud Assist overview in the Google Cloud documentation.

✨ Key features

  • Create and run investigations: Create and run Cloud Assist investigations to find the root cause of complex issues.
  • Dig deeper and iterate on investigations: Get more details about investigation outcomes and add observations to refine the analysis.

Quick start

Before you begin, ensure you have the following set up:

  • Node.js (v20 or later).
  • Git.
  • Google Cloud SDK installed and configured.
  • A Google Cloud project.
  • The following IAM roles on your user account:
    • roles/serviceusage.serviceUsageAdmin: Required to enable the Cloud Assist APIs.
    • roles/geminicloudassist.user: Required to make requests to the Cloud Assist APIs.

Step 1: Authenticate to Google Cloud

The Gemini Cloud Assist MCP server uses local Application Default Credentials (ADC) to securely authenticate to Google Cloud. To set up ADC, run the following gcloud commands:

# Authenticate your user account to the gcloud CLI
gcloud auth login

# Set up Application Default Credentials for the server.
# This allows the MCP server to securely make Google Cloud API calls on your behalf.
gcloud auth application-default login

Step 2: Configure your MCP client

Below is the standard configuration snippet you will use. It tells the client to use npx to download and run the latest version of the MCP server on demand. Paste the MCP configuration to an MCP client of your choosing. We recommend using the Gemini CLI for the best experience.

MCP config

"mcpServers" : {
   "GeminiCloudAssist": {
     "command": "npx",
     "args": ["-y", "@google-cloud/gemini-cloud-assist-mcp@latest"],
     "timeout": 600000
   }
}

Setup instructions for MCP clients

Gemini CLI

Option 1 (recommended): Extension installation

Install the MCP server as a Gemini CLI extension:

gemini extensions install https://github.com/GoogleCloudPlatform/gemini-cloud-assist-mcp

Validate successful installation by running:

gemini extensions list

Option 2: Global installation

Add the MCP config to the ~/.gemini/settings.json. This gives you access to MCP Tools in every Gemini CLI session.

Option 3: Project-level installation

Add the MCP config to your /path/to/project/.gemini/settings.json file. This gives you access to the MCP Tools in Gemini CLI sessions created under this project folder only.

Cursor

Install MCP Server

Claude Desktop

  • Launch the Claude Desktop application.
  • Navigate to Settings > Developer.
  • Click the Edit config button to open the claude_desktop_config.json file.
  • Add the MCP config to the claude_desktop_config.json file.
  • Save the file and restart Claude Desktop.

Claude Code

claude mcp add GeminiCloudAssist npx -y @google-cloud/gemini-cloud-assist-mcp@latest

Follow detailed instructions on Anthropic's documentation for more information.

Cline

Update cline_mcp_settings.json with the MCP config.

Follow detailed instructions on Cline's website for more information.

🛠️ MCP tools

  • create_investigation: Creates a new Gemini Cloud Assist investigation.
  • run_investigation: Runs an existing Gemini Cloud Assist investigation that you created.
  • add_observation: Adds a new observation to an existing investigation to refine its analysis.
  • fetch_investigation: Get investigation details or list investigations in your project.

Examples

This section shows examples of the tasks you can perform with the Cloud Assist MCP server with the Gemini CLI, including example prompts and responses.

<details> <summary>Create and run investigations</summary>
Using 1 MCP server (Ctrl+T to view descriptions)

╭───────────────────────────────────────────────────────────────────────────────────╮
│  > Investigate the pending pods issue in my test-cluster-1 cluster                │
╰───────────────────────────────────────────────────────────────────────────────────╯

✦ I can help with that. I'll start an investigation into the pending pods issue in
  your test-cluster-1 cluster. To do that, I'll run a few commands to get the
  information I need to start the investigation.
 ╭──────────────────────────────────────────────────────────────────────────────────╮
 │ ✔  Shell gcloud config get-value project (Getting the configured GCP project.)   |
 ...                                                                                |
 ...                                                                                |
 ╰──────────────────────────────────────────────────────────────────────────────────╯

✦ I'll now create an investigation into the pending pods issue in your test-cluster-1 GKE cluster.
 ╭──────────────────────────────────────────────────────────────────────────────────╮
 │ ✔  create_investigation (gemini-cloud-assist-mcp MCP Server) create_investigati… │
 │                                                                                  │
 │    ## Gemini Cloud Assist Investigation                                          │
 │                                                                                  │
 │    **Name**: [Gemini CLI] Pending pods in test-cluster-1 GKE cluster             │
 ...                                                                                |
 ...                                                                                |
 ╰──────────────────────────────────────────────────────────────────────────────────╯

✦ I've created the investigation. Now I'll run it to analyze the issue.
 ╭──────────────────────────────────────────────────────────────────────────────────╮
 │ ✔  run_investigation (gemini-cloud-assist-mcp MCP Server) run_investigation (ge… │
 ...                                                                                |
 ...                                                                                |
 ╰──────────────────────────────────────────────────────────────────────────────────╯

✦ The investigation is complete. Here's what I found:

  The main problem is that your GKE cluster `test-cluster-1` is out of resources. It
  has only one node, and that node is full. This is causing new pods to get stuck in
  a "pending" state because there's no room for them.

  The investigation also revealed that Node Auto-Provisioning (NAP) is disabled. This
   is a key feature that allows the cluster to automatically add more nodes when it's
   running low on resources. Because NAP is disabled, the cluster can't scale up to
  meet the demand.

  I have two recommendations to fix this:
   1. Enable Node Auto-Provisioning for the test-cluster-1 cluster. This is the best
      long-term solution because it will allow the cluster to automatically scale up
      and down as needed.
   2. Manually add more nodes to the cluster. This is a good short-term solution that
       will immediately relieve the resource pressure and allow the pending pods to
      be scheduled.

  I recommend that you start by enabling Node Auto-Provisioning. I can do this for
  you now, or you can do it yourself by following the instructions in the official
  documentation (https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-pro
  visioning#enable).

  What would you like to do?
</details> <details> <summary>Dig deeper and iterate on investigations</summary>
✦ The investigation is complete. Here's a summary of the findings:

  Primary Cause:

   * Ephemeral Storage Exhaustion: The main reason for the pod crashes is
     that the GKE nodes are running out of ephemeral storage. This is
     causing a DiskPressure condition on the nodes, which in turn leads to
     the kubelet evicting pods to free up space.

 ╭───────────────────────────────────────────────────────────────────────────────────╮
 │  > Do you know which pod is consuming all the storage space?                      │
 ╰───────────────────────────────────────────────────────────────────────────────────╯

✦ That's a great question. The investigation points to the emptyDir volume
  in the gke-00

---