GCP MCP Server

Manage Google Cloud Platform resources through your AI assistant - Compute Engine, Cloud Run, GKE, and more.

April 14, 2026
MCP ServerDevelopment Tools & DevOpsGCP MCP Server

GCP MCP Server

Manage Google Cloud Platform infrastructure from your AI assistant. The GCP MCP server enables natural language management of Google Cloud resources, from Compute Engine instances to Cloud Run services, GKE clusters, and Cloud Storage.

This server is designed for cloud engineers managing multi-project GCP environments, developers deploying serverless applications on Cloud Run, and platform teams maintaining GKE clusters across their organization.

What it Does

  • Compute Management: VM instances, instance groups, and autoscaling
  • Container Services: GKE clusters, Cloud Run services, and Cloud Functions
  • Storage: Cloud Storage buckets, Cloud SQL, and Firestore
  • Networking: VPC, load balancers, and Cloud CDN
  • Monitoring: Cloud Logging and Cloud Monitoring integration

Installation

# Using npx
npx -y @anthropic-ai/mcp-server-gcp

# Using Docker
docker run -i --rm -v ~/.config/gcloud:/root/.config/gcloud mcp/gcp

Configuration

{
  "mcpServers": {
    "gcp": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-server-gcp"],
      "env": {
        "GCP_PROJECT": "my-project-id",
        "GOOGLE_APPLICATION_CREDENTIALS": "${HOME}/.config/gcloud/application_default_credentials.json"
      }
    }
  }
}

Available Tools

ToolPurposeCategory
list_instancesList Compute Engine instancesCompute
list_gke_clustersList GKE clustersContainers
list_cloud_runList Cloud Run servicesServerless
list_storage_bucketsList Cloud Storage bucketsStorage
list_sql_instancesList Cloud SQL instancesDatabases
get_logsQuery Cloud LoggingMonitoring
list_functionsList Cloud FunctionsServerless
list_vpcsList VPC networksNetworking

Common Workflows

Investigating a Production Issue

  1. Check which Cloud Run services are showing high CPU or errors
  2. Query Cloud Logging for recent error logs
  3. Inspect the affected service's configuration and scaling settings
  4. Check GKE cluster status if the service runs on Kubernetes
  5. Ask "Summarize what's failing and recommend fixes based on the logs"

Cost Optimization Review

  1. List all Compute Engine instances across projects
  2. Identify idle or underutilized instances
  3. Check Cloud SQL instances for unnecessary backups or over-provisioning
  4. Review Cloud Storage buckets for unused or oversized objects
  5. Generate a cost optimization report with recommendations

Infrastructure Audit

  1. List all resources across compute, storage, and networking
  2. Check IAM permissions on critical resources
  3. Identify publicly accessible storage buckets
  4. Review VPC firewall rules for overly permissive configurations
  5. Generate a security posture summary

Example Prompts

  • "List all GKE clusters in my project"
  • "Show me Cloud Run services with high CPU"
  • "What Cloud Storage buckets exist?"
  • "Check Cloud SQL instances for backups"
  • "Show logs from the backend service"
  • "Find all resources tagged with environment:production"

Troubleshooting

IssueLikely CauseSolution
"Project not found"Wrong GCP project ID configuredCheck the GCP_PROJECT environment variable
"Permission denied"Insufficient IAM permissionsEnsure service account has required roles on the project
"API not enabled"Required GCP API not activatedEnable the relevant API in GCP Console
"Quota exceeded"Resource quota limit reachedRequest quota increase or clean up unused resources

Prerequisites

  • Google Cloud SDK (gcloud) installed
  • Application Default Credentials configured
  • Appropriate IAM permissions for target resources