Professional · Built at hytGenX
Secure AI Developer Assistant on GCP
Security, access control, and hosted MCP services for an AI coding assistant running on Google Cloud.
- Role
- Backend & cloud engineer
- Platform
- GCP Cloud Run
- Access tiers
- Anonymous · Signed-in · BYOK
- MCP clients
- Claude Code · Cursor · Antigravity
Overview
An AI coding assistant hosted on GCP. I designed and implemented its security and access layer, extended the FastAPI backend, and built two hosted MCP services that give AI coding tools access to a set of public GitHub repositories.
Request and access architecture
- WordPress widget / client UIAuth modals · Turnstile
- Firebase AuthenticationGoogle sign-in · ID token verification
- FastAPI backendCloud Run
- Access tier · quota · rate limitFirestore-backed
- BYOK handlingEncrypted keys in FirestoreSecret Manager + IAMPlatform secretsGemini / Vertex AI
- MCP services2 services on Cloud Run
- GitHub repositories54 public repos
Deployment
- GitHub
- Cloud Build
- Cloud Run
What I owned
- Firebase / Google sign-in with server-side ID token verification and three access tiers.
- BYOK flow: Gemini key validation, encryption, Firestore storage, runtime decryption, and log redaction.
- Firestore-backed quotas, per-IP rate limiting, Cloudflare Turnstile, and structured Cloud Logging.
- Two MCP services on Cloud Run (repository listing, code search, file retrieval), a repaired GitHub MCP integration, and GitHub → Cloud Build → Cloud Run deployments.
Engineering challenges
Handling users' own API keys
Bring-your-own-key users hand over a Gemini key. Keys are validated, encrypted before storage in Firestore, decrypted at runtime, and redacted from logs. Secret Manager and IAM handle platform secrets.
Keeping a free tier affordable
Anonymous access invites abuse. Cloudflare Turnstile, per-IP rate limits, and Firestore-backed quotas per tier keep usage in check.
Outcome
- Two hosted MCP services compatible with Claude Code, Cursor, and Antigravity.
- Repository listing, code search, and file retrieval across 54 public GitHub repositories, including legacy codebases.