Academy
CLI and MCP

Dattos CLI: installation and getting started

The Dattos CLI is the platform’s command-line interface — built to operate Dattos through scripts, automation pipelines, and artificial intelligence agents. All output is in JSON (easy to handle in any language or with jq), errors are returned in a structured format with guidance on how to fix them, and the same installation also includes the Python SDK and the MCP server for artificial intelligence assistants.

Requirements and installation

  • Python 3.11 or later, on any operating system.

  • Install with pip:

pip install dattos
  • Check the installation:

dattos version

The installation provides three commands: dattos (the CLI), dattos-mcp (MCP server for artificial intelligence assistants), and dattos-mcp-http (a hosted-use server variant).

Authentication

  1. Generate your API key on the platform: go to your profile (menu My Profile > API Key), create a new key, and copy the generated value — it starts with api-.

  2. Configure the CLI with your instance and key:

dattos config set api-url "minha-empresa"
dattos config set api-key "api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

In api-url, just use the instance name — the CLI completes it to https://minha-empresa.dattos.com.br/dattos.api.

Alternatives:

  • dattos auth login — interactive login with username and password (generates a session token).

  • dattos auth login --browser — opens the API key page in the browser so you can create and paste the key.

  • Environment variables, ideal for CI/CD pipelines: DATTOS_API_URL, DATTOS_API_KEY, DATTOS_FOLDER_ID and DATTOS_PROFILE. Environment variables take precedence over local configuration.

Credential security: the key is stored in the operating system’s vault (Windows Credential Manager, macOS Keychain, or Secret Service on Linux), never in plain text. The connection requires HTTPS. Use dattos auth status to check the active method and dattos auth logout to clear the credentials.

Basic concepts

  • Folders: many operations run in the context of a working folder. Select one with dattos folders select (interactive list) and check it with dattos folders current.

  • Profiles: for those working with more than one instance or environment, dattos config profile list and dattos config profile switch <nome> switch between complete configurations.

  • Output and errors: results in JSON on stdout; errors in JSON on stderr with a next_step field guiding the fix. Exit codes: 0 success, 1 API error, 2 authentication or configuration error — ready for flow control in scripts.

  • Diagnostics: dattos doctor validates configuration, connectivity, and authentication at once (with --deep, it also tests the platform’s artificial intelligence services).

First complete flow

Create a reconciliation with the help of Dattos AI and run it, straight from the terminal:

dattos folders select 2473
dattos etl create --name "Conciliação Vendas"
dattos etl add-source --etl 891 --file vendas.xlsx
dattos etl add-source --etl 891 --file extrato.csv
dattos etl pipeline create "Conciliar vendas com extrato por valor e data" --etl 891
dattos etl start 891 --date 2026-06-30 --wait

And check the result:

dattos etl execution-status 891 --date 2026-06-30
dattos matching status 891 <loadId> <matchingId>
dattos reports generate 891 --load-id <loadId> --dataset-id <datasetId> --format csv

The full command catalog is in the article "Dattos CLI: commands and capabilities".

  • Dattos CLI: commands and capabilities

  • Connect artificial intelligence assistants via MCP

  • API keys: generate and revoke

  • Introduction to integrations

Was this helpful?