Loading
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Anypoint CLI commands to create API Instances and Deploy to Flex Instances in API Manager

게시 일자: Aug 13, 2026
상세 설명

The user wanted the exact Anypoint CLI command to create an API instance in Agent and tool instances in MuleSoft and deploy it in API Manager.

솔루션

Create the API instance through Anypoint CLI by following the required multi-step process rather than expecting a single command. First create the MCP API instance, then add the upstream, configure the MCP proxy settings such as deployment type, scheme, port, and path, and finally deploy the API instance to Flex Gateway. 

There are 4 steps to complete the whole process of creating and deploying instances

The required CLI operations are :

1. Create MCP API instance

anypoint-cli-v4 api-mgr:api:manage \
<ASSET_ID> \
<ASSET_VERSION> \
<GROUP_ID> \
--organization='<ORGANIZATION_ID>' \
--environment='<ENVIRONMENT_NAME>' \
--apiInstanceLabel='<API_INSTANCE_LABEL>' \
--type=mcp \
--isFlex

2. Create upstream

anypoint-cli-v4 api-mgr:upstream:add \
<API_INSTANCE_ID> \
'<UPSTREAM_URL>' \
--organization='<ORGANIZATION_ID>' \
--environment='<ENVIRONMENT_NAME>' \
--label='<UPSTREAM_LABEL>'

3. Configure MCP proxy (port and base path for api)

anypoint-cli-v4 api-mgr:api:edit \
<API_INSTANCE_ID> \
--organization='<ORGANIZATION_ID>' \
--environment='<ENVIRONMENT_NAME>' \
--isFlex \
--withProxy \
--type=mcp \
--deploymentType=hybrid \
--scheme=<HTTP_OR_HTTPS> \
--port=<PROXY_PORT> \
--path=<PROXY_PATH>

4. Deploy to Flex Gateway

anypoint-cli-v4 api-mgr:api:deploy \
<API_INSTANCE_ID> \
--organization='<ORGANIZATION_ID>' \
--environment='<ENVIRONMENT_NAME>' \
--target='<FLEX_GATEWAY_TARGET_ID>' \
--gatewayVersion='<GATEWAY_VERSION>'


This four-step sequence can be used to automate creation and deployment of an MCP API instance through Anypoint CLI.

NOTE: Please note that the above is for creating MCP Instance only, depending on your type ensure to change the values for type attribute

Anypoint CLI Commands - https://docs.mulesoft.com/anypoint-cli/latest/anypoint-platform-cli-commands

Knowledge 기사 번호

005390972

 
로드 중
Salesforce Help | Article