A GCP security expert agent built with Google ADK, exposed over the A2A protocol so any orchestrator or agent framework can call it.
- Audits IAM policies, Cloud Storage buckets, firewall rules, Compute instances, Cloud SQL, and GKE
- Accesses GCP via a local GCP MCP server (stdio subprocess — no manual setup)
- Returns severity-ranked findings with verbatim evidence and
gcloudremediation commands - Exposes itself as an A2A service — any agent (CrewAI, LangChain, another ADK agent) can call it over HTTP
Calling agent / orchestrator
│ HTTP JSON-RPC (A2A protocol)
▼
┌─────────────────────────────┐
│ GCP Security Agent (ADK) │
│ /.well-known/agent.json │ ← Agent Card (auto-generated)
│ POST / │ ← Task endpoint
│ ┌─────────────────────┐ │
│ │ Local GCP MCP │ │ ← stdio subprocess (gcp-mcp)
│ │ Server │ │
│ └─────────────────────┘ │
└─────────────────────────────┘
cd gcp-security-agent
pip install -e .cp .env.example .env
# Edit .env: set ANTHROPIC_API_KEY, GCP_SERVICE_ACCOUNT_JSON, GCP_PROJECT_IDcurl -LsSf https://astral.sh/uv/install.sh | shgcp-agentThe agent starts on http://0.0.0.0:8001 by default.
from google.adk.agents import Agent
from google.adk.agents.remote_a2a_agent import RemoteA2aAgent
gcp_security = RemoteA2aAgent(
name="gcp_security_agent",
description="GCP security expert",
agent_card="http://localhost:8001/.well-known/agent.json",
)
orchestrator = Agent(
model="gemini-2.5-flash",
name="orchestrator",
sub_agents=[gcp_security],
instruction="Delegate all GCP security tasks to gcp_security_agent.",
)curl -X POST http://localhost:8001/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [{"kind": "text", "text": "Audit project my-project-id for public storage buckets and overly permissive IAM roles."}]
}
},
"id": "1"
}'curl http://localhost:8001/.well-known/agent.json| Variable | Default | Description |
|---|---|---|
AGENT_MODEL |
claude-sonnet-4-6 |
LLM model |
ANTHROPIC_API_KEY |
— | Required for Claude |
GCP_SERVICE_ACCOUNT_JSON |
— | Path to SA key file |
GCP_PROJECT_ID |
— | Default GCP project to audit |
GCP_ORG_ID |
— | Optional org ID for SCC |
GCP_MCP_COMMAND |
uvx |
MCP server executable |
GCP_MCP_ARGS |
gcp-mcp |
MCP server arguments |
GCP_MCP_TIMEOUT |
60 |
MCP tool call timeout (seconds) |
A2A_HOST |
0.0.0.0 |
Server bind host |
A2A_PORT |
8001 |
Server port |