← Technology, Science & Infrastructure ▣ Distilled locally

Developer’s guide to implementing MCP apps in Gemini

By Dave Wang
October 19, 2026  ·  Google Cloud Blog ↗

Enterprise assistants still respond mostly in text. However, that can break down for visual, multi-step work, where every adjustment costs another slow chat turn.

MCP Apps (SEP-1865) solves this. This open Model Context Protocol (MCP) extension pairs a tool with a live UI. In Gemini Enterprise, that UI renders directly in the chat flow inside a sandboxed iframe, and can expand to fullscreen or a side panel. Edits run locally while the workspace and assistant stay synchronized.

You also avoid rebuilding core foundations: Gemini provides workforce sign-in, governed data access, and the Default Assistant, while you host your MCP server on a private Cloud Run service.

Why we need MCP Apps

Enterprise assistants have evolved through three generations:

Building MCP Apps in Gemini delivers six benefits:

  1. Responsive user experience: Single-click actions execute directly in the panel without round-tripping through the chat.

  2. Purpose-built workflows: Deliver visual redaction views for legal review, 3D viewers for CAD, or sensitivity models for finance.

  3. Enterprise security: Workforce OAuth sign-in, private Cloud Run ingress, and a sandboxed iframe protect every layer.

  4. Human-in-the-loop governance: Experts inspect and approve high-stakes actions before execution.

  5. Open standard: Portable across compatible hosts, with automatic text fallback.

  6. Broad connectivity: Connect to BigQuery, Agent Platform, Cloud Storage, or internal ERP and CRM systems.

High-level architecture

2-high level architecture

Three decoupled tiers work together:

Each tier talks only to its neighbor, letting Gemini Enterprise enforce security and routing.

Authentication with two independent layers

3-Authentication

Each user signs in through OAuth 2.0. On every call, Gemini Enterprise sends its service agent token alongside the user's OAuth token:

Cloud Run IAM cannot distinguish end users, so both layers are required. Outbound calls use a least-privilege service account.

Build, deploy on Google Cloud, and register in Gemini Enterprise

First, build your custom MCP server (exposing POST /mcp and a bundled ui:// HTML widget) using the MCP Apps SDK, or use Google Antigravity to scaffold and deploy your MCP App with this starter prompt:

Once your MCP server code is ready, deploy it to Cloud Run and connect it to Gemini Enterprise:

Configuration field

Value

MCP Server URL

https://<your-cloud-run-service>.run.app/mcp

Authorization URL

https://accounts.google.com/o/oauth2/v2/auth

Token URL

https://oauth2.googleapis.com/token

Client ID and Secret

Your Web OAuth 2.0 Client ID and Secret

Scopes

openid email profile

Enable PKCE Support

Checked (recommended)

Use HTTP Basic Auth

Unchecked (avoids invalid_client errors)

4-Step 6 enable actions
5-Step 7 connect datastore

Build your own

An MCP App pairs backend tools with a live workspace in Gemini Enterprise. You do not build a chat frontend or identity pipeline; you deploy one Cloud Run container and attach it as a Data Store, making Gemini Enterprise where enterprise work gets done.

Originally published by Google Cloud Blog ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.