GCP MCP Server

Manage Google Cloud Platform resources through your AI assistant using the official gcloud MCP server.

October 19, 2026
MCP ServerDevelopment Tools & DevOpsGCP MCP Server

GCP MCP Server

This page documents Google Cloud's gcloud MCP server, googleapis/gcloud-mcp. It is published on npm as @google-cloud/gcloud-mcp.

The server lets an AI assistant run gcloud CLI commands against the active Google Cloud account. Its permissions are tied to that account, and it blocks commands that do not make sense for AI agents, such as commands that run arbitrary inputs or start interactive sessions.

What it Does

  • Natural language gcloud: Describe the outcome and the server runs the corresponding gcloud CLI command
  • Resource queries and changes: Inspect and modify Google Cloud resources using the active account's permissions
  • Command restrictions: Denies interactive and arbitrary-input commands by default
  • Account-scoped permissions: Inherits the permissions of the authenticated gcloud account

Installation

# Using npx
npx -y @google-cloud/gcloud-mcp

To install the server as a Gemini CLI extension for the current user:

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

Configuration

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

The server uses the active gcloud CLI account; the upstream README does not document any environment variables for it.

Available Tools

ToolPurposeCategory
run_gcloud_commandExecutes a gcloud command; some commands are restricted by the serverGoogle Cloud

See the upstream repository for the list of denied commands.

Common Workflows

Listing Resources

  1. Ask the server to run the gcloud command that lists the resource type you need
  2. Review the returned output
  3. Ask a follow-up that narrows the query by project, region, or filter
  4. Use the result to decide on the next command

Querying Logs

  1. Ask the server to read Cloud Logging entries for the target project
  2. Narrow the request by time range, severity, or resource
  3. Ask for a summary of the returned entries

Inspecting Billing

  1. Ask the server to list billing accounts or query billing information
  2. Ask for a summary of current costs or budgets

Example Prompts

  • "List all my GCP projects"
  • "List the GKE clusters in my current project"
  • "Show me all Cloud SQL instances"
  • "Read the recent error logs from my Cloud Run service"
  • "What is my current billing status?"

Troubleshooting

IssueLikely CauseSolution
"gcloud: command not found"gcloud CLI is not installed or not on PATHInstall the gcloud CLI and confirm it runs in the same environment as the MCP client
Node version errorNode.js is older than 20Upgrade to Node.js 20 or newer
"Permission denied"The active gcloud account lacks the IAM permissionGrant the required role to the active account
Command is deniedThe server blocks commands that run arbitrary inputs or start interactive sessionsUse a non-interactive gcloud command; see the denied-command list

Prerequisites

  • Node.js 20 or newer
  • Google Cloud SDK (gcloud) installed
  • An authenticated gcloud account
  • Appropriate IAM permissions for the target resources

Sources