GCP MCP Server
Manage Google Cloud Platform resources through your AI assistant using the official gcloud 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
| Tool | Purpose | Category |
|---|---|---|
run_gcloud_command | Executes a gcloud command; some commands are restricted by the server | Google Cloud |
See the upstream repository for the list of denied commands.
Common Workflows
Listing Resources
- Ask the server to run the gcloud command that lists the resource type you need
- Review the returned output
- Ask a follow-up that narrows the query by project, region, or filter
- Use the result to decide on the next command
Querying Logs
- Ask the server to read Cloud Logging entries for the target project
- Narrow the request by time range, severity, or resource
- Ask for a summary of the returned entries
Inspecting Billing
- Ask the server to list billing accounts or query billing information
- 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
| Issue | Likely Cause | Solution |
|---|---|---|
| "gcloud: command not found" | gcloud CLI is not installed or not on PATH | Install the gcloud CLI and confirm it runs in the same environment as the MCP client |
| Node version error | Node.js is older than 20 | Upgrade to Node.js 20 or newer |
| "Permission denied" | The active gcloud account lacks the IAM permission | Grant the required role to the active account |
| Command is denied | The server blocks commands that run arbitrary inputs or start interactive sessions | Use 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
Related Articles & Guides
Accessibility Scanner MCP Server
Accessibility Scanner MCP servers enable AI models to perform WCAG compliance checks, capture annotated screenshots, and generate detailed accessibility reports.
Auth0 MCP Server
Auth0 MCP server enables AI models to interact with Auth0 identity and access management, including applications, APIs, actions, logs, and forms.
AWS MCP Server
Interact with Amazon Web Services through your AI assistant using the AWS API MCP Server.