This MCP server enables AI agents to deploy applications to Google Cloud Run, providing a bridge between AI-powered development environments and Google Cloud services. It offers tools for deploying code, managing services, and interacting with Google Cloud resources.
Setting up the Cloud Run MCP server on your local machine allows you to use your local Google Cloud credentials, ideal for AI-assisted IDEs or desktop AI applications.
Install prerequisites:
Authenticate with Google Cloud:
gcloud auth login
Set up application credentials:
gcloud auth application-default login
Configure your MCP client by adding the following to your MCP configuration file:
"cloud-run": {
"command": "npx",
"args": ["-y", "https://github.com/GoogleCloudPlatform/cloud-run-mcp"]
}
Running the MCP server on Cloud Run with IAM authentication provides a secure connection from your local machine. Note that with this option, you can only deploy code to the same Google Cloud project where the MCP server is running.
Install and authenticate with the Google Cloud SDK:
gcloud auth login
Set your Google Cloud project:
gcloud config set project YOUR_PROJECT_ID
Deploy the MCP server to Cloud Run:
gcloud run deploy cloud-run-mcp --image us-docker.pkg.dev/cloudrun/container/mcp --no-allow-unauthenticated
When prompted, select a region (e.g., europe-west1
).
Create a local proxy to connect securely to the remote MCP server:
gcloud run services proxy cloud-run-mcp --port=3000 --region=REGION --project=PROJECT_ID
Update your MCP client configuration:
"cloud-run": {
"url": "http://localhost:3000/sse"
}
Alternatively, if your MCP client doesn't support the url
attribute, use:
"cloud-run": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/sse"]
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "cloud-run" '{"command":"npx","args":["-y","https://github.com/GoogleCloudPlatform/cloud-run-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cloud-run": {
"command": "npx",
"args": [
"-y",
"https://github.com/GoogleCloudPlatform/cloud-run-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"cloud-run": {
"command": "npx",
"args": [
"-y",
"https://github.com/GoogleCloudPlatform/cloud-run-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect