Sponsored by Deepsite.site

MCP server to deploy code to Google Cloud Run

Created By
GoogleCloudPlatform7 months ago
MCP server to deploy apps to Cloud Run
Content

MCP server to deploy code to Google Cloud Run

Enable MCP-compatible AI agents to deploy apps to Cloud Run.

"mcpServers":{
  "cloud-run": {
    "command": "npx",
    "args": ["-y", "https://github.com/GoogleCloudPlatform/cloud-run-mcp"]
  }
}

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-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

Use 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).

  1. Install Node.js (LTS version recommended).

  2. Install the Google Cloud SDK and authenticate with your Google account.

  3. Log in to your Google Cloud account using the command:

    gcloud auth login
    
  4. Set up application credentials using the command:

    gcloud auth application-default login
    
  5. Update the MCP configuration file of your MCP client with the following:

       "cloud-run": {
         "command": "npx",
         "args": ["-y", "https://github.com/GoogleCloudPlatform/cloud-run-mcp"]
       }
    

Use 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.

  1. Install the Google Cloud SDK and authenticate with your Google account.

  2. Log in to your Google Cloud account using the command:

    gcloud auth login
    
  3. Set your Google Cloud project ID using the command:

    gcloud config set project YOUR_PROJECT_ID
    
  4. 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.

  5. 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.

  6. 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"]
       }
    
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
Tavily Mcp
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server