Skip to main content

Get MCP details

Gets details, status, and configuration of an official MCP or a custom MCP in the current workspace.

Endpoint

GET /api/v1/mcp/servers/{mcpCode}

Request parameters

ParameterTypeRequiredDescription
mcpCodestringYesMCP code

Response

Returns a complete DetailResponse. For a custom MCP, mcp_config is returned as saved; if the configuration cannot be restored, it is null. For an official MCP, mcp_config is always null.
FieldTypeDescription
mcp_codestringMCP code
server_namestringMCP name
descriptionstringMCP description
typestringOFFICIAL or CUSTOMER
server_typestringSTDIO, HTTP, SSE, or OPENAPI
server_statusstringService status
server_status_textstringStatus 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
For meta_info fields, see MCP API overview.

Example

curl "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcp/servers/mcp-a1b2c3d4e5f6g7h8" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
{
  "success": true,
  "error_code": null,
  "error_msg": null,
  "data": {
    "mcp_code": "mcp-a1b2c3d4e5f6g7h8",
    "server_name": "weather-mcp",
    "description": "Weather query MCP",
    "type": "CUSTOMER",
    "server_type": "HTTP",
    "server_status": "ACTIVATED",
    "server_status_text": "已启用",
    "dashscope_endpoint": "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcps/mcp-a1b2c3d4e5f6g7h8/mcp",
    "meta_info": {
      "console_detail_url": "https://bailian.console.aliyun.com/flow-agent/mcp-manage/detail/mcp-a1b2c3d4e5f6g7h8/custom",
      "classification": "生活服务",
      "activate_user_count": 10,
      "call_total_count": 1200,
      "average_call_time": 125,
      "call_success_rate": 0.99
    },
    "mcp_config": {
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  },
  "request_id": "6f1c2a8e-3b0d-4c55-9a0e-2f7d1c9b8a11"
}

Errors

HTTP statuserror_codeDescription
400InvalidParameterA query parameter or request body is provided
404McpServerNotFoundThe MCP service does not exist or does not belong to the current workspace
404McpServerUnavailableThe MCP service is deleted or unavailable
mcp_config.headers is returned as saved and may contain sensitive information such as API keys. Protect the response content.