---
title: "connected-apps"
description: "Apps and MCP clients connected with OAuth. The `machinemail connected-apps` commands: arguments, flags, examples and the API routes they call."
canonical: "https://machinemail.dev/docs/cli/commands/connected-apps"
---

# connected-apps

> Apps and MCP clients connected with OAuth. The `machinemail connected-apps` commands: arguments, flags, examples and the API routes they call.

Source: https://machinemail.dev/docs/cli/commands/connected-apps

Apps and MCP clients connected with OAuth.

| Command                                           | Summary             |
| ------------------------------------------------- | ------------------- |
| [`connected-apps delete`](#connected-apps-delete) | Disconnect app      |
| [`connected-apps list`](#connected-apps-list)     | List connected apps |

Every command also takes the [global flags](https://machinemail.dev/docs/cli/commands#global-flags).

## connected-apps delete

Disconnect app.

Also: `machinemail connected-apps rm`.

Revokes the grant: its refresh token and every access token issued from it stop working immediately (401 on /mcp and /v0). Returns the grant as it was. Requires an organization-scoped credential with api\_key\_delete.

```bash
machinemail connected-apps delete <grant-id> [flags]
```

#### Arguments

| Field | Type | | Description |
| --- | --- | --- | --- |
| `<grant-id>` | `string` | required | ID of the grant (oag_...). |

#### Examples

```bash
machinemail connected-apps delete <grant-id>
```

#### API

- [`DELETE /v0/oauth-grants/{grant_id}`](https://machinemail.dev/docs/reference/api/connected-apps#disconnect-app)

## connected-apps list

List connected apps.

Also: `machinemail connected-apps ls`.

Apps and MCP clients people in the organization connected with OAuth. Requires an organization-scoped credential with api\_key\_read; pod, inbox and sandbox credentials get 403.

```bash
machinemail connected-apps list [flags]
```

#### Flags

| Field | Type | | Description |
| --- | --- | --- | --- |
| `--limit <n>` | `integer` |  | Maximum number of items to return. Default 50, maximum 500; larger values are capped. Default: `50`. |
| `--page-token <value>` | `string` |  | next_page_token from the previous page. |
| `--ascending` | `boolean` |  | Sort oldest first. |
| `--all` | `boolean` |  | Follow next_page_token and return every page. |

#### Examples

```bash
machinemail connected-apps list
machinemail connected-apps list --all --json | jq '.oauth_grants | length'
```

#### API

- [`GET /v0/oauth-grants`](https://machinemail.dev/docs/reference/api/connected-apps#list-connected-apps)
