> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-for-agents/connect-your-platform/google-gemini-enterprise.md).

# Google Gemini Enterprise

Gemini Enterprise (now **AI Applications** in the Google Cloud console) connects to CARTO as a **custom MCP data store**. Setup is fully manual and requires a GCP project admin — there's no end-user self-serve path — but over OAuth the agent reaches CARTO's full tool surface.

## Requirements

* A Gemini Enterprise license and the **Discovery Engine Editor** role (`roles/discoveryengine.editor`).
* Your CARTO **MCP Server URL**.
* A CARTO **SPA OAuth Client** (Client ID + Secret) — OAuth is mandatory here; there's no API-key option. See [Connecting with OAuth](/carto-for-agents/mcp-server/connecting-with-oauth.md#1-create-the-client-in-carto).

{% hint style="info" %}
Custom MCP lives under **Data Stores**, not under Agents or Actions. Admin console: [console.cloud.google.com/gen-app-builder](https://console.cloud.google.com/gen-app-builder).
{% endhint %}

## Steps

1. Google Cloud console > **AI Applications > Data Stores > Create data store**.
2. In the **MCP servers** section, pick the **Custom MCP Server** card and click **Add MCP server**.
3. **MCP Server Configuration** — choose **OAuth 2.0** and fill in:

   * **MCP Server URL** — your CARTO MCP URL.
   * **Authorization URL** — `https://auth.carto.com/authorize`
   * **Token URL** — `https://auth.carto.com/oauth/token`
   * **Client ID / Secret** — from CARTO.
   * **Scopes** — `openid profile email read:workflows write:workflows` (space-separated).
   * **Authorization URL Parameters** — set this to `audience=carto-cloud-native-api`.

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>The <strong><code>audience=carto-cloud-native-api</code></strong> parameter is required and easy to miss. Without it, CARTO can issue a token the MCP server rejects.</p></div>
4. Click **Verify Auth** and complete the CARTO consent popup. The wizard blocks saving until authentication succeeds.
5. If Gemini shows a redirect URL, register it on your CARTO SPA client's **Allowed Callback URLs** (turn off "Use default logout/callback URLs and Origins" first).
6. **Continue**, set the data connector name, pick a pricing tier, and **Create**. The connector goes `Creating > Active`.
7. Open the data store > **Actions** tab > **Reload custom actions**. This fetches CARTO's tool list.
8. Enable the tools you want — **everything is off by default**.
9. Link the data store to a Gemini Enterprise app.

<figure><img src="/files/PaSOsCIYuqOsGPdxdIln" alt="The AI Applications Data Stores list showing CARTO connected as Custom MCP Server data stores"><figcaption><p>CARTO connected in Gemini Enterprise as a Custom MCP Server data store</p></figcaption></figure>

{% hint style="warning" %}
Registering an MCP server creates a **billable data store**. Unlinked data stores still cost money — remove strays when you're done.
{% endhint %}

{% hint style="info" %}
The map tool (`view_map`) appears in the list but can't render inline here — Gemini has no MCP Apps surface. Leave it off, or ask the agent for map URLs and open them in CARTO.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.carto.com/carto-for-agents/connect-your-platform/google-gemini-enterprise.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
