All projects

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
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

  1. WordPress widget / client UIAuth modals · Turnstile
  2. Firebase AuthenticationGoogle sign-in · ID token verification
  3. FastAPI backendCloud Run
  4. Access tier · quota · rate limitFirestore-backed
  5. BYOK handlingEncrypted keys in Firestore
    Secret Manager + IAMPlatform secrets
    Gemini / Vertex AI
  6. MCP services2 services on Cloud Run
  7. GitHub repositories54 public repos

Deployment

  1. GitHub
  2. Cloud Build
  3. Cloud Run
Conceptual view of the request path and deployment flow.

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.

Stack

PythonFastAPIFirebase AuthFirestoreCloud RunCloud BuildSecret ManagerIAMVertex AI / GeminiCloudflare TurnstileMCP