Skip to main content

MCP API Overview

The MCP API manages MCP services in Alibaba Cloud Model Studio, including query, creation, update, activation, start and stop, deletion, tool invocation, and recommendation.

The MCP API manages MCP services in Alibaba Cloud Model Studio. It covers querying, creating, updating, activating, starting, stopping, and deleting official and custom MCP services, and provides tool listing, tool invocation, and tool recommendation.
Before calling the API, configure authentication. For error handling, see MCP API error codes.

Prerequisites

  1. Alibaba Cloud Model Studio is activated, and an API Key is created.
  2. A workspace ID is available. Log on to the Model Studio console, open the workspace menu in the upper-right corner, and copy the workspace ID.

Endpoint

https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcp/servers
  • workspace_id: the workspace ID.

Response structure

Successful responses and business errors use the following structure. The response header contains x-request-id:
FieldTypeDescription
successbooleanWhether the request succeeded. For tool execution, also check data.isError
error_codestring / nullError code. null on success
error_msgstring / nullError message. null on success
dataobject / array / nullBusiness data. null on failure
request_idstringRequest ID
{
  "success": true,
  "error_code": null,
  "error_msg": null,
  "data": {},
  "request_id": "6f1c2a8e-3b0d-4c55-9a0e-2f7d1c9b8a11"
}

Enumerations

type
ValueDescription
OFFICIALOfficial MCP
CUSTOMERCustom MCP
server_type
ValueDescription
STDIOStarted with npx or uvx and deployed on Function Compute
HTTPRemote Streamable HTTP service
SSERemote SSE service
OPENAPIConverts an existing HTTP API into an MCP service
server_status The status text is returned in Chinese.
ValueCustom MCP textOfficial MCP text
INACTIVE未启用未开通
ACTIVATING部署中开通中
ACTIVATED已启用已启用
ACTIVATE_FAILED部署失败开通失败
DELETED已删除-

Data structures

DetailResponse

Service information returned by detail, list, activate, deactivate, disable, enable, and delete operations.
FieldTypeDescription
mcp_codestring / nullMCP code
server_namestring / nullMCP name
descriptionstring / nullMCP description
typestring / nullOFFICIAL or CUSTOMER
server_typestring / nullSTDIO, HTTP, SSE, or OPENAPI
server_statusstring / nullService status
server_status_textstring / nullStatus text
dashscope_endpointstring / nullMCP endpoint. Returned only when the service is enabled or activating
meta_infoobject / nullService metadata
mcp_configobject / nullSaved configuration of a custom MCP. null for official MCP

meta_info

FieldTypeDescription
iconstring / nullIcon URL. Official MCP only
providerstring / nullProvider. Official MCP only
is_onekeybooleanWhether the service is a One Key MCP. Official MCP only
console_detail_urlstringConsole detail URL
classificationstring / nullClassification name, returned in Chinese. null when not configured
activate_user_countlong / nullTotal number of activated users
call_total_countlong / nullTotal number of calls
average_call_timelong / nullAverage successful call duration of the day, in milliseconds
call_success_ratedouble / nullSuccess rate, from 0 to 1
The meta_info of a custom MCP does not contain icon, provider, or is_onekey.

CreateResponse

Service information returned by create and update operations. Unassigned fields are omitted.
FieldTypeDescription
mcp_codestringMCP code
server_namestringMCP name
server_statusstringService status
server_status_textstringStatus text
activate_fail_reasonstringDeployment failure reason. Returned only when deployment fails

Request naming

Pagination uses pageNo and pageSize, recommendation count uses topN, and the path parameter uses mcpCode. Request and response fields use snake_case, except for tool results: tool schemas use the MCP protocol fields inputSchema and additionalProperties, and tool results use isError.

API list

APIMethodDescription
List MCP servicesGET /listLists official and custom MCP services
Create a custom MCPPOST /Creates and deploys a custom MCP
Get MCP detailsGET /{mcpCode}Gets MCP details
Update a custom MCPPOST /{mcpCode}Updates the name, description, or configuration
Delete a custom MCPDELETE /{mcpCode}Deletes a custom MCP
List toolsGET /{mcpCode}/toolsLists the tools provided by an MCP service
Call a toolPOST /{mcpCode}/tools/callCalls a tool
Recommend toolsGET /tools/recommendRecommends tools based on a natural-language request
Activate an official MCPPOST /{mcpCode}/activateActivates an official MCP
Deactivate an official MCPPOST /{mcpCode}/deactivateDeactivates an official MCP
Disable a custom MCPPOST /{mcpCode}/disableDisables a custom MCP
Enable a custom MCPPOST /{mcpCode}/enableEnables a custom MCP
The mcp_config field, including headers, is returned as saved and may contain sensitive information. Call the API only in trusted environments and protect the response content.