GCP MCP Server
Manage Google Cloud Platform resources through your AI assistant - Compute Engine, Cloud Run, GKE, and more.
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
| Tool | Purpose | Category |
|---|---|---|
list_instances | List Compute Engine instances | Compute |
list_gke_clusters | List GKE clusters | Containers |
list_cloud_run | List Cloud Run services | Serverless |
list_storage_buckets | List Cloud Storage buckets | Storage |
list_sql_instances | List Cloud SQL instances | Databases |
get_logs | Query Cloud Logging | Monitoring |
list_functions | List Cloud Functions | Serverless |
list_vpcs | List VPC networks | Networking |
Common Workflows
Investigating a Production Issue
- Check which Cloud Run services are showing high CPU or errors
- Query Cloud Logging for recent error logs
- Inspect the affected service's configuration and scaling settings
- Check GKE cluster status if the service runs on Kubernetes
- Ask "Summarize what's failing and recommend fixes based on the logs"
Cost Optimization Review
- List all Compute Engine instances across projects
- Identify idle or underutilized instances
- Check Cloud SQL instances for unnecessary backups or over-provisioning
- Review Cloud Storage buckets for unused or oversized objects
- Generate a cost optimization report with recommendations
Infrastructure Audit
- List all resources across compute, storage, and networking
- Check IAM permissions on critical resources
- Identify publicly accessible storage buckets
- Review VPC firewall rules for overly permissive configurations
- 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
| Issue | Likely Cause | Solution |
|---|---|---|
| "Project not found" | Wrong GCP project ID configured | Check the GCP_PROJECT environment variable |
| "Permission denied" | Insufficient IAM permissions | Ensure service account has required roles on the project |
| "API not enabled" | Required GCP API not activated | Enable the relevant API in GCP Console |
| "Quota exceeded" | Resource quota limit reached | Request quota increase or clean up unused resources |
Prerequisites
- Google Cloud SDK (gcloud) installed
- Application Default Credentials configured
- Appropriate IAM permissions for target resources
Related Articles
CoinGecko MCP Server
CoinGecko MCP server provides comprehensive cryptocurrency market data including real-time prices, trending coins, trading volume, and market capitalization rankings.
Content and Media MCP Servers
Explore seamless integration with leading content management systems, media processing tools, and digital asset management platforms through our Content & Media category. These integrations enable robust content creation, media processing, and asset management for your AI-powered applications.
Google Sheets MCP Server
Read, write, create, and manage Google Sheets through AI assistants with 19 tools for data operations, charts, sharing, and batch updates.