Oct 27, 20267 min read

The Best GCP Deployment Tools for AI-Built Apps in 2026

Encore, Cloud Run source deploys, Firebase App Hosting, the Cloud Run MCP server and Pulumi compared for apps written by Claude Code, Cursor and app builders, by what each needs from the generated code.

An app written by Claude Code, Cursor or an app builder usually assumes more than it says. The code reads a DATABASE_URL, publishes to a topic and calls a bucket, and the deploy step is expected to make all of that exist. Most GCP deploy tools build and run the container and leave the database, the topic and the service account's permissions for later, which is where generated apps stall.

The tools below are judged by how much of what the generated code assumes they create, and with which identity.

What an AI-built app needs from a GCP deploy tool:

  • The database, queues and buckets the code expects, created with the service.
  • A dedicated service account per service, not the default identity.
  • A deploy path an agent can run without a human's gcloud session.
  • A way to test the whole app locally before the first deploy.

What generated apps usually assume

Read the code an agent produces for a typical backend and the list is short and consistent: a Postgres connection string, a topic or a job queue, a bucket for uploads, a scheduled task, and secrets for third-party keys. None of it is unusual. The difference between the tools below is whether that list is read from the code and created, or kept somewhere else and created by a person who has to notice it first.

That second path is where most first deploys break. The container starts, the health check passes, and the first request that touches the database fails because the instance or its permissions were never set up.

GCP deployment tools for AI-built apps at a glance

ToolInputDatabase and queuesService identityAgent workflow
EncoreTypeScript or Go code with infrastructure declarationsCloud SQL, Pub/Sub, buckets from codeA service account for the service, created on deploygit push, cloud access sits with Encore's service identity
Cloud Run source deploySource with a Dockerfile or buildpacksSeparateDefault or one you setgcloud with local credentials
Firebase App HostingNext.js or Angular appFirebase services, separateManaged by App HostingGit-based rollouts
Cloud Run MCP serverLocal folders or filesSeparateLocal gcloud identityMCP tools in the agent
PulumiInfrastructure codeAny GCP resourceDefined in codepulumi up from CI
Compare what each tool creates for a generated app
CapabilityEncoreCloud Run sourceApp HostingCloud Run MCPPulumi
Creates the databaseYesNoNoNoIf written
Creates Pub/Sub topics and subscriptionsYesNoNoNoIf written
Per-service identity by defaultYesNoManagedNoIf written
Local run with dependenciesencore runYour ownFramework dev serverNoNo
Public by defaultNoYour choice at deployYesa web appYesunless SKIP_IAM_CHECK is falseIf written

Encore: the deploy creates what the code assumes

Encore

Encore combines an open source infrastructure SDK for TypeScript and Go with a platform that deploys into your own GCP project. A generated app declares its database, topics and buckets in the code, and those declarations are what Encore provisions, so the gap between what the code expects and what exists in the project does not open.

Application code passes through Encore and infrastructure guardrails to resources provisioned in your own AWS or GCP account.
Encore provisions the infrastructure your application needs in your own AWS or GCP account.

An order endpoint that publishes an event, and its subscriber:

import { api } from "encore.dev/api"; import { Topic, Subscription } from "encore.dev/pubsub"; interface OrderPlaced { orderId: string; } // GCP Pub/Sub on Google Cloud, SNS and SQS on AWS. export const orderPlaced = new Topic<OrderPlaced>("order-placed", { deliveryGuarantee: "at-least-once", }); export const placeOrder = api( { expose: true, method: "POST", path: "/orders" }, async (req: OrderPlaced): Promise<OrderPlaced> => { await orderPlaced.publish(req); return req; }, ); const handled = new Set<string>(); // Use a table with a unique key in production. const _ = new Subscription(orderPlaced, "send-receipt", { handler: async (event) => { if (handled.has(event.orderId)) return; // At-least-once delivery. handled.add(event.orderId); }, });

The agent runs this with encore run, which delivers messages locally, and checks the subscriber in the trace. After you connect your GCP project, a push creates the topic and subscription in GCP Pub/Sub, runs the service on Cloud Run or GKE, and creates a service account for the service. A SQLDatabase becomes Cloud SQL the same way. The Pub/Sub docs cover delivery guarantees, preview environments give each pull request its own copy, and the same code deploys to AWS if you switch clouds.

Key features

  • Cloud SQL, Pub/Sub, cron jobs and Cloud Storage buckets provisioned from code.
  • A service account for each service.
  • Local infrastructure with encore run.
  • Cloud Run or GKE in your own project.
~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders
An agent adds receipt storage to an orders service and tests it locally with encore run. The same bucket declaration is used in preview environments and production.

Good to know

A generated Express or Next.js backend is ported to Encore's SDK first, which an agent can do with Encore's rules loaded. Frontends deploy separately.

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

Cloud Run source deploy: a URL fast, the rest by hand

Cloud Run

gcloud run deploy my-service --source . uploads the code, builds it with a Dockerfile if one exists or with Google Cloud buildpacks otherwise, based on the Cloud Native Buildpacks project, and deploys it to Cloud Run. For a generated app with one service, it is the shortest path to a URL. Cloud Run bills to the nearest 100 ms, and the free tier covers 240,000 vCPU-seconds and 450,000 GiB-seconds per billing account.

The database, Pub/Sub topics and the IAM bindings the service needs are created separately, and an agent-built app often assumes they exist. By default the service runs as a broad default identity, and Google recommends a dedicated service identity instead.

Firebase App Hosting: Git rollouts for Next.js and Angular

Firebase App Hosting

App Hosting connects through a GitHub app, builds with buildpacks on Cloud Build, stores images in Artifact Registry and serves Cloud Run revisions behind Cloud CDN. A push rolls out to all traffic. It has been generally available since April 2025, needs billing enabled, and includes 10 GiB of outgoing bandwidth at no cost. It is built for web frontends, and workers or scheduled jobs live elsewhere in the project, set up by whoever owns the backend.

Cloud Run MCP server: deploys from the agent, with the developer's identity

Cloud Run MCP server

Google's Cloud Run MCP server runs with npx -y @google-cloud/cloud-run-mcp and uses gcloud credentials and Application Default Credentials. Deploying a folder and the project tools work only when the server runs locally. SKIP_IAM_CHECK defaults to true, which makes deployed services public, so set it to false and point the server at a sandbox project. Like a source deploy, it creates no database or topics.

It suits a prototype the agent wants to show quickly. For anything with users, deploys move to a pipeline with its own identity.

Pulumi: every GCP resource, written by hand

Pulumi

Pulumi can describe any GCP resource the app needs in TypeScript, Python or Go, including service accounts and IAM bindings, and pulumi preview shows the diff before CI runs pulumi up. The CLI is open source and state can use a self-managed backend. Nothing is derived from the application, so the infrastructure program has to be kept in step with the generated code.

Credentials for CI

For pipelines that deploy to GCP, workload identity federation replaces service account keys with short-lived tokens. For Cloud SQL from Cloud Run, Google documents the connection options, including the Cloud SQL connectors.

How to choose

  • Encore when the app needs a database, Pub/Sub and buckets and you want them created with the service, under a service account for each service, in your own GCP project.
  • Cloud Run source deploy for a single container that needs a URL today.
  • Firebase App Hosting for Next.js or Angular frontends with Git rollouts.
  • The Cloud Run MCP server for agent-driven deploys to a sandbox project.
  • Pulumi for full control of every GCP resource in code.

Frequently asked questions

What is the easiest way to deploy an AI-generated app to Google Cloud?

For a single container or web app, gcloud run deploy --source builds the code with Cloud Build, using a Dockerfile if there is one and buildpacks otherwise, and deploys it to Cloud Run. Databases, queues and service account permissions are set up separately.

Can an AI agent deploy to Cloud Run by itself?

Yes. Google's Cloud Run MCP server gives agents tools to deploy local folders and read service logs, using the gcloud credentials on the machine. Use a sandbox project, and set SKIP_IAM_CHECK to false, since it defaults to true and makes deployed services public.

How do I deploy an app with a database and Pub/Sub to GCP with Encore?

Declare a SQLDatabase and a Topic in the code, connect your GCP project once, and push. Encore provisions Cloud SQL, GCP Pub/Sub and Cloud Run or GKE in your project, with a service account per service.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders