For the complete documentation index, see llms.txt. This page is also available as Markdown.

Snowflake CoCo

Snowflake CoCo is Snowflake's coding agent, available in Snowsight, as a desktop IDE, and as a CLI that runs in your local shell. It can work with CARTO through a remote MCP server, the CARTO Agent Skills, and the CARTO CLI.

  • CARTO MCP: gives CoCo access to CARTO tools.

  • CARTO Agent Skills: gives CoCo reusable CARTO-specific instructions and workflows.

  • CARTO CLI: provides command-line access for scripting, automation, and administration.

Together, these let CoCo use CARTO tools while following CARTO-specific patterns and processes.

CoCo is the coding agent. For the chat surface, where CARTO is reached through a Cortex agent and an MCP Connector, see Snowflake CoWork.

MCP

Connect to the MCP Server

First, copy your MCP Server URL from CARTO Workspace > Settings > CARTO MCP Server. Then add CARTO with the CoCo CLI:

cortex mcp add carto https://<region>.api.carto.com/mcp/<account_id> --type http

Alternatively, add the server manually to ~/.snowflake/cortex/mcp.json:

{
  "mcpServers": {
    "carto": {
      "type": "http",
      "url": "https://<region>.api.carto.com/mcp/<account_id>",
      "oauth": {
        "client_id": "<your SPA client id>",
        "redirect_port": 8585,
        "scope": "openid profile email read:workflows write:workflows"
      }
    }
  }
}

Replace <region> and <account_id> with the values from your CARTO MCP Server URL.

Use cortex mcp list to confirm the server is registered.

Authentication

CoCo uses OAuth to authenticate to CARTO. Before connecting the MCP server, create and configure a SPA OAuth Client in CARTO.

1. Create a SPA OAuth Client

In CARTO, go to Developers > Credentials > SPA OAuth Clients and create a new client.

2. Configure the callback URL

CoCo uses a local callback to complete the OAuth flow.

When configuring the SPA OAuth Client:

  1. Open the client you created.

  2. Turn off Use default logout/callback URLs and Origins.

  3. Add the callback URL using the port configured in CoCo's redirect_port.

For example:

Make sure the port in the callback URL matches the redirect_port you configure in CoCo.

3. Connect the MCP Server

Configure the CARTO MCP Server in CoCo using the MCP Server URL and the SPA OAuth Client ID:

4. Sign in to CARTO

The first time CoCo connects to the CARTO MCP Server, it opens a browser window. Sign in to CARTO to authorize the connection.

Once authentication is complete, CoCo can use the CARTO tools available through MCP.

If sign-in fails with a callback error, check the redirect_uri parameter in the authorization URL in your browser. This shows the exact callback URL CoCo is using, which must be registered on the SPA OAuth Client.

See Connecting with OAuth for the shared OAuth mechanics.

CARTO CLI

The CoCo CLI runs in a terminal, so the CARTO CLI can be used alongside MCP and Agent Skills for scripting, automation, and administration.

Install the CLI:

Authenticate:

The CLI is useful when a task is better suited to command-line operations, scripting, or CARTO administration than to an MCP tool call.

Agent Skills

CARTO Agent Skills complement MCP and the CLI. They provide CARTO-specific instructions and workflows that help CoCo use both interfaces consistently and idiomatically.

CoCo reads skills from several locations, including .claude/skills/ in a project and ~/.claude/skills/ for a user, alongside its own .cortex/skills/ and ~/.snowflake/cortex/skills/. Each skill is a folder containing a SKILL.md file with YAML frontmatter.

If you have already installed the CARTO Agent Skills for another coding agent that uses ~/.claude/skills/, CoCo picks them up with no further setup. Otherwise, see Agent Skills → Installation.

MCP provides CoCo with access to CARTO tools, while the CLI provides command-line capabilities. Skills provide the guidance for using them effectively.

Last updated

Was this helpful?