AI Cloud Architect

How to securely connect internal Cloud Run MCP servers to Gemini Enterprise

GoogleHow-to by Neeraj AgrawalGoogle Developers Blog

How to connect Gemini Enterprise privately to internal StreamableHTTP MCP servers on Cloud Run using Egress Agent Gateway, Private Service Connect, FQDN-scoped Private Cloud DNS, and dual-header OAuth 2.0 authentication.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Shows a private setup for Gemini Enterprise to reach internal Cloud Run MCP servers, using Egress Agent Gateway, Private Service Connect and a hostname-scoped private DNS zone.

Who it is for

Teams running custom MCP servers on Cloud Run for Gemini Enterprise agents that must stay off the public internet.

Key points

  • Cloud Run internal-only ingress returns HTTP 404 to default public calls from Gemini Enterprise.
  • Two authentication layers: Cloud Run IAM invoker check plus user OAuth 2.0 Bearer token validated in the app.
  • Private Cloud DNS zone covers only the MCP service hostname, so Shared VPC DNS for other Cloud Run services is not overridden.
  • Reference code and setup scripts are on GitHub, covering two private routing options.

The same at other vendors