The reference agent's subject, cloud solution architecture, as an agent in the operating model agent's pattern: the Execution engine (from orchestration_engine) and one Workflow in app/solution_architecture, built for the settings and provider bundle by assembly.workflow_for. Copied from gcp_solution_architecture_agent at 8b397cd without its own engine: its role files, Skills, provider bundle, ADRs, vocabulary, scripts and evaluation datasets. The image takes the engine from a named build context and installs Terraform. It is called through the Orchestration engine, and its files are what the operating model agent digests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.0 KiB
Remote MCP access: Google Cloud
How to give the solution architect agent safe, read-only access to Google Cloud's hosted MCP servers. The servers the agent uses, and the only tools it may call on each, are listed in providers/gcp.yaml.
How the agent limits itself
-
Allowlist. An agent is only ever offered tools named in a server's
allowlist. Every other tool on the server is invisible to it. -
Read-only check at startup. If any allowlisted tool doesn't declare
readOnlyHint: true, the agent refuses to start. -
Content excluded. Tools that return data content are excluded even though they are read-only: Cloud SQL
execute_sql_readonly, Cloud Storageread_object/read_text/list_objects, and generic Kubernetes reads that can return Secrets (get_k8s_resource,describe_k8s_resource). -
Permission per Execution. Tools that read your environment (
cloud_read) run only after the user grants permission in that Execution. Pre-approved Executions deny it unless the caller passesallow_cloud_read=true, in the request or in the scope spec'srunsection. When it is denied, the cloud-read tools are not offered to the agents at all. -
Replies are checked. When Jev is configured, a server's reply that reads as instructions to the agent, as opposed to information, is withheld from the Specialist and logged (
JEV_GUARDRAIL). Without Jev, replies pass through.
These are defence in depth. Enforce read-only access in Google Cloud as well.
Set up a project the agent may read
-
Enable the APIs of the products you want discovered. A product's MCP endpoint is available once its API is enabled, for example
compute.googleapis.com,container.googleapis.com,run.googleapis.com,sqladmin.googleapis.com,pubsub.googleapis.com,cloudasset.googleapis.com,monitoring.googleapis.comandnetworkmanagement.googleapis.com. A disabled API shows up as a recorded discovery gap, not a failure. -
Create a dedicated service account for the agent, and grant it only:
roles/mcp.toolUser, to call MCP toolsroles/viewer, or narrower viewer roles for the products in scoperoles/cloudasset.viewer, for asset inventory and IAM analysis
-
Deny read-write tool calls for every principal with an IAM deny policy. Save the policy as
policy.json:{ "rules": [ { "denyRule": { "deniedPrincipals": ["principalSet://goog/public:all"], "deniedPermissions": ["mcp.googleapis.com/tools.call"], "denialCondition": { "title": "Deny read-write tools", "expression": "api.getAttribute('mcp.googleapis.com/tool.isReadOnly', false) == false" } } } ] }Then attach it to the project:
gcloud iam policies create mcp-deny-policy \ --attachment-point=cloudresourcemanager.googleapis.com/projects/PROJECT_ID \ --kind=denypolicies \ --policy-file=policy.json -
Give the agent credentials. It authenticates with Application Default Credentials: the attached service account on Cloud Run or GKE, or
GOOGLE_APPLICATION_CREDENTIALSlocally. SetMCP_QUOTA_PROJECTwhen quota should be charged to a project other than the credentials' project.
For local development, gcloud auth application-default login supplies ADC for your user.
Reviewing the allowlists
Upstream tool sets change. To review them:
-
Refresh the snapshot.
tools/listworks without credentials, and the script lists tools without calling any:.venv/bin/python scripts/list-mcp-tools.py gcp --json --no-auth > providers/reviews/gcp-mcp-tools.json -
Read the diff. For each new read-only tool, decide whether it returns inventory or configuration metadata (allow it) or data content or secrets (leave it out).
-
Update the
allowlists inproviders/gcp.yaml.tests/test_providers.pyfails if an allowlisted tool is missing from the snapshot or isn't read-only.
Last reviewed 2026-09-16, against all 12 servers.