back to home

GoogleCloudPlatform / cloud-run-mcp

MCP server to deploy apps to Cloud Run

560 stars
99 forks
19 issues
JavaScriptDockerfileGo

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing GoogleCloudPlatform/cloud-run-mcp in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/GoogleCloudPlatform/cloud-run-mcp)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Cloud Run MCP server and Gemini CLI extension Enable MCP-compatible AI agents to deploy apps to Cloud Run. Deploy from Gemini CLI and other AI-powered CLI agents: Deploy from AI-powered IDEs: Deploy from AI assistant apps: Deploy from agent SDKs, like the Google Gen AI SDK or Agent Development Kit. > [!NOTE] > This is the repository of an MCP server to deploy code to Cloud Run, to learn how to **host** MCP servers on Cloud Run, visit the Cloud Run documentation. Tools • : Deploys files to Cloud Run by providing their contents directly. • : Lists Cloud Run services in a given project and region. • : Gets details for a specific Cloud Run service. • : Gets Logs and Error Messages for a specific Cloud Run service. • \*: Deploys a local folder to a Google Cloud Run service. • \*: Lists available GCP projects. • \*: Creates a new GCP project and attach it to the first available billing account. A project ID can be optionally specified. _\* only available when running locally_ Prompts Prompts are natural language commands that can be used to perform common tasks. They are shortcuts for executing tool calls with pre-filled arguments. • : Deploys the current working directory to Cloud Run. If a service name is not provided, it will use the environment variable, or the name of the current working directory. • : Gets the logs for a Cloud Run service. If a service name is not provided, it will use the environment variable, or the name of the current working directory. Environment Variables The Cloud Run MCP server can be configured using the following environment variables: | Variable | Description | | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | The default project ID to use for Cloud Run services. | | | The default region to use for Cloud Run services. | | | The default service name to use for Cloud Run services. | | | Controls whether to check for IAM permissions for a Cloud Run service. Set to to enable checks. This is by default which is a recommended way to make the service public. | | | Prevents DNS Rebinding attacks by validating the Host header. This is disabled by default. | | | Comma-separated list of allowed Host headers (if host validation is enabled). The default value is . | Use as a Gemini CLI extension To install this as a Gemini CLI extension, run the following command: • Install the extension: • Log in to your Google Cloud account using the command: • Set up application credentials using the command: Use in MCP Clients Learn how to configure your MCP client Most MCP clients require a configuration file to be created or modified to add the MCP server. The configuration file syntax can be different across clients. Please refer to the following links for the latest expected syntax: • **Antigravity** • **Windsurf** • **VSCode** • **Claude Desktop** • **Cursor** Once you have identified how to configure your MCP client, select one of these two options to set up the MCP server. We recommend setting up as a local MCP server using Node.js. Set up as local MCP server Run the Cloud Run MCP server on your local machine using local Google Cloud credentials. This is best if you are using an AI-assisted IDE (e.g. Cursor) or a desktop AI application (e.g. Claude). • Install the Google Cloud SDK and authenticate with your Google account. • Log in to your Google Cloud account using the command: • Set up application credentials using the command: Then configure the MCP server using either Node.js or Docker: Using Node.js • Install Node.js (LTS version recommended). • Update the MCP configuration file of your MCP client with the following: • [Optional] Add default configurations Using Docker See Docker's MCP catalog, or use these manual instructions: • Install Docker • Update the MCP configuration file of your MCP client with the following: Set up as remote MCP server > [!WARNING] > Do not use the remote MCP server without authentication. In the following instructions, we will use IAM authentication to secure the connection to the MCP server from your local machine. This is important to prevent unauthorized access to your Google Cloud resources. Run the Cloud Run MCP server itself on Cloud Run with connection from your local machine authenticated via IAM. With this option, you will only be able to deploy code to the same Google Cloud project as where the MCP server is running. • Install the Google Cloud SDK and authenticate with your Google account. • Log in to your Google Cloud account using the command: • Set your Google Cloud project ID using the command: • Deploy the Cloud Run MCP server to Cloud Run: When prompted, pick a region, for example . Note that the MCP server is _not_ publicly accessible, it requires authentication via IAM. • [Optional] Add default configurations • Run a Cloud Run proxy on your local machine to connect securely using your identity to the remote MCP server running on Cloud Run: This will create a local proxy on port 3000 that forwards requests to the remote MCP server and injects your identity. • Update the MCP configuration file of your MCP client with the following: If your MCP client does not support the attribute, you can use mcp-remote: Using MCP Server with OAuth Cloud Run MCP server supports OAuth as an authentication mechanism. In order to use OAuth, create the OAuth client, and configure a file with the appropriate values pertaining to your OAuth client. A is provided for reference. The Cloud Run MCP server works seamlessly with Google Cloud SDK OAuth client. In order to leverage the Google Cloud SDK OAuth client, you can use the file as your file as follows: Configure MCP Server on Gemini CLI to use OAuth When the Cloud Run MCP server is started in the OAuth mode, the MCP client should also be configured to use OAuth. You can setup the MCP server in…