Cloud Run MCPサーバー
コミット 2026年11月14日Google Cloud Runへのアプリケーションやファイルのデプロイ、およびサービス、プロジェクト、サービスログのリスト表示を行います。
別名 GoogleCloudPlatform/cloud-run-mcp, @google-cloud/cloud-run-mcp
- スター
- 639
- ツール
- 8
- ダウンロード数(30日間)
- 38,853
- 最新バージョン
- —
- 最終コミット
- 2026年11月14日
- ライセンス
- Apache-2.0
Cloud Run MCPとは
Google Cloud Runへのアプリケーションやファイルのデプロイ、およびサービス、プロジェクト、サービスログのリスト表示を行います。 8個のツールを提供しており、list_projects, create_project, list_servicesなどがあります。
プロジェクトのREADMEから生成された概要
Cloud Run MCP server について
このサーバーは、Google Cloud Platformを利用する開発者が、AIエージェントを通じてアプリケーションのデプロイやクラウドサービスの管理を行えるようにします。Claude Desktop、Cursor、WindsurfなどのMCP対応クライアントを介して、Cloud Runとのやり取りが可能になります。Google Cloud SDKを使用してGoogle Cloudアカウントに接続することで、自然言語によるインフラ管理が実現します。
このサーバーは、さまざまなタスクに対応する特定のツールを提供します。例えば、deploy-file-contentsによるファイル内容のデプロイや、deploy-local-folderによるローカルディレクトリの管理などが可能です。また、サービスのリスト表示、特定のサービス詳細の取得、get-service-logによるログやエラーメッセージの取得といった機能も備えています。ローカル環境で作業している場合は、利用可能なプロジェクトのリスト表示や、新しいプロジェクトの作成も行えます。
Node.jsまたはDockerを使用してローカルサーバーとして実行することも、Cloud Run自体にリモートホストすることも可能です。リモート構成では、クラウドリソースへの安全なアクセスを確保するために、IAM認証またはOAuth 2.0が必要になります。設定は、GOOGLE_CLOUD_PROJECTやGOOGLE_CLOUD_REGIONなどの環境変数を通じて行い、デフォルトのデプロイ先を定義します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
Cloud Run MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude CodeにCloud Run MCPをインストール
$ claude mcp add cloud-run-mcp -- npx -y @google-cloud/cloud-run-mcpCursorにCloud Run MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"cloud-run-mcp": {
"command": "npx",
"args": [
"-y",
"@google-cloud/cloud-run-mcp"
]
}
}
}VS CodeにCloud Run MCPをインストール
.vscode/mcp.json
{
"servers": {
"cloud-run-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@google-cloud/cloud-run-mcp"
]
}
}
}VS Code CLIにCloud Run MCPをインストール
$ code --add-mcp '{"name":"cloud-run-mcp","type":"stdio","command":"npx","args":["-y","@google-cloud/cloud-run-mcp"]}'Claude DesktopにCloud Run MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"cloud-run-mcp": {
"command": "npx",
"args": [
"-y",
"@google-cloud/cloud-run-mcp"
]
}
}
}CodexにCloud Run MCPをインストール
$ codex mcp add cloud-run-mcp -- npx -y @google-cloud/cloud-run-mcpCodex config.tomlにCloud Run MCPをインストール
~/.codex/config.toml
[mcp_servers.cloud-run-mcp] command = "npx" args = ["-y", "@google-cloud/cloud-run-mcp"]
Gemini CLIにCloud Run MCPをインストール
$ gemini mcp add -s user cloud-run-mcp npx -- -y @google-cloud/cloud-run-mcpGemini settings.jsonにCloud Run MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"cloud-run-mcp": {
"command": "npx",
"args": [
"-y",
"@google-cloud/cloud-run-mcp"
]
}
}
}HostedMCP が 2026年11月16日 に起動を確認
@google-cloud/cloud-run-mcp 1.12.0 をネットワークもキーもない隔離コンテナでこのコマンドで起動しました。応答があり、8個のツールが一覧表示されました。
Cloud Run MCPツール 8
tools/list でサーバーから取得list_projectsLists available GCP projects
create_projectCreates a new GCP project and attempts to attach it to the first available billing account. A project ID can be optionally specified; otherwise it will be automatically generated.
list_servicesLists all Cloud Run services in a given project.
get_serviceGets details for a specific Cloud Run service.
get_service_logGets Logs and Error Messages for a specific Cloud Run service.
deploy_local_folderDeploy a local folder to Cloud Run. Takes an absolute folder path from the local filesystem that will be deployed. Use this tool if the entire folder content needs to be deployed.
deploy_file_contentsDeploy files to Cloud Run by providing their contents directly. Takes an array of file objects containing filename and content. Use this tool if the files only exist in the current chat context.
deploy_container_imageDeploys a container image to Cloud Run. Use this tool if the user provides a container image URL.
| list_projects | Lists available GCP projects | |
| create_project | Creates a new GCP project and attempts to attach it to the first available billing account. A project ID can be optionally specified; otherwise it will be automatically generated. | |
| list_services | Lists all Cloud Run services in a given project. | |
| 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_folder | Deploy a local folder to Cloud Run. Takes an absolute folder path from the local filesystem that will be deployed. Use this tool if the entire folder content needs to be deployed. | |
| deploy_file_contents | Deploy files to Cloud Run by providing their contents directly. Takes an array of file objects containing filename and content. Use this tool if the files only exist in the current chat context. | |
| deploy_container_image | Deploys a container image to Cloud Run. Use this tool if the user provides a container image URL. |
設定
DEFAULT_SERVICE_NAMEGOOGLE_APPLICATION_CREDENTIALSGOOGLE_CLOUD_PROJECTGOOGLE_CLOUD_REGION
| 名前 | 説明 | 種類 |
|---|---|---|
| DEFAULT_SERVICE_NAME | — | |
| GOOGLE_APPLICATION_CREDENTIALS | — | |
| GOOGLE_CLOUD_PROJECT | — | |
| GOOGLE_CLOUD_REGION | — |
自動チェック
実行日 2026年11月16日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能googlecloudplatform/cloud-run-mcp is public and reachablegithub.com/googlecloudplatform/cloud-run-mcp ↗合格
- パッケージがこのリポジトリをソースとして指定@google-cloud/cloud-run-mcp names googlecloudplatform/cloud-run-mcp as sourcenpmjs.com/package/@google-cloud/cloud-run-mcp ↗合格
- ビルドの来歴 (Sigstore 証明)No build attestation published for this release未チェック
- オープンソースライセンス (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-11-14github.com/googlecloudplatform/cloud-run-mcp ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from @google-cloud/cloud-run-mcp合格
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない8 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見るCloud Run MCP server and Gemini CLI extension
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.
Tools
-
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-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
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 theDEFAULT_SERVICE_NAMEenvironment 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 theDEFAULT_SERVICE_NAMEenvironment 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 |
|---|---|
GOOGLE_CLOUD_PROJECT |
The default project ID to use for Cloud Run services. |
GOOGLE_CLOUD_REGION |
The default region to use for Cloud Run services. |
DEFAULT_SERVICE_NAME |
The default service name to use for Cloud Run services. |
SKIP_IAM_CHECK |
Controls whether to check for IAM permissions for a Cloud Run service. Set to false to enable checks. This is true by default which is a recommended way to make the service public. |
ENABLE_HOST_VALIDATION |
Prevents DNS Rebinding attacks by validating the Host header. This is disabled by default. |
ALLOWED_HOSTS |
Comma-separated list of allowed Host headers (if host validation is enabled). The default value is localhost,127.0.0.1,::1. |
OAUTH_ENABLED |
Enables OAuth 2.0 Bearer token verification for incoming HTTP/SSE requests when set to true. Disabled by default. |
GOOGLE_OAUTH_AUDIENCE |
Expected OAuth 2.0 token audience (typically your OAuth Client ID). Required when OAUTH_ENABLED=true. |
Use as a Gemini CLI extension
To install this as a Gemini CLI extension, run the following command:
-
Install the extension:
gemini extensions install https://github.com/GoogleCloudPlatform/cloud-run-mcp -
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
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:
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:
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:
Using Node.js
-
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" } }
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:
"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" } }
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:
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-unauthenticatedWhen 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_IDThis 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
urlattribute, you can use mcp-remote:"cloud-run": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:3000/sse"] }
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 .env file with the appropriate values pertaining to your OAuth client. A .env.example 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 .env.gcloud-sdk-oauth file as your .env file as follows:
cp .env.gcloud-sdk-oauth .env
node mcp-server.js
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 OAuth mode in the Gemini CLI by using the following JSON in the ~/.gemini/settings.json file:
{
"mcpServers": {
"cloud-run": {
"httpUrl": "http://localhost:3000/mcp",
"oauth": {
"enabled": true,
"clientId": "<OAUTH_CLIENT_ID>",
"clientSecret": "<OAUTH_CLIENT_SECRET>"
}
}
}
}
Post the configuration changes as shown above, start the Gemini CLI. You should authenticate the Cloud Run MCP server using the following prompt in the Gemini CLI:
/mcp auth cloud-run
This will take you to the authentication page on your browser, wherein you need to sign in using the appropriate gmail id, and accept the terms and conditions. Once the authentication is succcessful, you can come back to the Gemini CLI, and the Cloud Run MCP server will be ready to use.
The Google Cloud Platform Terms of Service (available at https://cloud.google.com/terms/) and the Data Processing and Security Terms (available at https://cloud.google.com/terms/data-processing-terms) do not apply to any component of the Cloud Run MCP Server software.
Cloud Run Skills
We introduce Cloud Run skills to enable AI agents to perform actions on Cloud Run. You can use these skills with Gemini CLI and other agentic AI tools. The skills are available at Cloud Run Skills.
The Cloud Run skills are based on top of gcloud cli for Cloud Run empowering agents to perform all the actions on the Cloud Run using gcloud, as can be performed by the GCP user using gcloud cli.
In order to use Cloud Run skills:
- Ensure you have the
gcloudCLI installed and authenticated withgcloud auth loginandgcloud auth application-default login. - Set your project with
gcloud config set project [PROJECT_ID]. - Enable the skills on your agentic AI tool. For example, you can enable the skills for Gemini CLI using the following command on your terminal:
gemini skills install https://github.com/GoogleCloudPlatform/cloud-run-mcp.git --path skills/cloud-run
- Once the skills are enabled, you can use them to perform actions on Cloud Run. Here are some of the prompts for you to get started:
-
List the Cloud Run services in the project test-gcp-project in the region us-west1.
-
Deploy the folder /home/username/workspace/hello-world as Cloud Run service hello-world to the project test-gcp-project in the region us-west1.
-
Describe the Cloud Run job hello-job in the project test-gcp-project in the region europe-west1.
Cloud Run MCPのよくある質問
Cloud Run MCPをClaude Codeに追加するには
ターミナルでclaude mcp add cloud-run-mcp -- npx -y @google-cloud/cloud-run-mcpを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
Cloud Run MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
Cloud Run MCPが提供するツールは
8個のツールを提供しており、list_projects, create_project, list_services, get_service, get_service_logなどがあります。
Cloud Run MCP serverで何ができますか?
AIエージェントを使用して、ローカル環境で実行している場合にファイルをCloud Runへデプロイしたり、ローカルフォルダをデプロイしたりできます。また、サービスのリスト表示や詳細確認、ログの取得、GCPプロジェクトの管理が可能です。
Node.jsを使用してCloud Run MCP serverをインストールするにはどうすればよいですか?
npxコマンドと@google-cloud/cloud-run-mcpパッケージを使用して、MCPクライアントの設定に追加してください。
Cloud Run MCP serverはOAuthをサポートしていますか?
はい、受信するHTTP/SSEリクエストに対して、OAuth 2.0 Bearerトークンの検証を有効にできます。
ローカル実行時のみ利用可能なツールはどれですか?
deploy-local-folder、list-projects、およびcreate-projectは、サーバーをローカルで実行している場合のみ利用可能です。
サーバーを使用する前にどのように認証すればよいですか?
gcloud auth loginでログインし、アプリケーションのデフォルト認証情報(Application Default Credentials)を設定してください。