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.
Cloud & infrastructure · MCP Firewall integration
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.
Connection in GateRook
stage-gcp
Google Cloud
stage / QAThe 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 flowAsk your AI
Find Cloud Run services in the stage project.
{
"connection": "stage-gcp",
"scope": "projects/acme-stage",
"assetTypes": [
"run.googleapis.com/Service"
],
"limit": 10
}{
"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.
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.
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.
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.
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
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.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.
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.
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.
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.
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.
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
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.
| Setting | Example | How to use it |
|---|---|---|
Projects, folders or organizations | projects/acme-stage | Add 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 source | adc | Use Application Default Credentials on this computer, or choose serviceAccountKey and store its JSON in the protected field. |
Impersonate | gw-reader@acme-stage.iam.gserviceaccount.com | Optional service account impersonation. Your source identity must be allowed to impersonate this account. |
Metrics projects | acme-stage | Defaults to the project scopes. Folder and organization scopes need explicit projects for monitoring queries. |
Read current state from service APIs | true | When inspecting a supported resource by full name, read the service API instead of relying only on the inventory snapshot. |
Know what you expose
The connector defines available operations. GateRook’s MCP Firewall enforces endpoint modes and connection policies before an AI client can use them.
| Tool | Purpose | Access behavior |
|---|---|---|
gcp_describe | Search 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_metrics | Query Cloud Monitoring time series with filters, alignment and reduction; discover recently active metric types or inspect alerts. | Read only |
logs_search | Search 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_tail | Read 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 |
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
Use Test connection to isolate service access problems. Use Playground and Activity to inspect endpoint permissions and tool calls.
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.
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.
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.
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.
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
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.
Inspect AWS through GateRook’s MCP Firewall. Scope accounts and regions, keep credentials local, and expose read-only resource and CloudWatch tools.
Protect Kubernetes access with GateRook’s MCP Firewall. Restrict namespaces, enable log access deliberately and approve enabled rollout or manifest changes.
Your MCP Firewall. Your access rules.
Start with read-only access. Approve changes. Inspect the audit trail.