> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connections from an agent

> Connect your own account to a source by asking Claude, ChatGPT or any MCP client. The agent hands you a secure link and never sees your credentials.

With Croma connected over MCP, you connect an account by asking for it. The
agent never takes your credentials. It answers with a secure link to the
console, where you enter them yourself.

> [!NOTE]
>
> Connect Croma first on the [MCP server](https://docs.usecroma.com/mcp-server.md) page. A connection made
> from an agent is the same one the [API](https://docs.usecroma.com/connections.md) and the console at
> [platform.usecroma.com/connections](https://platform.usecroma.com/connections) manage.

## Ask for it

Say which account to connect. For example:

* "Connect my SUNARP account."
* "Conecta mi cuenta de la DIAN."
* "Show me my SUNARP connections."
* "Delete my Bancolombia connection."

## What the agent does

**1. Starts the connection**

It calls the source's connect tool, for example `sunarp_connect`. The tool
takes no account details and answers with a `setup_url`, valid for 30
minutes.

**2. Gives you the link**

You open it, sign in to the Croma console, enter the account's details
there and confirm the account is yours or that you are authorized to use
it. The details are encrypted on arrival and checked with the source.

**3. Confirms it is active**

When you say you are done, it calls `sunarp_list_connections` and tells you
the connection's state.

**4. Queries the source**

From then on it queries the source like any other.

```mermaid theme={"dark"}
sequenceDiagram
  autonumber
  participant User
  participant Agent as Your agent
  participant API as Croma API
  participant Console as Croma console
  User->>Agent: "Connect my SUNARP account"
  Agent->>API: sunarp_connect
  API-->>Agent: setup_url (30 minutes)
  Agent-->>User: the link
  User->>Console: sign in, enter the account's details
  Console->>API: encrypted on arrival, checked with the source
  User->>Agent: "Done"
  Agent->>API: sunarp_list_connections
  API-->>Agent: active
```

## The tools

Each source has its own three tools, named after it.

| Tool | What it does |
| - | - |
| `sunarp_connect` | Starts a connection and answers with a secure link to the console. |
| `sunarp_list_connections` | Your organization's connections for the source, with each one's id, state and the sign-ins used today. |
| `sunarp_delete_connection` | Deletes one connection by id. Its credentials are destroyed permanently. |

[Sources with connections](https://docs.usecroma.com/connections-sources.md) lists the tools of every
source.

## Tips

* **Never paste a password into the chat.** The agent does not need it and
  does not ask for it.
* **The link lasts 30 minutes.** Ask for a new one if it expired.
* **A second account means different things by source.** SUNARP accounts are
  interchangeable, so a second one adds capacity and a query moves to it when
  the first reaches its daily allowance. On DIAN and Bancolombia each
  connection reads its own account, so say which one to use.
* Clients that load tools on demand, like Claude, find these tools when they
  search for "connect". If yours does not, ask it to use `sunarp_connect`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.