cloud-run
Google Cloud Run deployment and management. Deploy applications, list services, get logs, and manage GCP projects. Use for Cloud Run deployments, service monitoring, and GCP project management.
When & Why to Use This Skill
The Cloud Run skill empowers developers and DevOps engineers to manage Google Cloud Run services and GCP projects directly within Claude. It streamlines the deployment process—supporting local folders, file contents, and container images—while providing instant access to service logs and project metadata for efficient cloud resource orchestration and serverless application management.
Use Cases
- Rapid Deployment: Seamlessly deploy microservices or web applications to Google Cloud Run from local source code, specific file contents, or existing container images using natural language commands.
- Infrastructure Monitoring & Troubleshooting: Instantly retrieve real-time logs and detailed service statuses to diagnose deployment errors and monitor the health of production environments.
- GCP Project Orchestration: Efficiently list, create, and manage Google Cloud projects and billing attachments to organize multi-tenant or multi-environment infrastructures without leaving the chat interface.
- DevOps Workflow Automation: Simplify complex cloud management tasks by using AI to query service lists across different regions and manage service configurations with ~90% context savings compared to manual MCP tool usage.
| name | cloud-run |
|---|---|
| description | Google Cloud Run deployment and management. Deploy applications, list services, get logs, and manage GCP projects. Use for Cloud Run deployments, service monitoring, and GCP project management. |
| version | 1.0.0 |
| context | fork: true |
| allowed-tools | read, write, bash |
Cloud Run Skill
Overview
This skill provides access to the Google Cloud Platform Cloud Run MCP server with progressive disclosure for optimal context usage.
Context Savings: ~90% reduction
- MCP Mode: ~15,000 tokens always loaded (7 tools + prompts)
- Skill Mode: ~300 tokens metadata + on-demand loading
Requirements
- Node.js 18+ OR Docker installed and running
- Google Cloud credentials configured via
gcloud auth application-default login - Optional:
GOOGLE_CLOUD_PROJECTandGOOGLE_CLOUD_REGIONenvironment variables
Tools
The server provides 8 tools across deployment and management categories:
Deployment Tools
| Tool | Description | Mode |
|---|---|---|
deploy-file-contents |
Deploy files to Cloud Run by providing contents directly | Local + Remote |
deploy-local-folder |
Deploy a local folder to Cloud Run | Local only |
deploy-container-image |
Deploy a container image URL to Cloud Run | Local + Remote |
Service Management Tools
| Tool | Description | Mode |
|---|---|---|
list-services |
List Cloud Run services in a project/region | Local + Remote |
get-service |
Get details for a specific Cloud Run service | Local + Remote |
get-service-log |
Get logs and errors for a specific service | Local + Remote |
Project Management Tools (Local Only)
| Tool | Description |
|---|---|
list-projects |
List available GCP projects |
create-project |
Create a new GCP project and attach to billing |
Quick Reference
# List available tools
python executor.py --list
# List Cloud Run services
python executor.py --tool list-services --args '{"projectId": "my-project", "region": "us-central1"}'
# Get service details
python executor.py --tool get-service --args '{"projectId": "my-project", "region": "us-central1", "serviceName": "my-service"}'
# Get service logs
python executor.py --tool get-service-log --args '{"projectId": "my-project", "region": "us-central1", "serviceName": "my-service"}'
# Deploy file contents
python executor.py --tool deploy-file-contents --args '{"projectId": "my-project", "region": "us-central1", "serviceName": "my-service", "files": [{"path": "main.py", "contents": "..."}]}'
# List GCP projects
python executor.py --tool list-projects
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
GOOGLE_CLOUD_PROJECT |
Default GCP project ID | None |
GOOGLE_CLOUD_REGION |
Default Cloud Run region | us-central1 |
DEFAULT_SERVICE_NAME |
Default service name for deployments | None |
SKIP_IAM_CHECK |
Skip IAM permission validation | false |
ENABLE_HOST_VALIDATION |
Enable Host header validation | false |
Setup
Authenticate with GCP:
gcloud auth application-default loginSet default project (optional):
export GOOGLE_CLOUD_PROJECT=my-project-id export GOOGLE_CLOUD_REGION=us-central1Use the skill:
python .claude/skills/cloud-run/executor.py --list
Prompts
The MCP server also provides natural language prompts:
| Prompt | Description |
|---|---|
deploy |
Deploy current working directory to Cloud Run |
logs |
Get logs for a Cloud Run service |
Tool Details
deploy-file-contents
Deploy files to Cloud Run by providing their contents directly.
Parameters:
projectId(string, required): GCP project IDregion(string, required): Cloud Run regionserviceName(string, required): Name for the Cloud Run servicefiles(array, required): Array of file objects withpathandcontents
Example:
{
"projectId": "my-project",
"region": "us-central1",
"serviceName": "my-api",
"files": [
{ "path": "main.py", "contents": "from flask import Flask\napp = Flask(__name__)\n..." },
{ "path": "requirements.txt", "contents": "flask==2.0.0\ngunicorn==20.1.0" }
]
}
list-services
List Cloud Run services in a given project and region.
Parameters:
projectId(string, required): GCP project IDregion(string, optional): Cloud Run region (defaults to configured region)
get-service
Get detailed information about a specific Cloud Run service.
Parameters:
projectId(string, required): GCP project IDregion(string, required): Cloud Run regionserviceName(string, required): Cloud Run service name
get-service-log
Get logs and error messages for a specific Cloud Run service.
Parameters:
projectId(string, required): GCP project IDregion(string, required): Cloud Run regionserviceName(string, required): Cloud Run service namelimit(number, optional): Maximum number of log entries
deploy-local-folder
Deploy a local folder to a Cloud Run service (local mode only).
Parameters:
projectId(string, required): GCP project IDregion(string, required): Cloud Run regionserviceName(string, required): Cloud Run service namefolderPath(string, required): Path to local folder to deploy
list-projects
List available GCP projects (local mode only).
Parameters: None
create-project
Create a new GCP project and attach it to billing (local mode only).
Parameters:
projectId(string, required): Desired project IDprojectName(string, optional): Human-readable project name
Integration with Agents
This skill integrates with the following agents:
- devops: For Cloud Run deployments and infrastructure management
- developer: For deploying applications during development
- architect: For service architecture decisions
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| "Permission denied" | Missing GCP credentials | Run gcloud auth application-default login |
| "Project not found" | Invalid project ID | Verify project ID with gcloud projects list |
| "Region not found" | Invalid region | Use valid Cloud Run regions (e.g., us-central1) |
| "Service not found" | Service doesn't exist | Check service name with list-services |