> 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](https://cloud.google.com/gemini/enterprise) connects to CARTO through a **custom MCP server data store**, configured in the Google Cloud console. Once connected, you can also upload the [CARTO Agent Skills](/carto-for-agents/agent-skills.md) so the agent uses the CARTO tools well.

## Requirements

* A **Gemini Enterprise** license and a Google Cloud project.
* The **Discovery Engine Editor** role (`roles/discoveryengine.editor`) to create the data store.
* Your CARTO [MCP Server URL](/carto-for-agents/mcp-server.md#get-your-mcp-server-url).
* A CARTO **SPA OAuth Client**. You create it in the [OAuth step](#2-connect-via-oauth) below.
* For Agent Skills, an administrator with the **Gemini Enterprise Admin** role (`roles/discoveryengine.agentspaceAdmin`).

{% 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 %}

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Frw0Cz1gBurlRJpd6MQLR%2Fgeminient_1.png?alt=media&amp;token=50dae9eb-9280-4522-943a-b73716cf7735" alt=""><figcaption></figcaption></figure>

## Connect the CARTO MCP Server

### 1. Create the data store

1. In Google Cloud Console, open **AI Applications > Data stores > Create data store**.
2. Under **MCP servers**, pick the **Custom MCP Server** card and click **Add MCP server**.
3. Under **MCP Server Configuration**, choose **OAuth 2.0**.

### 2. Connect via OAuth

1. In CARTO, go to **Developers > Credentials > SPA OAuth Clients** and click **Create new > SPA OAuth Client**. Set the **Application Login URL** to Gemini Enterprise's redirect URI:

   ```
   https://vertexaisearch.cloud.google.com/oauth-redirect
   ```

   Save, then copy the **Client ID** and **Client Secret**.
2. Back in Google Cloud Console, fill in the **MCP Server Configuration** fields:

   | Field                        | Value                                                                                                                                                |
   | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
   | MCP Server URL               | Your [MCP Server URL](/carto-for-agents/mcp-server.md#get-your-mcp-server-url). Use the **SSO login** URL if your organization signs in through SSO. |
   | Authorization URL            | `https://auth.carto.com/authorize`                                                                                                                   |
   | Authorization URL Parameters | `&audience=carto-cloud-native-api`                                                                                                                   |
   | Token URL                    | `https://auth.carto.com/oauth/token`                                                                                                                 |
   | Client ID / Client Secret    | From the SPA OAuth Client you just created                                                                                                           |
   | Scopes                       | `openid profile email read:workflows write:workflows`                                                                                                |

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>The <strong><code>&#x26;audience=carto-cloud-native-api</code></strong> parameter is easy to miss. Without it, sign-in appears to succeed but the connection can't use any CARTO tools.</p></div>
3. Click **Verify Auth** and complete the CARTO sign-in. If it fails, see [Troubleshooting](#troubleshooting).
4. Click **Continue**, name the data connector, select a pricing tier, and click **Create**.
5. Wait until the connector status changes from **Creating** to **Active**. This can take a few minutes; refresh the page to check.
6. Open the data store, go to the **Actions** tab, and click **Reload custom actions** to fetch CARTO's tool list.
7. Enable the tools you want to use. All tools are disabled by default.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FBysm43u4lO5pnZoYNPrA%2FScreenshot%202026-08-28%20at%2012.16.48.png?alt=media&amp;token=2e980dfe-40a3-4488-92b0-216b9b0effff" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FYsWkrjyNhLqxqEQJycDn%2FScreenshot%202026-08-28%20at%2012.24.56.png?alt=media&amp;token=4c0f7d8c-0c9e-4e1e-b334-c08027f132ba" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Registering an MCP server creates a **billable data store**, even when it isn't linked to an app. Remove data stores you no longer need.
{% endhint %}

{% hint style="info" %}
Gemini Enterprise can't render maps inline, so leave the `view_map` tool disabled or ask the agent for the map URL and open it in CARTO.
{% endhint %}

### 3. Link the data store to your Gemini Enterprise app

1. In **AI Applications**, open **Apps**.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FOIM2cWeCOjvdR3jzv8pg%2Fgeminient_5.png?alt=media&amp;token=64ed3718-a7a3-4ff9-9dc5-a034becb66fe" alt=""><figcaption></figcaption></figure>

2. Create a Gemini Enterprise app or open an existing one.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FHwfyKOJa1PmGmCOHuen1%2Fgeminient_6.png?alt=media&amp;token=569de562-5491-4187-9bd8-8045a6498c7f" alt=""><figcaption></figcaption></figure>

3. On the **Connected data stores** tab, click **Connect an existing data store** and select the CARTO data store you just created.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FYD7ekeRVxjz1VyrzQeIC%2Fgeminient_7.png?alt=media&amp;token=1467d073-6300-422f-8eae-92bf0113988a" alt=""><figcaption></figcaption></figure>

4. In the Gemini Enterprise chat, authorize the CARTO connector when prompted.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2FJAZixkjsCRVSbXUBQaT3%2Fgeminient_8.png?alt=media&amp;token=fd3b7832-06fe-4881-b211-2cfc81f1d461" alt=""><figcaption></figcaption></figure>

## Add the CARTO Agent Skills

[CARTO Agent Skills](/carto-for-agents/agent-skills.md) are playbooks that teach the agent how to use the CARTO tools well: which tool to reach for, the right SQL dialect per warehouse, and recipes for common spatial analyses.

1. **Enable skills.** An administrator opens your app in Google Cloud Console, goes to **Configurations > Feature Management**, and turns on **Enable skills**. Until then, the **Skills** menu doesn't appear in Gemini Enterprise.
2. **Upload the skills.** From the **Skills** menu, upload each CARTO skill as a ZIP file. You can select several at once. See [Agent Skills → Installation](/carto-for-agents/agent-skills/installation.md) for how the skills are distributed.
3. **Use them.** Ask something CARTO-specific, such as "List my CARTO maps". The agent picks the matching skill, or you can call one with `@` and the skill name.

## Troubleshooting

* **"Callback URL mismatch"** — the SPA OAuth Client's **Application Login URL** isn't `https://vertexaisearch.cloud.google.com/oauth-redirect`. Fix it in **Developers > Credentials > SPA OAuth Clients** and click **Verify Auth** again.
* **"\[401010] Unauthorized"** — you signed in to CARTO as a user from a different organization than the one that owns the SPA OAuth Client. Sign out and sign in with the right user.
* **"Failed to reload custom actions"** — the connector is still **Creating**. Wait until it's **Active** and retry.
* **Sign-in works but there are no tools** — the **Authorization URL Parameters** field is missing `&audience=carto-cloud-native-api`, or the MCP Server URL was typed by hand. Fix it and click **Reload custom actions**.
* **Sign-in doesn't use your identity provider** — your organization uses SSO. Use the **SSO login** URL as the MCP Server URL.

For general OAuth issues, see [Connecting with OAuth](/carto-for-agents/mcp-server/connecting-with-oauth.md#troubleshooting).


---

# 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.
