> 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/getting-started/quickstart-guides/connecting-carto-to-your-agents.md).

# Connecting CARTO to your agents

This quickstart connects your AI assistant to CARTO and builds your first map from a natural-language prompt — no code, no CLI. You'll use the [CARTO MCP Server](/carto-for-agents/mcp-server.md), which plugs CARTO into Claude, ChatGPT, Gemini Enterprise, Microsoft Copilot Studio, and other AI clients.

**What you'll need:**

* A [CARTO account](https://carto.com/signup) with a connected data warehouse (the built-in CARTO Data Warehouse works fine).
* An AI client that supports remote MCP servers — [Claude](/carto-for-agents/connect-your-platform/claude.md) is the quickest to set up.

## Step 1: Get your MCP Server URL

In CARTO Workspace, go to **Developers > Workflow API & MCP Server** and copy your **MCP Server URL**. It looks like:

```
https://<region>.api.carto.com/mcp/<account_id>
```

If your organization uses single sign-on, copy the **SSO login** URL instead.

## Step 2: Connect your AI client

Add the URL as a new MCP server in your client, then sign in to CARTO when prompted. Claude connects with just the URL — nothing else to configure.

* [Claude](/carto-for-agents/connect-your-platform/claude.md) (Claude.ai and Desktop)
* [ChatGPT](/carto-for-agents/connect-your-platform/chatgpt.md)
* [Microsoft Copilot Studio](/carto-for-agents/connect-your-platform/microsoft-copilot-studio.md)
* [Google Gemini Enterprise](/carto-for-agents/connect-your-platform/google-gemini-enterprise.md)
* [All platforms →](/carto-for-agents/connect-your-platform.md)

{% hint style="info" %}
Sign in over **OAuth** for the full experience — creating and editing maps, running Workflows, and admin. An [API Access Token](/carto-for-agents/mcp-server/connecting-with-api-tokens.md) is a quick read-and-discovery alternative (browse, query, and search — no authoring).
{% endhint %}

## Step 3: Ask your agent to build a map

Once connected, confirm the tools are live with a simple prompt:

> **List my CARTO connections and the tables in each.**

Then build your first map. Paste this prompt and adjust the table name to one of your own (or use a Data Observatory dataset):

> **Explore my CARTO data, then create a Builder map from `<your_connection>.<your_schema>.<your_table>`. Pick a sensible geometry or spatial-index column, style it clearly, add a legend, and set the map to private. Show me the result and give me the link to open it in CARTO.**

Your agent will explore the connection, inspect the table, compose the map, create it in CARTO Builder, and return a link. On [hosts that render maps inline](/carto-for-agents/connect-your-platform.md#which-platforms-render-maps-inline) (Claude.ai, ChatGPT, Claude Desktop), it also shows the map right in the conversation.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-f8cf9958402f06fd62552e613526db50fe34c1b7%2Fcarto-agents-hero-map-inline.png?alt=media" alt="An agent building a CARTO map from a prompt and rendering it inline in the conversation"><figcaption><p>Example: an agent builds a map from a prompt and renders it inline</p></figcaption></figure>

## Keep going

Try these next:

> **Add a histogram widget and a category filter to that map, then make it public.**

> **Build a Workflow that filters this table to the last 30 days, spatially joins it to my regions table, aggregates by region, and saves the result. Then run it and summarize the output.**

> **Enrich my stores table with population and income from the Data Observatory, then map the result.**

## Where to go next

* [**CARTO MCP Server**](/carto-for-agents/mcp-server.md) — everything your agent can do, and how to connect each platform.
* [**MCP Tools Reference**](/carto-for-agents/mcp-server/tools-reference.md) — the full tool catalog.
* [**CARTO Agent Skills**](/carto-for-agents/agent-skills.md) — teach coding agents (Claude Code, Codex, Gemini CLI) the right CARTO patterns.
* [**CARTO CLI**](/carto-for-agents/cli.md) — scripting, CI/CD, and advanced automation.


---

# 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/getting-started/quickstart-guides/connecting-carto-to-your-agents.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.
