Data as of

Cloud Run MCP Server for VS Code: Setup & Config

VS Code: Cloud Run MCP Server connects agents to application deployment and service inspection on Google Cloud Run.

What you can do with Cloud Run in VS Code

Deploy from an agent and investigate the resulting Cloud Run service without changing integrations.

  • Move application source from an agent workflow into a Cloud Run deployment.
  • Use saved deployment defaults with the supplied deploy and logs prompts.

Before you start: Cloud Run in VS Code

  • Node.js, preferably an LTS release
  • Installed Google Cloud SDK
  • Google account authentication and application-default credentials
  • MCP client configured to start the local package

The command matches the README's recommended local Node configuration, not the bare script from config_hint. Prepare credentials with gcloud auth login followed by gcloud auth application-default login. All three environment entries are optional defaults. A remotely hosted server follows a different authenticated setup and does not expose the local-only tools.

Cloud Run VS Code configuration

  1. Choose VS Code configuration scope

    For Cloud Run MCP Server, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.

  2. Add Cloud Run MCP Server to VS Code

    Use the cloud-run-mcp entry below in servers. Keep Cloud Run MCP Server's documented stdio connection fields and your other VS Code entries.

  3. Check Cloud Run MCP Server in VS Code

    Cloud Run MCP Server: Start in VS Code’s MCP controls; inspect output and trust prompts.

Config file · Workspace: .vscode/mcp.json

JSON
{
  "servers": {
    "cloud-run-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@google-cloud/cloud-run-mcp"
      ],
      "env": {
        "GOOGLE_CLOUD_PROJECT": "<optional project ID used when a request omits it>",
        "GOOGLE_CLOUD_REGION": "<optional deployment region used by default>",
        "DEFAULT_SERVICE_NAME": "<optional fallback name for the Cloud Run service>"
      }
    }
  }
}

Cloud Run tools available to VS Code

Cloud Run's stored tool list documents 7 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.

get-service-log

Look for get-service-log among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

get-service

Look for get-service among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

Inspect details about one deployed Cloud Run service.

list-services

Look for list-services among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

Discover services within the chosen region and project.

deploy-file-contents

Look for deploy-file-contents among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

deploy-local-folder

Look for deploy-local-folder among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

Use a source directory for deployment; exposed only by a locally running instance.

list-projects

Look for list-projects among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

Discover available Google Cloud projects in local mode.

create-project

Look for create-project among VS Code's agent-mode tools after starting Cloud Run through the MCP controls.

Cloud Run: full stored tool descriptions

Troubleshooting Cloud Run in VS Code

  • Make npx @google-cloud/cloud-run-mcp (Node.js/npm) available in the workspace, container, or remote environment hosting Cloud Run MCP Server. Start through VS Code's MCP controls; inspect output and trust prompts.
  • For Cloud Run MCP Server, keep DEFAULT_SERVICE_NAME, GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_REGION out of version control; VS Code documents input variables and secret handling.
  • Cloud Run MCP Server uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Remote instances cannot deploy outside their own hosting project.
  • Known limitation: Folder deployment and project discovery or creation are unavailable in remote mode.
  • Known limitation: Remote access needs authentication; host validation is not enabled by default.
  • General VS Code troubleshooting lives in the /clients/vscode guide.

Cloud Run MCP Server — details. VS Code guide

Frequently asked questions

For Cloud Run MCP Server, edit workspace .vscode/mcp.json. VS Code requires servers rather than mcpServers; preserve the displayed type on each entry.

VS Code's cloud-run-mcp example uses stdio.

Cloud Run MCP Server's VS Code configuration invokes npx @google-cloud/cloud-run-mcp (Node.js/npm).

VS Code's Cloud Run MCP Server example references DEFAULT_SERVICE_NAME, GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_REGION. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.

Cloud Run MCP Server's stored list contains 7 tools, including get-service-log, get-service, list-services. Compare those names with VS Code's connected tool list; the stored list is not a live check.

The local-only set consists of create-project, deploy-local-folder, and list-projects. A remote instance is also confined to deployments within its hosting project.

The setup authenticates with the Cloud SDK and establishes application-default credentials before the MCP client launches the package.