MCP gateway with identity · one door, four checks, every call on the record

agentgateway on GKE Autopilot behind a Cloudflare Tunnel · Keycloak OAuth 2.1 · CEL authorisation per tool and role · human approval for destructive tools · PII masked on the way out · ledger in Postgres and BigQuery · traces in Cloud Trace
MCP CLIENTS · anywhere THE DOOR · mcp.jainosoft.com · GKE Autopilot, namespace mcp MCP SERVERS · never reachable directly Claude Codeclaude mcp add --transport http Claude Desktop / Cursorcustom connector, PKCE in the browser n8n · agentsMCP client node, same identity GitHub Actionsclient-credentials, conformance daily Cloudflare TunnelTLS at the edge, outbound-only connectors,no load balancer, no public IP agentgateway v1.7 · Rust · 2 replicas · one /mcp endpoint multiplexing four servers 1 · identityOAuth 2.1 resource serverJWT iss · aud · exp · JWKS401 → resource_metadata 2 · authorisationCEL rules per tool + roletools/list filtered per user403 before any server 3 · approvaldestructive tools park arequest; admin decidesA-xxxxxx · 15 min TTL 4 · recordPII masked in outputledger row + spanwho · what · ms Keycloak 26realm mcp · auth.jainosoft.comPKCE public client · audience mapperroles mcp-user / mcp-admin Approvals consoleconsole.jainosoft.com · OIDC loginapprove / deny · API for agentsdashboard: ledger vs gateway log OpenTelemetry → Cloud Tracea span per tool callJSON access log → Cloud Logging→ BigQuery audit.stdout (sink) Postgres · keycloak · mcp (approvals, audit_log) · demo (customers, orders; read-only role for queries) audit_log(ts, user, roles, target, tool, args, decision, latency_ms, approval_id, redactions) approvals(id, user, tool, args, status: pending→approved→consumed | denied | expired, decided_by, decided_at) ops-dblist_tables · describe · query_readonlyrun_migration ⚠ ops-k8spods · logs · events · deploymentsrestart_deployment ⚠ · scale ⚠ (demo-apps only) ops-cloud · Workload Identityinstances · Cloud Run · GKE · error logsstop_instance ⚠ GitHub MCP server · official, stdiorepos · issues · pull requests (read-only)runs inside the gateway pod FastMCP · streamable HTTP · stateless · identity headers from the gateway · every tool wrapped: audited / guarded MEASURED (recorded run) · · · · ·
bob reads: identity ✓ authorisation ✓ server ✓ masked ✓ recordedbob calls a destructive tool: refused at check 2, no server involvedalice restarts a deployment: parked at check 3 until an admin approves, then executes
bhavishyajain545 · gcp-ai-mcp-gateway