---
updatedAt: 2026-07-13T13:13:59.000Z
agentTools:
  projectIndex: https://docs.getmontecarlo.com/llms.txt
---

# CLI

Monte Carlo's CLI. [Reference Guide](https://clidocs.getmontecarlo.com/)

This guide explains the basic usage of Monte Carlo's CLI.

You can find the CLI reference guide (documentation on all commands, options, and arguments) [here](https://clidocs.getmontecarlo.com/).

## Requirements

The CLI requires Python 3.10 or greater.

## Installing or updating the CLI

To install or update the CLI, please run:

```shell
pip install -U montecarlodata
```

Then, verify the installation using:

```shell
montecarlo --version
```

## Setting up the CLI

To configure your CLI, please run:

```shell
montecarlo configure
```

You will be prompted to choose an authentication type — **API key** or **OAuth** — and then to enter the corresponding credentials. See [API Authentication](https://docs.getmontecarlo.com/docs/api-authentication) for how to create each type of credential.

> ❗️ Careful!
>
> You are only able to see the secret (API key secret or OAuth client secret) once! Save it in a safe place.

### Configure with an API key

To skip the prompt and configure an API key non-interactively, pass `--api-key`:

```shell
montecarlo configure --api-key --mcd-id <KEY_ID> --mcd-token <SECRET>
```

You can [create an API key](https://docs.getmontecarlo.com/docs/api-authentication#creating-an-api-key) from the API settings page.

### Configure with OAuth

To configure [OAuth client credentials](https://docs.getmontecarlo.com/docs/api-authentication#authenticating-with-oauth-client-credentials), pass `--oauth`. In addition to the client ID and secret, OAuth requires your deployment's **instance ID** (e.g. `us1`, `eu1`), shown under *Account Information → Instance ID* in the app:

```shell
montecarlo configure --oauth \
  --mcd-oauth-client-id <CLIENT_ID> \
  --mcd-oauth-client-secret <CLIENT_SECRET> \
  --mcd-instance-id <INSTANCE_ID>
```

Omit the flags to be prompted for each value. The CLI handles the OAuth token exchange for you on each call; there is nothing else to configure.

After configuring you can validate your connection with:

```text
montecarlo validate
```

## Documentation

Documentation for commands, options, and arguments can be found [here](https://clidocs.getmontecarlo.com/).

Otherwise, to get high-level help, please run:

```shell
montecarlo --help
```

Similarly, you can get help for a specific set of commands:

```shell
montecarlo integrations --help
```

To retrieve documentation (help text) on all commands, subcommands and options:

```text
montecarlo help
```

As an example, this is how you would list all active integrations:

```shell
montecarlo integrations list
```

See [here](https://pypi.org/project/montecarlodata/) for additional details and examples.