# Overview

**CARTO for Agents** lets AI agents (Claude, ChatGPT, Cursor, Gemini, and others) work directly with the CARTO platform. Agents can connect to data warehouses, import and export geospatial data, build Builder maps, author and run workflows, expose those workflows as MCP tools, and check usage and activity.

There are three pieces:

* [**CARTO CLI**](/carto-for-agents/cli.md). A command-line interface (`@carto/carto-cli`) that exposes nearly every platform operation as a script-friendly command. Used by humans in a terminal, and by agents through tool use.
* [**CARTO MCP Server**](/carto-for-agents/mcp-server.md). A hosted [Model Context Protocol](https://modelcontextprotocol.io/) server that exposes built-in CARTO tools and any workflow you publish, ready to plug into web and desktop AI clients (Claude.ai, ChatGPT, MCP Inspector, Gemini CLI).
* [**CARTO Agent Skills**](/carto-for-agents/agent-skills.md). A public catalog of skill playbooks at [`CartoDB/agent-skills`](https://github.com/CartoDB/agent-skills) that teaches AI coding tools (Claude Code, Codex, Gemini CLI, Skills CLI) how to drive CARTO without re-discovering the API every session.

## Choose your tool

| You want to…                                                                                       | Use this                                                                                                |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Run CARTO operations from a script, CI/CD pipeline, or terminal                                    | [CARTO CLI](/carto-for-agents/cli.md)                                                                   |
| Let a chat agent (Claude.ai, ChatGPT, Gemini) call CARTO tools mid-conversation                    | [CARTO MCP Server](/carto-for-agents/mcp-server.md)                                                     |
| Have an AI coding agent (Claude Code, Cursor, Codex, Gemini CLI) operate CARTO inside your project | [CARTO CLI](/carto-for-agents/cli.md) + [CARTO Agent Skills](/carto-for-agents/agent-skills.md)         |
| Expose your own analytical workflow as an MCP tool an agent can call                               | [Workflows as MCP Tools](/carto-user-manual/workflows/workflows-as-mcp-tools.md) (in CARTO User Manual) |

## Using all three together

The three pieces are not mutually exclusive. In a coding harness like **Claude Code**, you can wire up any or all of them depending on what the agent needs to do.

* [**CARTO CLI**](/carto-for-agents/cli.md) runs locally and can be called by any agent that can execute shell commands. The agent uses `carto` to create maps, execute workflows, import data, manage credentials, and query the warehouse.
* [**CARTO MCP Server**](/carto-for-agents/mcp-server.md) speaks the standard Model Context Protocol, so it works with any compatible MCP client. Confirmed in production: Claude.ai, ChatGPT, Claude Desktop, MCP Inspector, MCP Jam. The agent renders interactive maps inline (via `view_map` and `load_builder_map`), calls any workflow you've published as an MCP tool, and discovers your connections and saved maps directly from the conversation.
* [**CARTO Agent Skills**](/carto-for-agents/agent-skills.md) ships installation paths for **Claude Code**, **Skills CLI**, **Codex**, and **Gemini CLI** today (see [Installation](/carto-for-agents/agent-skills/installation.md)). Other coding harnesses can consume the same skills if they support a compatible plugin or rules mechanism. The agent uses the skill to pick the right CLI flags, SQL dialect, async-job patterns, and use-case playbook for each request.

Workflows you build in CARTO can be published as new tools across **all three** surfaces. The same workflow is reachable from the CLI, from the MCP Server, and referenced by the skill playbooks.

{% hint style="info" %}
Looking for the **AI Agents you build inside Builder maps** (in-product agents bound to a map's data and tools)? That's a different product surface. See [CARTO User Manual → AI Agents](/carto-user-manual/ai-agents.md). Looking to **embed AI-powered map interaction in your own application**? See [CARTO for Developers → Build an AI-powered map application](/carto-for-developers/guides/build-an-ai-powered-map-application.md).
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.carto.com/carto-for-agents/carto-for-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
