Skip to main content

At a glance

  • Availability: Experimental (how to enable).
  • Authentication: OAuth 2.0.
  • Connection: A user authorizes the connection in the provider’s consent screen.
  • Scopes: https://www.googleapis.com/auth/compute.readonly, https://www.googleapis.com/auth/run.readonly.
  • Optional scopes: https://www.googleapis.com/auth/cloud-platform.
  • Provider documentation: Authentication reference.

Credentials

Set these per environment. See Connect an integration. These variables are required only when you supply your own OAuth app. If a managed app is available, you can connect without setting them. Provider permissions and consent still apply.

Setup

  1. Create or select a Google Cloud project: Go to https://console.cloud.google.com and create a project (new Google Cloud accounts include free-tier credit, and Compute Engine offers an always-free e2-micro instance in some US regions for testing).
  2. Enable the required APIs: Enable the Compute Engine API (https://console.cloud.google.com/apis/library/compute.googleapis.com), the Cloud Run Admin API (https://console.cloud.google.com/apis/library/run.googleapis.com), and the Cloud Functions API (https://console.cloud.google.com/apis/library/cloudfunctions.googleapis.com) for your project.
  3. Create OAuth credentials: In https://console.cloud.google.com/apis/credentials create an OAuth 2.0 Client ID (Web application) and add your callback URL as an authorized redirect URI. Store the values as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.
  4. Create test resources: Create a small VM instance (e2-micro) in Compute Engine and deploy a sample Cloud Run service so the list tools have something to return. Stop the VM when done to avoid charges.

Provider notes

  • The default scopes are read-only (compute.readonly and run.readonly) and cover listing Compute Engine instances and Cloud Run services; listing Cloud Functions and starting or stopping VM instances require granting the optional cloud-platform scope during authorization.
  • The signed-in user also needs IAM permissions on the project: roles/viewer covers the list tools, and roles/compute.instanceAdmin.v1 (or broader) is needed to start and stop instances.
  • Start and stop return a zone operation immediately; the instance state changes asynchronously, so re-run List Compute Instances to confirm.
  • Use ’-’ as the location to list Cloud Functions across all locations in one call (unreachable regions are reported in the ‘unreachable’ field); Cloud Run does not support the ’-’ wildcard, so list its services one region at a time.
  • The Cloud Functions v2 API also returns 1st-gen functions, with the generation indicated by the ‘environment’ field.
Provider API reference.

Tools

Verify the connection

Call a read tool such as gcp__list_compute_instances with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.