Setting up the Google Cloud MCP Server (gcloud-mcp)

Install Google's official Google Cloud MCP server via npx or as a Gemini CLI extension, choose sub-servers, and run your first agent prompts against the gcloud CLI.

  • Skill Road
  • Setting up the Google Cloud MCP Server (gcloud-mcp)

Published on 21.09.2026

This guide walks through setting up Google's official Google Cloud MCP server (gcloud-mcp) so an AI assistant can control Google Cloud resources in natural language through the gcloud CLI.

Prerequisites

Node.js version 20 or later (node --version)
An installed and authenticated gcloud CLI (gcloud auth login)
An MCP-capable AI client (Gemini CLI, Claude Desktop, Cline, Cursor, VS Code, or similar)

Run from your home directory:

npx @google-cloud/gcloud-mcp init --agent=gemini-cli

This registers the server as a Gemini CLI extension available across all projects. Verify the setup with:

gemini mcp list

Option 2: Other MCP clients (Claude Desktop, Cline, Cursor, VS Code)

Add the following block to the client's MCP configuration file:

{
  "mcpServers": {
    "gcloud": {
      "command": "npx",
      "args": ["-y", "@google-cloud/gcloud-mcp"]
    }
  }
}

The three other sub-servers can be added as needed, each as its own entry with the matching package name:

{
  "mcpServers": {
    "gcloud": {
      "command": "npx",
      "args": ["-y", "@google-cloud/gcloud-mcp"]
    },
    "observability": {
      "command": "npx",
      "args": ["-y", "@google-cloud/observability-mcp"]
    },
    "storage": {
      "command": "npx",
      "args": ["-y", "@google-cloud/storage-mcp"]
    },
    "backupdr": {
      "command": "npx",
      "args": ["-y", "@google-cloud/backupdr-mcp"]
    }
  }
}

In VS Code, the root key is servers instead of mcpServers inside .vscode/mcp.json.

Verify your installation

After setup, refresh the tools list in the AI client and send a simple test prompt, for example:

List my Google Cloud projects.

If the agent returns a project list, the server is active and correctly authenticated.

Example prompts

"Show the last 20 error log entries in project <project-id> from the last hour"
"List all objects in bucket <bucket-name>"
"Which backup vaults exist in the europe-west3 region?"
"Create a new bucket <name> in the europe-west1 region"

Security guidance

Use a restricted account — For production setups, use a service account with minimal permissions via impersonation rather than a personal account with full access.

Deliberately enable write tools — Tools like delete_bucket, delete_backup_vault, or restore_backup perform real changes. Check whether the agent actually needs these tools before production use.

Mind the preview status — Google explicitly states this project is not an officially supported solution covered by the Google Cloud Terms of Service. For business-critical automation, test with restricted accounts before a broad rollout.

Watch the data path to the model — Log, object, and configuration content is forwarded to the AI client and from there to the model provider. Do not let secrets or personal data flow uncontrolled through the agent.

Troubleshooting

Server does not connect — Check gcloud auth list for an active account. Re-authenticate with gcloud auth login if needed.

Command gets rejected — The core gcloud server deliberately blocks certain commands (such as interactive sessions). This is intentional, not a bug.

Node.js version too old — Check node --version; version 20 or later is required.

Published on 21.09.2026

Categories

Frequently asked questions

Is the Google Cloud MCP Server officially from Google?

Yes, the project lives in the official googleapis GitHub organization, is maintained by an internal Google Cloud SDK team, and its npm packages are published from Google's official publishing account. However, the README explicitly notes it is a preview-stage solution, not an officially supported product with an SLA.

What does the Google Cloud MCP Server cost?

The server itself is free and open source (Apache 2.0 license). Costs only arise from Google Cloud resources actually consumed, such as compute, storage, or observability queries, at standard Google Cloud pricing.

Do I have to install all four sub-servers?

No. The four sub-servers, gcloud, observability, storage, and backupdr, are published separately on npm and can be enabled independently. If you only need storage tools, you only need to set up the storage sub-server.

How is this different from other Google Cloud MCP servers in the catalog?

This entry describes the locally running, open-source gcloud-mcp from the googleapis repository, covering the gcloud CLI, observability, storage, and backup/DR. Google separately operates product-specific hosted remote servers for individual services such as BigQuery or Cloud SQL, some of which are already listed as their own catalog entries.

What permissions does the server have in my Google Cloud account?

The server inherits exactly the permissions of the currently signed-in gcloud account. For production setups, Google recommends a service account with a restricted role rather than a personal account with broad permissions.