agent mcp create (Developer Preview)

Create an MCP server in the API Catalog.

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.

Registers an external Model Context Protocol (MCP) server with the API Catalog and discovers its assets (tools, prompts, and resources). Provide the server URL and, when the server requires it, OAuth authorization details. When the authorization type is OAUTH you must supply the identity provider, client ID, client secret, and scope.

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑auth‑typeN/AType: Value
Valid Values: OAUTH, NO_AUTH
Default value: NO_AUTH

Authorization type to use when connecting to the MCP server.
‑‑client‑idN/AType: Value

OAuth client ID. Required when auth-type is OAUTH.
‑‑client‑secretN/AType: Value

OAuth client secret. Required when auth-type is OAUTH. Pass ”-” to read it from stdin (piped) and keep it out of shell history.
‑‑descriptionN/AType: Value

Description of the MCP server.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑identity‑providerN/AType: Value

Identity provider to use for OAuth authorization. Required when auth-type is OAUTH.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑labelN/AType: Value

Human-readable label for the MCP server.
‑‑name‑nType: Value
Required

Unique name of the MCP server.
‑‑scopeN/AType: Value

OAuth scope to request. Required when auth-type is OAUTH.
‑‑server‑urlN/AType: Value
Required

URL of the external MCP server.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Create an MCP server with no authentication:

Create an MCP server that uses OAuth authentication, piping the client secret from stdin to keep it out of shell history: