In addition to official MCP services, Alibaba Cloud Bailian supports three methods for deploying custom MCP services: script-based deployment, importing from the AI Gateway, and importing from Alibaba Cloud OpenAPI.
Script-Based Deployment
For self-developed or open-source community MCP service code, Alibaba Cloud Bailian supports hosting via Function Compute (FC).
For example, to deploy the open-source Knowledge Graph Memory MCP service:
Knowledge Graph Memory MCP Service: This service enables large language models to record personalized information and retrieve it in subsequent interactions to generate responses.
1
Create an MCP Service
Go to MCP Management and click Create MCP Service. Select Deploy with Script, then click Deploy Service.
2
Configure the MCP Service
Fill in the configuration fields below. After verifying all settings, submit the deployment.
Example configuration code:Template for custom-developed MCP services:
| Configuration | Purpose | Example for This Use Case |
|---|---|---|
| Service Name / Description | Used to distinguish between different MCP services; does not affect model reasoning or invocation. | Service Name: Long-Term Memory; Description: Enables large language models to record personalized information and retrieve it in subsequent interactions to generate responses. |
| Installation Method | npx: Launches an MCP service developed with Node.js; uvx: Launches an MCP service developed with Python; http: Connects to an existing remote MCP server running elsewhere. | Select: npx |
| Deployment Mode (npx/uvx only) | Basic Mode: Suitable for on-demand startup, cost efficiency, and acceptable latency. Ultra-Fast Mode: Suitable for always-on operation, low-latency response, and higher cost tolerance. | Keep Basic Mode enabled; disable Ultra-Fast Mode |
| Deployment Region (npx/uvx only) | For optimal response speed, select a region close to your other cloud services. If unsure, we recommend using the "Beijing" region. | Select: Beijing |
| MCP Service Configuration | For open-source community MCP services, paste the configuration code obtained from the MCP service’s detail page. | See example below |
Not all MCP services support npx/uvx/http-based deployment. If the required configuration code is unavailable, direct deployment to Alibaba Cloud Bailian is not possible.
3
Manage the MCP Service
After submitting the deployment, you can monitor its status, test its functionality, and modify its configuration.
- View Deployment Status: Navigate to the Function Compute (FC) console to view detailed deployment status. (Optional) We recommend enabling Log Service to monitor runtime status in real time.
- Test Tool Functionality: On the Tools tab, test the operational behavior of the MCP service.
- Modify Service Configuration: After deployment, only the Service Name and Description can be edited. To change the Deployment Mode, Deployment Region, Installation Method, or MCP Service Configuration, you must first stop the current deployment, update the configuration, and redeploy.
4
Use the MCP Service
Once deployed, you can integrate your custom MCP service into agents or workflows. For configuration steps, refer to Official MCP Services.
Import from AI Gateway
For existing in-house or third-party RESTful APIs, you can upgrade them to MCP services using the AI Gateway. With Alibaba Cloud Bailian, you can quickly import MCP services hosted on the AI Gateway.
1
Preparation
Ensure that your MCP service is already hosted on the AI Gateway.
2
Import the MCP Service
Go to MCP Management, click Create MCP Service, select Import from AI Gateway, then click Import Service.
3
Configure the MCP Service
Complete the configuration table below and click Confirm Import after verification.
| Configuration | Description | Example |
|---|---|---|
| Gateway Region | The region where the AI Gateway resides | China East 1 (Hangzhou) |
| Gateway Instance | The AI Gateway instance name | test |
| Select MCP Service | The MCP service hosted on the AI Gateway | test |
| Select Endpoint | The system automatically generates a testable endpoint. | [Auto-generated] |
4
Complete Import
After successful import, locate the imported MCP service under MCP Management > Custom Services.
Import from Alibaba Cloud OpenAPI
To create an MCP service by operating Alibaba Cloud resources, use the OpenAPI Developer Portal to rapidly publish official OpenAPIs as MCP services.
1
Preparation
Ensure you have created an MCP service in the OpenAPI Developer Portal.
2
Import the MCP Service
Go to MCP Management, click Create MCP Service, select Import from Alibaba Cloud OpenAPI, then click Import Service.
3
Configure the MCP Service
| Configuration | Description | Example |
|---|---|---|
| Service Name | The OpenAPI MCP service to import. | oss |
| Alibaba Cloud OpenAPI Access Role | The RAM role used by Bailian to access OpenAPI. You may reuse an existing role or create a new one. | BailianMcpRoleFoross |
| Permission Policy | Create a permission policy in RAM Permission Policies and attach it to the role. | [Auto-generated] |
4
Complete Import
After successful import, locate the imported MCP service under MCP Management > Custom Services.