In addition to the official MCP Server, Alibaba Cloud Model Studio supports the following three methods for custom MCP Server deployment:
-
Deploy using scripts: For code. Use this if you have or obtain a code package that follows the MCP protocol, such as MCP service code you developed or from an open-source community.
-
Import from AI Gateway: For existing APIs. Use this if you want to encapsulate an existing, non-MCP compliant RESTful API (such as internal company business interfaces or third-party service interfaces) into a tool that Large Language Models can invoke.
-
Import from Alibaba Cloud OpenAPI: For the Alibaba Cloud ecosystem. Use this if you want Large Language Models to operate other Alibaba Cloud products (such as OSS, ECS).
Deploy using scripts
Alibaba Cloud Model Studio supports hosting MCP service code, whether developed by you or obtained from an open-source community, using Function Compute (FC).
For example, 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 for use in subsequent interactions.
-
Create an MCP service
Go to MCP Management and click Create MCP Service. Select Deploy by Script and click Deploy Service.
-
Configure the MCP service
Complete the configuration as follows. After confirming the settings, submit the deployment.
Configuration item
Purpose
Configuration for this example
Service name
Description
Differentiates MCP services. Does not affect Large Language Model judgment or invocation.
Service name: Long-term memory
Description: This service lets Large Language Models record personalized information and retrieve it for replies in subsequent interactions.
Install Method
To host a local MCP service (stdio), use the following methods:
-
npx: Start an MCP service developed using Node.js.
-
uvx: Start an MCP service developed using Python.
To connect to a remote MCP service, use the following method:
-
http: Connect to an existing remote MCP server running elsewhere.
Select: npx
Deployment Method
(npx/uvx only)
Basic Mode: Pay by Requests: Suitable for on-demand startup, cost savings, and scenarios that can tolerate slower responses.
Extreme Mode: Suitable for continuous operation, fast responses, and scenarios that can tolerate higher costs.
For detailed billing rules, see Billing Information.
Keep Basic Mode: Pay by Requests, disable Extreme Mode
Region
(npx/uvx only)
For optimal response speed, choose a region near other existing cloud services. If unsure, use the "Beijing" region.
Select: Beijing
MCP service configuration
ImportantVerify the source and source code of the MCP service to prevent phishing attacks.
ImportantNot all MCP Servers support npx/uvx/http-based deployment. If the corresponding configuration code is missing, you cannot directly deploy to Alibaba Cloud Model Studio. We recommend that you refer to the MCP official documentation to perform local deployment.
NoteAn MCP Server developed in Java can be deployed to Alibaba Cloud Function Compute, and then hosted on Model Studio via HTTP.
-
To deploy an open-source community MCP service, paste the configuration code from the MCP service product page.

-
To deploy a self-developed MCP service, write the configuration code using the following template.
NoteThis configuration template applies to MCP services developed based on npx/uvx/http best practices. If you use other development methods, modify the template accordingly.
{ "mcpServers": { "Local MCP Service": { "type": "stdio", "command": "npx", "args": [ "-y", "@your_acc_name/your_pkg_name" ], "env": { "YOUR_ENV_KEY": "YOUR_ENV_VALUE" } }, "Remote MCP Service": { "type": "sse/streamableHttp", "url": "https://your-mcp-server/sse" } } }
Use the following configuration code directly:
{ "mcpServers": { "memory": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-memory" ] } } }Or, find this MCP Server in the MCP Marketplace, click to open the product page, and find the configuration code under the
NPXtitle. -
-
Manage the MCP service
After submitting the deployment, view the deployment status, test the tool's functionality, and modify service configurations.
-
View deployment status
Go to the Function Compute FC console to view the detailed deployment status of the MCP service.

(Optional) You can enable Simple Log Service to view real-time service status and troubleshoot potential issues.
NoteFunction Compute FC's Simple Log Service incurs fees. For details, refer to the Simple Log Service billing description in the console.
-
Test the tool's functionality:
On the Tool page, test the MCP service's operational functionality.

-
Modify service configuration:
After deployment, you can only edit the Service name and Description. To modify the Deployment Method, Region, Install Method, or MCP service configuration, you must first stop the current deployment and then redeploy after modifying the configuration.
-
-
Use the MCP service
After the deployment is complete, you can configure the custom MCP Server. For more information, see Configure the MCP Server in an agent or a workflow.
Import from AI Gateway
For existing self-managed or third-party business APIs, you can use the AI Gateway to upgrade RESTful APIs into MCP Servers. For more information, see Gateway-Hosted MCP Server. Alibaba Cloud Model Studio lets you quickly import MCP Servers hosted by the AI Gateway.
-
Import preparation
Ensure that you have an MCP Server hosted on AI Gateway.
-
Import an MCP service
Go to MCP Management and click Create MCP Service. Select AI Gateway and click Import Service.
-
Configure the MCP service
Enter the configuration information as instructed in the following table. After confirming the information is correct, click Confirm Import.
Configuration item
Configuration description
Example
Gateway Region
Region where AI Gateway is located
China (Hangzhou)
Gateway Instance
AI Gateway instance
test
Select a service for MCPS
MCP service hosted in AI Gateway
test
Select Endpoint
Access point for the MCP service hosted in AI Gateway. The system automatically generates an access point for testing.
[Automatically generated]

-
Complete the import
After the import is complete, you can view the MCP services imported from the AI Gateway in .
Import from Alibaba Cloud OpenAPI
If you want to create a service using Alibaba Cloud resources, you can use the OpenAPI Developer Portal to quickly publish an official OpenAPI as an MCP service. For more information, see OpenAPI MCP Server User Guide. Alibaba Cloud Model Studio lets you quickly import MCP services from the OpenAPI Developer Portal.
-
Import preparation
Ensure that you have created an MCP Server on the OpenAPI Developer Portal.
-
Import an MCP service
Go to MCP Management and click Create MCP Service. Select Alibaba Cloud OpenAPI and click Import Service.
-
Configure the MCP service
Follow the instructions below to complete the configuration. After verifying the configuration, click Confirm Import.
Configuration item
Configuration description
Example
Service name
The OpenAPI MCP service to import.
oss
Role for accessing Alibaba Cloud OpenAPI
The role that Alibaba Cloud Model Studio uses to access OpenAPI. You can use an existing role or click Create Role here.
BailianMcpRoleFoross
Policy
Go to RAM Access Policies, use the JSON script here to create an access policy, and grant the access policy to the Access Alibaba Cloud OpenAPI Role.
[Automatically generated]

-
Complete the import
After the import is complete, you can view the MCP services imported from OpenAPI in .
