---
schema_version: "1"
id: 10b2f95b9f666b8a9b7ab522fc673ac209a7da76420d6e2de72041f87a24b61c
title: agent mcp update (Developer Preview)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/agent/cli_reference_agent_mcp_update.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_agent_mcp_update.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: cc6e659a22a3021cad2dcb2f16d748c62d125b50025392f9d22dc3dbe30e5ce0
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# agent mcp update (Developer Preview)

Update an MCP server registered in the API Catalog.

**note:** This command is available as a developer preview. The command isn't generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. All commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. Don't implement functionality developed with these commands or tools.

## Description for agent mcp update

Updates an existing MCP server in the API Catalog. Only the fields you provide are changed; omitted fields are left untouched. You can update the label, description, and server URL, and replace the authorization configuration. When setting `--auth-type OAUTH`, you must also provide `--identity-provider`, `--client-id`, `--client-secret`, and `--scope`. When setting `--auth-type NO_AUTH`, no authorization credentials are required. At least one updatable field must be supplied.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;auth&#8209;type</code> | N/A | **Type:** Value<br>**Valid Values:** `OAUTH`, `NO_AUTH`<br><br>Authorization type to apply to the MCP server (OAUTH or NO_AUTH). |
| <code>&#8209;&#8209;client&#8209;id</code> | N/A | **Type:** Value<br><br>OAuth client ID (required when --auth-type is OAUTH). |
| <code>&#8209;&#8209;client&#8209;secret</code> | N/A | **Type:** Value<br><br>OAuth client secret (required when --auth-type is OAUTH). Pass "-" to read it from stdin (piped) and keep it out of shell history. |
| <code>&#8209;&#8209;description</code> | N/A | **Type:** Value<br><br>New description for the MCP server. |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;identity&#8209;provider</code> | N/A | **Type:** Value<br><br>Identity provider name for OAuth authorization (required when --auth-type is OAUTH). |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;label</code> | N/A | **Type:** Value<br><br>New display label for the MCP server. |
| <code>&#8209;&#8209;mcp&#8209;server&#8209;id</code> | <code>&#8209;i</code> | **Type:** Value<br>**Required**<br><br>ID of the MCP server to update. |
| <code>&#8209;&#8209;scope</code> | N/A | **Type:** Value<br><br>OAuth scope (required when --auth-type is OAUTH). |
| <code>&#8209;&#8209;server&#8209;url</code> | N/A | **Type:** Value<br><br>New endpoint URL of the MCP server. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |

## Examples for agent mcp update

Update the label and description of an MCP server in the default target org:

```shell
sf agent mcp update --mcp-server-id 0XSxx0000000001 --label "Orders MCP" --description "Order tooling" --target-org myOrg
```

Update the server URL and switch the authorization to OAuth, piping the client secret from stdin and outputting as JSON:

```shell
cat secret.txt | sf agent mcp update --mcp-server-id 0XSxx0000000001 --server-url https://mcp.example.com --auth-type OAUTH --identity-provider MyIdp --client-id abc --client-secret - --scope "read write" --target-org myOrg --json
```
<!-- prettier-ignore-end -->
