Skip to content
GitHub (opens in a new tab)

Cloud & infrastructure · MCP Firewall integration

Keep Google Cloud credentials local. Give AI scoped visibility.

Connect Google Cloud through GateRook’s MCP Firewall without giving AI a service account key. Restrict read-only inventory and monitoring to the projects, folders or organizations you configure. Enable log tools separately within their supported scope; connection policy and Google IAM permissions both apply.

Google Cloud, in your AI workflow

Illustrative example

Connection in GateRook

stage-gcp

Google Cloud

stage / QA
Projects, folders or organizations
projects/acme-stage
Credentials source
adc
Impersonate
gw-reader@acme-stage.iam.gserviceaccount.com
Metrics projects
acme-stage

The security boundary

Your AI requests a tool. GateRook checks its mode and policy, requires approval when configured, and resolves credentials locally before an allowed call runs.

Understand the request flow

Ask your AI

Find Cloud Run services in the stage project.

gcp_describe · arguments
{
  "connection": "stage-gcp",
  "scope": "projects/acme-stage",
  "assetTypes": [
    "run.googleapis.com/Service"
  ],
  "limit": 10
}
Example result
{
  "provider": "gcp",
  "scope": "projects/acme-stage",
  "mode": "search",
  "resources": [
    {
      "name": "//run.googleapis.com/projects/acme-stage/locations/europe-west1/services/api",
      "assetType": "run.googleapis.com/Service",
      "location": "europe-west1",
      "labels": {
        "env": "stage"
      }
    }
  ],
  "count": 1,
  "truncated": false,
  "nextCursor": null
}

Sample configuration and output, not a live connection. Replace example values with your environment. Tool names here are connector names; the endpoint may expose a connection-specific name.

Useful access. Explicit control.

What you can do with Google Cloud and AI

Investigate Cloud Run behavior

Find a service, inspect its current configuration and query its request or latency metrics. Give AI concrete resource state and a bounded monitoring interval to work with.

Map a project before debugging

Search inventory across the allowed scope for Compute Engine, Cloud SQL, GKE and other resource types, then inspect the specific resources involved in the incident.

Connect cloud and cluster evidence

Use the GCP connector to inspect a GKE cluster and the Kubernetes connector to read workload state within it. Each connection keeps its own permissions and limits.

Read GKE logs with the same identity

Call logs_search on stage-gcp with source projects/acme-stage, query resource.type="k8s_container" AND severity>=ERROR, from -1h, to now and limit 100. Use the returned nextCursor as cursor to continue. For narrower access than the general GCP connection can safely express, use a dedicated GCP Cloud Logging connection.

From service to MCP Firewall

How to connect Google Cloud

GateRook must be running on a computer that can reach your service. Open Connections, choose Add connection, and select GCP. Give the connection a name and environment.

New to GateRook? Start with the full setup guide.
  1. Prepare Google credentials

    For ADC, run gcloud auth application-default login on the computer running GateRook. Alternatively, prepare a service account key for the protected connection field. Use an identity with the required inventory, monitoring and service read permissions.

  2. Set the project scope

    Add a GCP connection named stage-gcp in the stage environment. Enter projects/acme-stage, choose the credential source and optionally configure service account impersonation.

  3. Check monitoring and live reads

    Set metrics projects when needed, keep live reads enabled for current resource state, and run Test connection. Check the environment Cloud policy before saving so only intended services and resources are visible.

  4. Choose whether to expose log tools

    For Cloud Logging, enable the Cloud Logging API and grant the configured identity the required log-read access. Review logs_search and logs_tail on the endpoint: search defaults to Read only on new attachments, while tail defaults to Off. Existing endpoint attachments need explicit enablement for newly introduced tools. A successful general GCP connection test checks inventory and monitoring, not log-read permission.

  5. Choose the endpoint and tool modes

    Add the tested connection to an endpoint. In Tools & policies, enable only the tools needed for the task. Start with Read only where supported; use Approval for any selected mutation and leave other tools Off. A connection alone does not grant an AI client access.

  6. Connect your AI and verify the first call

    In Clients, choose your AI app and endpoint, review the connection details, and connect. Try this guide’s example in Playground before asking your AI. Open Activity to inspect the tool, target, decision and returned result. The getting started guide covers this shared flow.

Connection settings

Configure Google Cloud in GateRook

These are example values for the connection form. Enter credentials into GateRook’s secret fields, not into an AI prompt. Requirements and alternatives are noted per field.

Google Cloud connection configuration
SettingExampleHow to use it
Projects, folders or organizationsprojects/acme-stageAdd the scopes this connection may search. Each scope must be accessible to the configured identity. Optional log calls use these same scopes; select the project containing the log entries.
Credentials sourceadcUse Application Default Credentials on this computer, or choose serviceAccountKey and store its JSON in the protected field.
Impersonategw-reader@acme-stage.iam.gserviceaccount.comOptional service account impersonation. Your source identity must be allowed to impersonate this account.
Metrics projectsacme-stageDefaults to the project scopes. Folder and organization scopes need explicit projects for monitoring queries.
Read current state from service APIstrueWhen inspecting a supported resource by full name, read the service API instead of relying only on the inventory snapshot.

Know what you expose

Google Cloud tools and access boundaries

The connector defines available operations. GateRook’s MCP Firewall enforces endpoint modes and connection policies before an AI client can use them.

Available tools and access behavior
ToolPurposeAccess behavior
gcp_describeSearch Cloud Asset Inventory by scope, asset type and query. Pass a returned full resource name to inspect its state, using a live service API when supported.Read only
gcp_metricsQuery Cloud Monitoring time series with filters, alignment and reduction; discover recently active metric types or inspect alerts.Read only
logs_searchSearch Cloud Logging entries with native Logs Explorer filters using the GCP connection’s scopes and Google credentials. Results are newest first; repeat the same query and source with nextCursor to page to older entries.Read only on new attachments
logs_tailRead newer Cloud Logging entries with the same scopes and credentials. Pass the returned nextCursor as cursor on the next call; enable this tool explicitly when needed.Off by default

Before you enable access

  • The Google Cloud connector is read-only. It does not deploy services, modify IAM, restart instances or delete resources.
  • Cloud Asset search results can lag behind the service. Supported live reads cover Compute Engine, Cloud Run, Cloud SQL, GKE, Pub/Sub, Storage bucket metadata, Cloud Functions and Memorystore.
  • The live resource reads from gcp_describe return metadata, not arbitrary object contents or secret payloads. Unsupported live routes fall back to inventory data. Separately enabled log tools return permitted log entries, which can contain application data.
  • The source identity, impersonation permissions, enabled service APIs and GateRook Cloud policy all affect which requests succeed.
  • Cloud inventory restrictions on services, regions or resource names cannot safely select Cloud Logging entries. General GCP log calls are refused when those restrictions are present; use a dedicated GCP Cloud Logging connection with explicit projects or log views and a scope filter.
  • Cloud maxItems can further narrow log result limits. Log time ranges use the Logs policy, while Cloud maxRangeDays applies to metrics. Line counts, response size, timeouts and masking still apply.
  • A successful general GCP connection test does not establish Cloud Logging permission. Log contents are untrusted data, never instructions for the AI to execute.

GateRook stores local connection secrets encrypted and resolves them for connectors. Allowed tool results are returned to your AI client and may be processed by its provider. Scope the data you expose as well as the actions you allow.

Practical answers

Google Cloud connection questions

Use Test connection to isolate service access problems. Use Playground and Activity to inspect endpoint permissions and tool calls.

Can I use my existing gcloud login?

Use Application Default Credentials, which are separate from a normal gcloud CLI login. The connection form names gcloud auth application-default login as the setup command for ADC.

Are inventory results always current?

No. Cloud Asset Inventory can be minutes behind. Inspect a resource by the full name returned by search to use a live service read where supported, and check whether the response source is live or inventory.

Can I use a folder or organization scope?

Yes, when the configured identity can read that scope. Configure individual metrics projects as well if you want Cloud Monitoring queries; folder and organization scopes do not automatically select monitoring projects.

How is this different from the GCP Cloud Logging connector?

The general GCP connection combines inventory, metrics and optional logs_search/logs_tail calls under one identity and resource scope. The dedicated GCP Cloud Logging connector uses gcp_logging_search/gcp_logging_tail and supports explicit projects or log views plus a scope filter. Choose it when you need separate or more precise log access. These are different tool names for different connector types, not interchangeable aliases.

Why do inventory and metrics work while log calls are refused?

The general connection test does not check Cloud Logging permissions. Verify that the Cloud Logging API is enabled, the identity can read the intended entries and the selected project contains them. Cloud service, region or resource-name restrictions also block general GCP log calls because they cannot safely be translated into a log filter; use the dedicated GCP Cloud Logging connector for that scope.

Keep exploring

Google Cloud Logging

Protect Google Cloud log access with GateRook. Choose projects or log views, use a scoped identity and bound the log data returned to your AI client.

AWS

Inspect AWS through GateRook’s MCP Firewall. Scope accounts and regions, keep credentials local, and expose read-only resource and CloudWatch tools.

Kubernetes

Protect Kubernetes access with GateRook’s MCP Firewall. Restrict namespaces, enable log access deliberately and approve enabled rollout or manifest changes.

Browse all integration guides

Your MCP Firewall. Your access rules.

Control AI access to Google Cloud.

Start with read-only access. Approve changes. Inspect the audit trail.

Read the getting started guide

Get GateRook

Download GateRook 0.9.2 for your Mac, or get the Windows app from Microsoft Store.

macOS

Version 0.9.2 for Apple Silicon (arm64). This download does not support Intel Macs.

Open the DMG and drag GateRook to Applications.

Windows

Available for free from Microsoft Store. Install GateRook and receive updates through the Store.

macOS release notes and checksums (opens in a new tab)