> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/mcp-oauth-providers.md).

# mcp-oauth-providers

OAuth provider registrations for MCP servers — the credential-issuer records that let external MCP clients authenticate to a Celigo MCP server.

**REST API**: [MCP OAuth Providers](https://developer.celigo.com/api/api-reference/ai-and-mcp/mcp-oauth-providers)

```
celigo mcp-oauth-providers <subcommand> [args] [flags]
```

Supports all [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

***

## Subcommands

| Subcommand             | Purpose                                                       |
| ---------------------- | ------------------------------------------------------------- |
| `list`                 | List all MCP OAuth providers.                                 |
| `get <id>`             | Fetch one MCP OAuth provider by ID.                           |
| `create`               | Create an MCP OAuth provider from JSON (stdin or `--file`).   |
| `update <id>`          | Full-replace PUT from JSON (stdin or `--file`).               |
| `set <id> key=value …` | Refused on this group — credentials are masked. Use `update`. |
| `delete <id>`          | Delete an MCP OAuth provider by ID.                           |

***

## `celigo mcp-oauth-providers list`

List all MCP OAuth providers on the account.

In celigo-cli 2026.8.1 through 2026.8.8 the default `list` failed with `422 Unprocessable Entity` because the endpoint rejects the `include` projection, and only `--fields all` worked; since 2026.9.1 the default form works again (rows are trimmed client-side to the same columns).

**Signature**

```bash
celigo mcp-oauth-providers list
```

**Arguments**

None.

**Flags**

| Flag              | Type    | Default   | Description                                                                                                                                                                                                                                                     |
| ----------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--fields <spec>` | string  | `default` | Fields to request per row. `default` returns `_id`, `name`, and the table columns; `all` returns complete documents; a comma-separated list requests specific fields. See [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md). |
| `--limit <n>`     | integer | —         | Return at most `<n>` rows, fetching a single page.                                                                                                                                                                                                              |

**Example**

```bash
celigo mcp-oauth-providers list --format table
celigo mcp-oauth-providers list --fields all
```

**Corresponds to**: `GET /v1/mcpoauthproviders` (operationId: `listMcpOauthProviders`)

***

## `celigo mcp-oauth-providers get`

Fetch one MCP OAuth provider by ID.

**Signature**

```bash
celigo mcp-oauth-providers get <id>
```

**Arguments**

| Argument | Type   | Required | Description            |
| -------- | ------ | -------- | ---------------------- |
| `<id>`   | string | Yes      | MCP OAuth provider ID. |

**Example**

```bash
celigo mcp-oauth-providers get 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: `GET /v1/mcpoauthproviders/{_id}` (operationId: `getMcpOauthProviderById`)

***

## `celigo mcp-oauth-providers create`

Create an MCP OAuth provider from a JSON body. Reads from stdin by default, or from a file with `--file`.

**Signature**

```bash
celigo mcp-oauth-providers create [flags]
```

**Flags**

| Flag                | Type   | Default | Description                                                             |
| ------------------- | ------ | ------- | ----------------------------------------------------------------------- |
| `-f, --file <path>` | string | stdin   | Read the JSON body from a file instead of stdin (`-` also means stdin). |

**Request body**

Reads JSON. See the `POST /v1/mcpoauthproviders` schema for the full payload shape.

Since celigo-cli 2026.10.1, `create` refuses two kinds of body before any request, with no override: one that carries a masked placeholder (four or more asterisks and nothing else, such as the `******` a `GET` returns for `clientSecret`), because a new provider has no secret behind the mask; and one whose `clientSecret` is not a string. Send the real secret as a string.

**Example**

```bash
cat provider.json | celigo mcp-oauth-providers create
celigo mcp-oauth-providers create --file provider.json
```

**Corresponds to**: `POST /v1/mcpoauthproviders` (operationId: `createMcpOauthProvider`)

***

## `celigo mcp-oauth-providers update`

Full replace of an MCP OAuth provider from a JSON body. Omitted fields are erased. Reads from stdin by default, or from a file with `--file`.

> ⚠️ **`update` replaces the entire provider.** Any field you omit is erased. `GET` the current record first, modify it, then `PUT` the complete object back.

`GET` masks the provider's encrypted fields as `******`. If you edit that response and submit it unchanged, `update` refuses the payload, names each masked path it found, and exits without calling the API. Pass `--force` to send it as written — a masked `clientSecret` sent back keeps the stored secret — or replace a mask with a new value (`""` clears it). Since celigo-cli 2026.10.1 a mask is four or more asterisks and nothing else, and a `clientSecret` that is not a string is refused with no override, `--force` included. Since celigo-cli 2026.10.2, the refusal says that a mask sent back keeps the stored secret, so `--force` sends the document as read; earlier releases said the masks would overwrite the secrets.

**Signature**

```bash
celigo mcp-oauth-providers update <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description            |
| -------- | ------ | -------- | ---------------------- |
| `<id>`   | string | Yes      | MCP OAuth provider ID. |

**Flags**

| Flag                | Type    | Default | Description                                                                                 |
| ------------------- | ------- | ------- | ------------------------------------------------------------------------------------------- |
| `-f, --file <path>` | string  | stdin   | Read the JSON body from a file instead of stdin (`-` also means stdin).                     |
| `--force`           | boolean | `false` | Submit even if the body contains masked credential values (`"******"`) copied from a `GET`. |

**Request body**

Reads JSON. See the `PUT /v1/mcpoauthproviders/{_id}` schema for the full payload shape.

**Example**

```bash
celigo mcp-oauth-providers get 5f83a9b2c7d3e8f1a2b3c4d5 --format json > provider.json
# edit provider.json; a ****** left in place keeps the stored secret
cat provider.json | celigo mcp-oauth-providers update 5f83a9b2c7d3e8f1a2b3c4d5 --force
```

**Corresponds to**: `PUT /v1/mcpoauthproviders/{_id}` (operationId: `updateMcpOauthProvider`)

***

## `celigo mcp-oauth-providers set`

> ⚠️ **`set` refuses every field on this group, by design.** The provider has no `PATCH` whitelist, and `set` never sends a masked `clientSecret` through a `GET` → modify → `PUT` on its own, so it fails with a message naming the field and directing you to `update`. Send the whole provider with `update --force`: the masked `clientSecret` sent back keeps the stored secret.

**Signature**

```bash
celigo mcp-oauth-providers set <id> [assignments...]
```

**Arguments**

| Argument           | Type              | Required | Description                                                                         |
| ------------------ | ----------------- | -------- | ----------------------------------------------------------------------------------- |
| `<id>`             | string            | Yes      | MCP OAuth provider ID.                                                              |
| `[assignments...]` | `key=value` pairs | Yes      | One or more field assignments. Every assignment is refused — see the callout above. |

**Behavior**

`set` chooses one of three strategies per resource group. On groups with a `PATCH` whitelist, whitelisted fields apply atomically. On other groups it round-trips `GET` → modify → `PUT`. MCP OAuth providers are a credential-masked group with no whitelist, so the command errors instead:

```
Cannot set name on a mcp-oauth-provider via 'set': its credentials are masked, and 'set' sends only PATCH-whitelisted fields.
No field can be set on a mcp-oauth-provider.
Send the whole mcp-oauth-provider with 'mcp-oauth-providers update --force': a masked "******" value sent back keeps the stored secret.
```

Since celigo-cli 2026.10.2, the message names `mcp-oauth-providers update --force`; earlier releases said a GET + PUT would overwrite the credentials and asked for the real values.

Connections and iClients carry the same guard, but both have a `PATCH` whitelist, so a whitelisted field still succeeds there.

**Example**

```bash
# Fails — set is unavailable on this group
celigo mcp-oauth-providers set 5f83a9b2c7d3e8f1a2b3c4d5 name="Okta provider"

# Rename via update instead: send the provider as read, its masked clientSecret included
celigo mcp-oauth-providers update 5f83a9b2c7d3e8f1a2b3c4d5 --file provider.json --force
```

***

## `celigo mcp-oauth-providers delete`

Delete an MCP OAuth provider by ID.

> ⚠️ **Deleting an OAuth provider cannot be undone.** Any MCP server that references this provider for client authentication will stop authenticating those clients.

**Signature**

```bash
celigo mcp-oauth-providers delete <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description            |
| -------- | ------ | -------- | ---------------------- |
| `<id>`   | string | Yes      | MCP OAuth provider ID. |

**Flags**

| Flag        | Type    | Default | Description        |
| ----------- | ------- | ------- | ------------------ |
| `-y, --yes` | boolean | `false` | Skip confirmation. |

**Example**

```bash
celigo mcp-oauth-providers delete 5f83a9b2c7d3e8f1a2b3c4d5 -y
```

**Corresponds to**: `DELETE /v1/mcpoauthproviders/{_id}` (operationId: `deleteMcpOauthProvider`)

***

## Gotchas

* **A provider is per-environment in `celigo promote`.** Since celigo-cli 2026.10.1, [`celigo promote`](https://developer.celigo.com/cli/local-tree/promote.md) treats MCP OAuth providers like iClients: the API masks `clientSecret`, so a pulled provider is never sent to the target. A provider an MCP server references resolves there instead — a `--map mcpoauthprovider/<source path or id>=<target id>` pin, the binding recorded in the target file, or the one target provider of the same name — else, under `--create-connections`, a credential-less shell whose secret you enter in the target. Until then promote refused every pulled provider, and every MCP server bound to one, as a masked credential.

## Related

* [mcp-servers](https://developer.celigo.com/cli/commands/mcp-servers.md) — MCP server resources that reference an OAuth provider for client authentication.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/cli/commands/mcp-oauth-providers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
