Developer’s guide to implementing MCP apps in Gemini
Google Cloud released implementation specifications for SEP-1865 MCP Apps, enabling interactive iframe tools within Gemini Enterprise on Cloud Run.
By Dillip Chowdary • Oct 21, 2026 • Source: Google Cloud Blog
Google Cloud detailed implementation specifications for building interactive Model Context Protocol applications inside Gemini Enterprise. According to Google Cloud Blog's report, author Dave Wang, a Forward Deployed Engineer at Google Cloud, outlines architecture based on the open SEP-1865 specification. The framework pairs backend operational tools with an embedded user interface running inside a sandboxed iframe, letting users modify parameters locally without requiring iterative conversational turns.
This guide explains the decoupled three-tier architecture, dual-layer authentication, and Google Cloud Run deployment steps required to connect custom services to Gemini Enterprise. It covers configuration flags, policy constraints, and console settings for platform engineers and enterprise developers seeking to replace static text responses with responsive, real-time application widgets.
Developer’s guide to implementing MCP apps: what actually changed
Enterprise workplace assistants historically progressed through distinct operational generations that struggled with multi-step workflows. First-generation text chatbots returned static markdown without interactive controls, while second-generation standard Model Context Protocol tools invoked live APIs but remained limited to plain text outputs. Under that second-generation pattern, every minor parameter adjustment forced users to submit another slow chat turn back to the model. The SEP-1865 open specification introduces third-generation interactive applications that pair backend tools directly with a live visual workspace embedded inside Gemini Enterprise.
The updated design allows single-file HTML widgets to render within a sandboxed iframe inside the chat flow, expanding into a dedicated side panel or full-screen view. User edits execute locally on the client browser while keeping the workspace state and assistant synchronized in real time. This mechanism eliminates repetitive round-tripping for adjustments, enabling purpose-built workflows such as legal document redaction, three-dimensional CAD inspection, and financial sensitivity models. If a client host lacks interface support, the open standard automatically defaults back to structured text generation.
Developer’s guide to implementing MCP apps: how it works

The system operates across three decoupled physical tiers that isolate responsibilities and enforce communication boundaries. In the browser tier, the client displays the chat interface alongside the active side-panel widget. Gemini Enterprise forms the middle orchestration tier, where the built-in Default Assistant calls declared tools, the AppBridge proxy relays widget messages, and a connector manages user tokens. Google Cloud serves as the third tier within the customer project, hosting the custom server on Cloud Run to expose a POST /mcp JSON-RPC endpoint, run background tasks, and serve the widget.
Security relies on two independent authentication layers verified on every incoming request. Layer one uses Cloud Run Identity and Access Management enforced at Google's edge to verify service identities, rejecting unauthenticated callers with an HTTP 403 status. Layer two enforces in-application OAuth 2.0 to confirm end-user identity, returning an HTTP 401 challenge whenever credentials expire or prove invalid. Cloud Run IAM cannot distinguish between separate workforce members, making both validation stages mandatory. Outbound connections from the server container to internal databases, Cloud Storage, or BigQuery use least-privilege service account credentials.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Developer’s guide to implementing MCP apps: why it matters now
Enterprise engineering teams often struggle with the overhead of maintaining bespoke authentication pipelines, custom chat interfaces, and complex role-based access systems for internal artificial intelligence tools. By deploying SEP-1865 servers into Gemini Enterprise, organizations eliminate the need to rebuild those foundational layers. Gemini natively provides workforce single sign-on, enterprise governance controls, and conversational routing through its Default Assistant. Developers focus entirely on domain logic, delivering responsive interfaces that execute single-click operations instantly in the side panel while maintaining unified session context and full audit visibility across company datasets.
Human-in-the-loop governance forms a central pillar of this model, particularly for high-stakes operational environments. Legal practitioners, financial analysts, and compliance specialists can visually inspect, adjust, and approve actions inside the specialized widget before an automated system finalizes transactions or writes changes to external databases. Because the protocol integrates directly with Google Cloud services such as Agent Platform, BigQuery, and enterprise resource planning software, organizations can modernize internal workflows safely. The open design guarantees cross-platform portability across compatible hosts while preserving corporate data perimeters behind private cloud ingress.
Developer’s guide to implementing MCP apps: who is affected
Platform administrators, cloud engineers, and software architects managing Google Cloud environments must prepare specific infrastructure prerequisites before deploying these applications. Administrators must enable four core APIs: Cloud Run, Discovery Engine, Agent Platform, and Organization Policy. They must also update organizational policies by overriding the discoveryengine.managed.disableCustomMcpServerConnector constraint. Identity teams must configure an OAuth 2.0 Web Client credential using redirect URI https://vertexaisearch.cloud.google.com/oauth-redirect, while granting the invoker role (roles/run.invoker) on Cloud Run directly to the project Discovery Engine service agent.
Administrators configuring connectors in the Google Cloud Console require roles/discoveryengine.editor permissions and must verify networking rules across allowedEgressFqdns and allowedDataSources to ensure custom_mcp traffic reaches external endpoints. Enterprise end users across legal, engineering, and financial departments experience a significant operational shift away from purely conversational prompts. Instead of waiting for repetitive text replies, employees manipulate interactive controls, evaluate data tables, and run simulations directly within Gemini, completing sensitive approvals faster and eliminating manual round-trips through chat prompts.
Developer’s guide to implementing MCP apps: what to watch
Server deployment requires specific Cloud Run runtime flags to avoid execution failures during asynchronous background operations. When deploying the container from source using gcloud run deploy, developers must pass --no-allow-unauthenticated to block public ingress, specify --min-instances=1 to maintain warm availability, and apply --no-cpu-throttling. The CPU throttling flag is critical because it prevents background tasks and polling operations from freezing between get_app_state status checks. Backend tools should be engineered to deliver asynchronous tool responses in under two seconds, ensuring the UI remains responsive.
Registration settings inside Gemini Enterprise require careful manual configuration to avoid authentication and routing pitfalls. When creating the custom data store, administrators must enter the Cloud Run service URL with the /mcp path, set https://accounts.google.com/o/oauth2/v2/auth for authorization, use https://oauth2.googleapis.com/token for token retrieval, and specify openid email profile scopes. Teams should check PKCE Support and leave HTTP Basic Auth unchecked to prevent invalid_client errors. Finally, administrators must attach the connector as a connected data store rather than an external agent, then manually enable imported actions under data store settings.
Developer Action Items
- ☐ Diff the official changelog for Gemini / Google / Framework 2.0 before you bump — APIs, defaults, and removed flags only.
- ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
- ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
- ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
- ☐ If Google Cloud Blog did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.
Developer’s guide to implementing MCP apps FAQ
What is SEP-1865 in the Model Context Protocol?
SEP-1865 is an open Model Context Protocol extension that pairs backend tools with interactive user interface widgets inside client hosts. In Gemini Enterprise, the interface renders inside a sandboxed iframe that operates locally while synchronizing with the assistant.
How does dual-layer authentication protect custom MCP servers on Cloud Run?
Layer one enforces Cloud Run Identity and Access Management at Google's edge to authenticate the Discovery Engine service agent and block public callers. Layer two validates user OAuth 2.0 tokens inside the application to verify individual workforce identity.
Which Cloud Run deployment flags are required for MCP app backends?
Deployments must specify --no-allow-unauthenticated to restrict ingress, --min-instances=1 to ensure service availability, and --no-cpu-throttling to prevent background jobs from freezing between get_app_state polling cycles. Tool endpoints must return asynchronous responses in under two seconds.
Why should administrators connect an MCP server as a data store rather than an agent?
Connecting the server as a data store gives the native Default Assistant access to tools and UI widgets directly in the main chat. The Add Agent option is reserved for external sub-agents rather than Model Context Protocol data stores.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement