by GoogleCloudPlatform
Deploy applications to Google Cloud Run using AI‑driven commands and tool integration.
The server enables MCP‑compatible AI agents and developers to deploy code, manage services, and retrieve logs on Google Cloud Run without manual gcloud commands.
npx
command and optional environment variables (project, region, default service name).deploy
and logs
.deploy
, logs
).create-project
tool.Q: Do I need to install the Google Cloud SDK? A: Yes, for authentication and for remote deployment scenarios.
Q: Can I run the server without Docker?
A: Absolutely; the Node.js npx
approach is the recommended and most convenient method.
Q: Is the remote server publicly accessible?
A: No. The remote deployment uses IAM authentication and should be deployed with --no-allow-unauthenticated
.
Q: How do I set default service names?
A: Add DEFAULT_SERVICE_NAME
to the env
section of the MCP configuration.
Q: What if I need custom environment variables?
A: Include them in the env
object of the server configuration.
Enable MCP-compatible AI agents to deploy apps to Cloud Run.
"mcpServers":{
"cloud-run": {
"command": "npx",
"args": ["-y", "@google-cloud/cloud-run-mcp"]
}
}
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.
deploy-file-contents
: Deploys files to Cloud Run by providing their contents directly.list-services
: Lists Cloud Run services in a given project and region.get-service
: Gets details for a specific Cloud Run service.get-service-log
: Gets Logs and Error Messages for a specific Cloud Run service.deploy-local-files
*: Deploys files from the local file system to a Google Cloud Run service.deploy-local-folder
*: Deploys a local folder to a Google Cloud Run service.list-projects
*: Lists available GCP projects.create-project
*: 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 are natural language commands that can be used to perform common tasks. They are shortcuts for executing tool calls with pre-filled arguments.
deploy
: Deploys the current working directory to Cloud Run. If a service name is not provided, it will use the DEFAULT_SERVICE_NAME
environment variable, or the name of the current working directory.logs
: Gets the logs for a Cloud Run service. If a service name is not provided, it will use the DEFAULT_SERVICE_NAME
environment variable, or the name of the current working directory.To install this as a Gemini CLI extension, run the following command:
mkdir -p ~/.gemini/extensions/cloud-run/gemini-extension && \
curl -s -L https://raw.githubusercontent.com/GoogleCloudPlatform/cloud-run-mcp/main/gemini-extension.json > ~/.gemini/extensions/cloud-run/gemini-extension.json && \
curl -s -L https://raw.githubusercontent.com/GoogleCloudPlatform/cloud-run-mcp/main/gemini-extension/GEMINI.md > ~/.gemini/extensions/cloud-run/gemini-extension/GEMINI.md
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:
gcloud auth login
Set up application credentials using the command:
gcloud auth application-default login
Then configure the MCP server using either Node.js or Docker:
Install Node.js (LTS version recommended).
Update the MCP configuration file of your MCP client with the following:
"cloud-run": {
"command": "npx",
"args": ["-y", "@google-cloud/cloud-run-mcp"]
}
[Optional] Add default configurations
"cloud-run": {
"command": "npx",
"args": ["-y", "@google-cloud/cloud-run-mcp"],
"env": {
"GOOGLE_CLOUD_PROJECT": "PROJECT_NAME",
"GOOGLE_CLOUD_REGION": "PROJECT_REGION",
"DEFAULT_SERVICE_NAME": "SERVICE_NAME"
}
}
See Docker's MCP catalog, or use these manual instructions:
Install Docker
Update the MCP configuration file of your MCP client with the following:
"cloud-run": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GOOGLE_APPLICATION_CREDENTIALS",
"-v",
"/local-directory:/local-directory",
"mcp/cloud-run-mcp:latest"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "/Users/slim/.config/gcloud/application_default-credentials.json",
"DEFAULT_SERVICE_NAME": "SERVICE_NAME"
}
}
[!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:
gcloud auth login
Set your Google Cloud project ID using the command:
gcloud config set project YOUR_PROJECT_ID
Deploy the Cloud Run MCP server to Cloud Run:
gcloud run deploy cloud-run-mcp --image us-docker.pkg.dev/cloudrun/container/mcp --no-allow-unauthenticated
When prompted, pick a region, for example europe-west1
.
Note that the MCP server is not publicly accessible, it requires authentication via IAM.
[Optional] Add default configurations
gcloud run services update cloud-run-mcp --region=REGION --update-env-vars GOOGLE_CLOUD_PROJECT=PROJECT_NAME,GOOGLE_CLOUD_REGION=PROJECT_REGION,DEFAULT_SERVICE_NAME=SERVICE_NAME,SKIP_IAM_CHECK=false
Run a Cloud Run proxy on your local machine to connect securely using your identity to the remote MCP server running on Cloud Run:
gcloud run services proxy cloud-run-mcp --port=3000 --region=REGION --project=PROJECT_ID
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:
"cloud-run": {
"url": "http://localhost:3000/sse"
}
If your MCP client does not support the url
attribute, you can use mcp-remote:
"cloud-run": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/sse"]
}
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "cloud-run": { "command": "npx", "args": [ "-y", "@google-cloud/cloud-run-mcp" ] } } }
Discover more MCP servers with similar functionality and use cases
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.
by cline
Provides autonomous coding assistance directly in the IDE, enabling file creation, editing, terminal command execution, browser interactions, and tool extension with user approval at each step.
by continuedev
Provides continuous AI assistance across IDEs, terminals, and CI pipelines, offering agents, chat, inline editing, and autocomplete to accelerate software development.
by github
Enables AI agents, assistants, and chatbots to interact with GitHub via natural‑language commands, providing read‑write access to repositories, issues, pull requests, workflows, security data and team activity.
by block
Automates engineering tasks by installing, executing, editing, and testing code using any large language model, providing end‑to‑end project building, debugging, workflow orchestration, and external API interaction.
by RooCodeInc
An autonomous coding agent that lives inside VS Code, capable of generating, refactoring, debugging code, managing files, running terminal commands, controlling a browser, and adapting its behavior through custom modes and instructions.
by lastmile-ai
A lightweight, composable framework for building AI agents using Model Context Protocol and simple workflow patterns.
by firebase
Provides a command‑line interface to manage, test, and deploy Firebase projects, covering hosting, databases, authentication, cloud functions, extensions, and CI/CD workflows.
by gptme
Empowers large language models to act as personal AI assistants directly inside the terminal, providing capabilities such as code execution, file manipulation, web browsing, vision, and interactive tool usage.