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}/activate
Activates an official MCP service. One Key MCP services are activated or ordered according to the product type.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mcpCode | string | Yes | Official MCP code |
| Field | Type | Required | Description |
|---|---|---|---|
| env | map<string,string> | Depends on the service | Environment variables. All required variables declared by the service must be provided and cannot be blank |
| fc_deploy_region | string | No | Function 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
Errors
| 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 |
An activated service may return its current details directly.