How to connect Gemini Enterprise to Anchor
A Google Cloud admin adds Anchor to your Gemini Enterprise app once. Then everyone in the app signs in with their own Anchor account.
Gemini Enterprise
Gemini Enterprise doesn't register itself with Anchor, so an admin gets a client ID from Anchor first, then adds Anchor as a custom MCP server in the Google Cloud console and turns on its actions.
Before you start: you need the Discovery Engine Editor role on the Google Cloud project. Gemini Enterprise blocks custom MCP servers by default, so an Organization Policy Administrator must first override the Disable custom MCP server connector for Gemini Enterprise policy for the project and set its enforcement to Off.
Get a client ID from Anchor
- Open Cloud Shell in the Google Cloud console, or any terminal, and run:
- Copy the
client_idvalue from the response. You'll paste it in the next part.
Add Anchor to your Gemini Enterprise app
- In the Google Cloud console, go to Gemini Enterprise → Apps and select your app.
- Open Connected Data Stores and click New data store. Search for Custom MCP Server, select it, and click Add MCP server.
- Under Authentication settings, choose OAuth 2.0 and fill in:
- MCP Server URL:
- Authorization URL:
- Token URL:
- Client ID: the
client_idyou copied - Client Secret: any text, such as unused. Anchor doesn't issue client secrets, but the field can't be empty.
- Scopes:
- Enable PKCE Support: on
- Use HTTP Basic Authentication: off
- Click Verify Auth. A sign-in window opens. Use your Anchor account and click Grant access. Then click Continue.
- Click Continue again to skip Advanced options.
- Pick a location, name the data connector Anchor, and click Create.
Turn on Anchor's actions
- Wait for the data store's status to change from Creating to Active, then open it.
- Go to Actions and click Reload custom actions.
- Select all of Anchor's actions and click Enable actions.
- In your Gemini Enterprise app, ask "What is Anchor, and what can I use it for?" The first time, each person is asked to sign in with their own Anchor account.