Alibaba Cloud Model Studio provides end-to-end MCP services. You can configure these services within the platform (such as in agent applications or workflows) or invoke them externally from third-party applications or your own projects. To invoke them externally, choose one of the following options:
- Integrate with a third-party application: One-click automatic configuration lets you quickly enable external invocation.
- Integrate with your own project: You can use the MCP SDK for flexible coding and deep customization.
Enable an MCP service
The Alibaba Cloud Model Studio MCP service has been upgraded from the legacy Server-Sent Events (SSE) protocol to the new Streamable HTTP protocol. Choose the steps that match your situation:
- First-time setup (new users)
- Protocol upgrade (existing users)
- Go to the Alibaba Cloud Model Studio MCP Marketplace and select an MCP service. For example, you can click the Amap Maps card.
-
Click Enable Now and then Confirm activation to enable the Amap Maps MCP service.
To enter sensitive information, encrypt it using a KMS credential.The Amap Maps MCP service is hosted on Alibaba Cloud Model Studio. For trial use, you do not need to provide an AMAP_MAPS_API_KEY. For commercial customization, you can use your own AMAP_MAPS_API_KEY.
Invoke an MCP service externally
Integrate into a third-party application
Alibaba Cloud Model Studio supports configuring MCP services in Cherry Studio and Cursor. Both automatic and manual configuration methods are supported. The following example uses the Amap Maps service.
- Cherry Studio
- Cursor
- Install Cherry Studio.
- Go to the Amap Maps MCP service page. In the External Call section, select Cherry Studio.
- Click One-Click Configuration for Cherry Studio. Select an API key and click OK.
- You can also configure the MCP service manually. In the External Call section, get the DASHSCOPE_API_KEY and copy the configuration file. In Cherry Studio, go to the MCP Settings page. Click Add Server > Import from JSON. Paste the configuration and click OK.
- Use the MCP service in Cherry Studio. Create a new topic and select the AliyunBailianMCP_amap-maps service below the input field.
-
In the dialog box, enter
Start now. Provide three public transportation routes from Hangzhou Xiaoshan International Airport to West Lake Scenic Area.The Large Language Model (LLM) successfully calls the MCP tool for route planning.If the model fails to call the MCP tool, refer to the FAQ.
Develop integration using the SDK
You can use the MCP SDK to call Alibaba Cloud Model Studio MCP services. This provides full coding flexibility.
The following example uses the OpenAI SDK and MCP SDK to call the Model Studio WebSearch MCP service for web search.
- Install the dependencies.
- You can set your Alibaba Cloud Model Studio API key as an environment variable.
-
Sample code:
- Python
- You can run the code. The output appears as follows:
FAQ
What do I do if I cannot connect to an MCP service?
- MCP service not enabled or not upgraded: Ensure the MCP service is enabled or upgraded in the Model Studio MCP Marketplace. See Enable an MCP service.
- Invalid API key: Confirm that you are using a valid Alibaba Cloud Model Studio API key.
- Quota exhausted: Some MCP services, such as web search, have monthly quotas. They stop automatically when the quota is exhausted.