gcloud MCP Server

Runs Google Cloud CLI (gcloud) commands on your behalf through a single MCP tool

Official · Google APIs TypeScript Local · stdio Cloud platformsDeveloper tools

89 popularity score ★ 947 ↓ 63k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add gcloud -- npx -y @google-cloud/gcloud-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "gcloud": {
      "command": "npx",
      "args": [
        "-y",
        "@google-cloud/gcloud-mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "gcloud": {
      "command": "npx",
      "args": [
        "-y",
        "@google-cloud/gcloud-mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "gcloud": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@google-cloud/gcloud-mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.gcloud]
command = "npx"
args = ["-y", "@google-cloud/gcloud-mcp"]
Gemini CLITerminal
gemini mcp add --scope user gcloud npx -- -y @google-cloud/gcloud-mcp

What it does

The gcloud MCP server puts the Google Cloud command-line tool behind one MCP tool. An assistant writes a gcloud command, the server runs it with the gcloud CLI installed on your machine, and returns the output. Anything gcloud can do under your signed-in account is in reach: listing and creating Compute Engine instances, deploying to Cloud Run, changing IAM bindings, reading project settings and so on.

A built-in denylist blocks commands that open interactive sessions or tunnels (compute ssh, cloud-shell ssh, start-iap-tunnel, gcloud interactive and similar). You can pass an absolute path to a JSON file with --config holding either an allow list or a deny list of command prefixes, but not both, to narrow what may run.

The googleapis/gcloud-mcp repository holds three more servers as separate npm packages: observability-mcp (logs, metrics, traces), storage-mcp (Cloud Storage buckets and objects) and backupdr-mcp (Backup and DR). This page covers only @google-cloud/gcloud-mcp. Google marks the repository as preview with possible breaking changes, says it is not an officially supported Google product and that it is not covered by the Google Cloud Terms of Service.

What it needs

RuntimeNode.js 20+

Node.js 20 or newer and the gcloud CLI installed and on the path; the server exits at start if it cannot load gcloud. A Google Cloud account signed in with gcloud auth (or a service account through impersonation), and projects with billing for any resources it creates.

Limits

One tool only: it runs gcloud commands and returns their text output, with no higher-level helpers. Interactive and tunnelling commands (ssh, serial port, IAP tunnels, gcloud interactive, meta) are blocked by default. The allow/deny config file must be given as an absolute path and cannot hold both lists. Preview software that may change without notice, and not covered by Google Cloud support or terms. Local stdio only; there is no hosted endpoint.

Who it suits

Suits developers who already use gcloud and want an assistant to run the same commands across any Google Cloud service with their own credentials. Because it can change anything the account can, it is best run under a limited-role service account or with an allow list. If you only need logs, metrics or Cloud Storage, the sibling observability-mcp or storage-mcp servers in the same repository offer narrower, typed tools; Google's Cloud Run MCP server (cloud-run-mcp) is a narrower choice for deploying to Cloud Run.

Tools 1

run_gcloud_command
Runs a gcloud CLI command, unless the allow or deny list blocks it, and returns its output

Similar servers