Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Cloud SQL Auth Proxy

$ cloud-sql-proxy Official Low Risk
Google Cloud · Cloud & Infra · Apache-2.0 · macos / linux / windows

Cloud SQL Auth Proxy (cloud-sql-proxy) establishes secure TLS tunnels to Google Cloud SQL PostgreSQL, MySQL, and SQL Server instances using IAM credentials instead of IP allowlists or static SSL certs. Supports --port, --auto-iam-authn, and --structured-logs JSON output.

FCRS-1.0 Score
80 /100
Good
Medium Confidence
Zero-Friction Install
brew install cloud-sql-proxy
CLI vs MCP Decision CLI Only

cloud-sql-proxy binds a local TCP/Unix socket tunnel for database drivers and CLIs (psql/mysql); it is a network transport daemon rather than an MCP tool.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Deterministic non-interactive flags (--port, --structured-logs, --auto-iam-authn), though it runs as a persistent foreground tunnel daemon rather than a one-shot query CLI.

  • Supports --structured-logs for JSON log entries
  • Long-running daemon requires background execution (IsDaemon) by agents
Trust & Safety 22 / 25

Enforces mTLS + Google IAM authentication without exposing public database ports or static DB passwords.

  • Replaces IP allowlisting with IAM-scoped TLS tunneling
Setup & Portability 14 / 15

Single static Go binary available via Homebrew and Google Cloud Storage downloads across macOS, Linux, and Windows.

  • Available via brew install cloud-sql-proxy
Utility & Efficiency 11 / 15

Standard local connector enabling psql, mysql, and migration tools to reach Cloud SQL safely.

  • Supports automatic engine port detection and IAM DB login (--auto-iam-authn)
Maintenance & Lineage 8 / 10

Official Google Cloud Platform tool (GoogleCloudPlatform/cloud-sql-proxy) under Apache-2.0.

  • Official GoogleCloudPlatform repository under Apache-2.0
Docs & Verifiability 7 / 10

Clear Cloud SQL docs and --help reference, though v1 vs v2 flag differences require attention.

  • Official Google Cloud documentation and GitHub README

Security, Auth & Guardrails

Auth Modes
Service Account OAuth Browser Config File
Credential Storage

Uses Google Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS, gcloud auth application-default login, or GCE/GKE workload identity).

Side Effects
Read-Only
Cost & Quotas

Apache-2.0 open-source binary; connects to existing billable Cloud SQL instances.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Cloud SQL Auth Proxy Agent Rules
- Always start `cloud-sql-proxy` as a background daemon with explicit `--port` and `--structured-logs`.
- Kill the proxy background task when finished; never hardcode service account JSON paths into repo files.

Agent-Ready Command Recipes

Safe Read-Only Queries

Verify installed Cloud SQL Auth Proxy version
cloud-sql-proxy --version

Prints the v2 proxy version without opening network listeners.

Start a localhost tunnel with JSON structured logs
cloud-sql-proxy my-project:us-central1:my-db --port 5432 --structured-logs --auto-iam-authn

Binds a local IAM-authenticated TLS tunnel on port 5432 emitting JSON log lines.

Strengths for Agents

  • + Eliminates firewall allowlist sprawl using IAM-authenticated TLS tunnels.
  • + --structured-logs outputs parseable JSON status and connection events.
  • + Zero-dependency static Go binary.

Caveats & Pitfalls

  • ! Runs indefinitely as a network proxy daemon—agents must launch it in the background.
  • ! v2 flag syntax (cloud-sql-proxy <instance>) differs from legacy v1 (-instances=...).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI