Activate an official MCP
Updated at:
Activates an official MCP service. After submission, the service enters the activating state. Use the details API to check the result.
Endpoint
POST
/api/v1/mcp/servers/{mcpCode}/activateActivates an official MCP service. One Key MCP services are activated or ordered according to the product type.
Path parameters
mcpCodestringRequiredOfficial MCP code
Request body
envmap<string,string>Depends on the serviceEnvironment variables. All required variables declared by the service must be provided and cannot be blank
fc_deploy_regionstringOptionalFunction Compute region. Must match the current region in the console
Response
Returns a complete DetailResponse. When activation is newly initiated, some basic fields may be null. Use the status field to track progress.
| Status | Description |
|---|---|
| ACTIVATING | Activating |
| ACTIVATED | Enabled |
| ACTIVATE_FAILED | Activation failed |
Example
curl -X POST "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcp/servers/amap-maps/activate" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"env": {
"AMAP_MAPS_API_KEY": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}'
Response example
{
"success": true,
"error_code": null,
"error_msg": null,
"data": {
"mcp_code": "amap-maps",
"server_name": null,
"description": null,
"type": null,
"server_type": null,
"server_status": "ACTIVATING",
"server_status_text": "开通中",
"dashscope_endpoint": "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcps/amap-maps/mcp",
"meta_info": {
"icon": null,
"provider": null,
"is_onekey": false,
"console_detail_url": "https://bailian.console.aliyun.com/store/mcp/detail/amap-maps",
"classification": "交通物流",
"activate_user_count": 3000,
"call_total_count": 120000,
"average_call_time": 80,
"call_success_rate": 0.995
},
"mcp_config": null
},
"request_id": "6f1c2a8e-3b0d-4c55-9a0e-2f7d1c9b8a11"
}
Error codes
| HTTP status | error_code | Description |
|---|---|---|
| 400 | InvalidParameter | A required environment variable is missing, or the region does not match the console |
| 400 | OperationNotSupported | The service is a cloud marketplace MCP, or requires a KMS credential or RAM role |
| 404 | McpServerNotFound | The MCP service does not exist |
| 409 | McpServerBusy | Another operation is running on the MCP service |
NoteAn activated service may return its current details directly.
Is this page helpful?