home / mcp / cloud run mcp server

Cloud Run MCP Server

MCP server to deploy apps to Cloud Run

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "googlecloudplatform-cloud-run-mcp": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "ALLOWED_HOSTS": "localhost,127.0.0.1",
        "SKIP_IAM_CHECK": "false",
        "GOOGLE_CLOUD_REGION": "us-central1",
        "DEFAULT_SERVICE_NAME": "my-service",
        "GOOGLE_CLOUD_PROJECT": "my-project",
        "ENABLE_HOST_VALIDATION": "false",
        "GOOGLE_APPLICATION_CREDENTIALS": "~/.config/gcloud/application_default_credentials.json"
      }
    }
  }
}

You can deploy and manage MCP-compatible AI agents for Google Cloud Run using the Cloud Run MCP server. This setup lets you run, configure, and scale Cloud Run services from AI-powered tools and clients, enabling streamlined deployment workflows and centralized control over your Cloud Run resources.

How to use

You connect your MCP client to the Cloud Run MCP server using either a local runtime or a remote Cloud Run deployment. Use the local Node.js/NPX-based setup for development or AI-assisted IDEs, or deploy the MCP server to Cloud Run and access it remotely with IAM-based authentication. Once connected, you can deploy code, view service details, and monitor logs from your MCP client or agent.

How to install

Prerequisites: ensure you have Node.js (LTS is recommended) and the Google Cloud SDK installed on your machine. You will also need access to a Google Cloud project and appropriate permissions to manage Cloud Run resources.

Step 1: Install Google Cloud SDK and authenticate.

gcloud auth login

gcloud auth application-default login

Step 2: Configure your local environment for Cloud Run MCP using Node.js.

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

Additional configuration and usage notes

You can also run and manage the MCP server from Docker or deploy it to Cloud Run for remote access. When running locally, you may set default environment values to simplify commands and ensure consistent naming.

Configuration examples and security notes

If you plan to run remotely on Cloud Run, you will deploy the MCP server with IAM-based authentication, making it private by default. You can optionally predefine the default service name, project, and region for easier deployments.

Available tools

deploy-file-contents

Deploys files directly to Cloud Run by providing their contents.

list-services

Lists Cloud Run services within a project and region.

get-service

Retrieves details for a specific Cloud Run service.

get-service-log

Fetches logs and error messages for a specific Cloud Run service.

deploy-local-folder

Deploys a local folder to a Google Cloud Run service.

list-projects

Lists available Google Cloud projects.

create-project

Creates a new Google Cloud project and attaches it to the first available billing account.