首页 DataWorks Agent for third-party clients

DataWorks Agent for third-party clients

更新时间: 2026-08-13 14:34:39

DataWorks Agent is based on the Model Context Protocol (MCP). It connects to the DataWorks MCP Server and other big data MCP servers, such as the Hologres MCP Server, to provide capabilities such as data development, task O&M, and data integration in DataWorks through natural language interaction.

Important

For a streamlined Agent service, see Agent.

How it works

DataWorks Agent enables big data development through natural language interactions in an intelligent chat window. It works by using a Large Language Model (LLM) to parse your requests and then calls MCP Server capabilities to execute tasks.

For example, you can ask "How many workspaces do I have?" in the DataWorks Agent chat window. The Agent uses the LLM to parse this request and calls the ListProjects tool provided by the DataWorks MCP Server, which is built on DataWorks OpenAPI, to retrieve the result. For complex tasks, the LLM interacts with the MCP Server multiple times.

DataWorks Agent not only integrates with the DataWorks MCP Server but also connects to other MCP servers. You can also choose your own LLM, such as Qwen, DeepSeek, or OpenAI.

image

You can also try the following prompts to explore more task scenarios supported by DataWorks Agent.

Scope

Example prompt

Data Studio

[Query tasks] Find all MaxCompute SQL data development nodes in the current workspace's project directory that have a scheduling status of 'Paused'.

[Rename tasks] Rename the nodes found above to 'invalid_node_to_delete'. Use sequential numbers to differentiate them.

[Create tasks] Create five MaxCompute SQL nodes in the current workspace's project directory. The names must start with MC_Demo, be followed by an underscore, and end with an auto-incrementing number starting from 01.

Task O&M

[Rerun failed tasks] In this workspace, find the tasks that failed on 20250330 and rerun their instances. Note that bizdate is a timestamp in milliseconds.

[Query failed instances] Find all instances that failed on 20250331 in the current workspace's project. Note that bizdate is a timestamp in milliseconds.

[Analyze task rerun properties] Analyze the rerun properties of these tasks. If they are rerunnable, rerun them.

Data Integration

[Sync a single MySQL table to MaxCompute] Create a batch data integration task in the current workspace with the following settings:

  • Source data source: mc_test_mysql (Table name: users)

  • Destination data source: mc_test_maxcompute (Destination table name: users, same as the source table)

  • Resource group: mc_test_res

  • Field mapping method: Automatic mapping by name (columns with the same name in the source and destination tables are automatically mapped).

Data analysis

[Sales analysis] Analyze the sales trends of the top 10 best-selling products this month from the order table.

Limitations

This feature is available only in a personal development environment within a workspace where the new version of Data Studio is enabled.

Important

You must reinstall the MCP Server after restarting a personal development environment. Proceed with caution.

Billing

Using DataWorks Agent incurs the following fees:

  • DataWorks OpenAPI call fees

    When the Agent calls DataWorks OpenAPI through an MCP Server, calls are charged based on the OpenAPI billing standards.

  • LLM token fees

    The Agent calls the Large Language Model (LLM) that you configure, such as Qwen, to parse user intent and generate natural language responses. This process consumes input and output tokens, which are billed according to the pricing rules of your chosen model provider. For example, if you use the qwen-coder-plus model in Model Studio, the fees are calculated based on the Model Studio billing details.

Quick start

After you configure DataWorks Agent, click the image icon in the upper-right corner of the Cline page to open the DataWorks Agent chat interface and try a quick example: query the members of the current workspace.

Enter the following prompt: Query the members of the current workspace.

The Agent executes the task in the following steps:

  1. Parse and confirm the request: The Agent parses your intent (such as "query the members of the current workspace"), automatically identifies the ListProjectMembers API to call, and asks you to confirm required parameters, such as the target workspace (ProjectId).

  2. Call the API and receive a response: After you click Approve, the Agent calls the ListProjectMembers OpenAPI to retrieve a structured list of members in the workspace, including their roles and account types. For more information about the ListProjectMembers OpenAPI, see Query the list of workspace members.

    Note
    • During execution, the system prompts you to confirm relevant actions and provide necessary information. You can click Approve to proceed or Reject to cancel the action.

    • The breakdown logic for key steps may vary slightly depending on task complexity, LLM selection, and model version. The actual execution flow depends on the Agent's real-time parsing and interaction during the session.

Configure DataWorks Agent

DataWorks Agent uses an MCP client extension, such as Cline, to create the chat interface. It connects to the DataWorks MCP Server and other Alibaba Cloud MCP servers through MCP Server configurations.

Note

You can connect to more open source MCP servers as needed to enhance the capabilities of DataWorks Agent.

Prerequisites

Step 1: Enter the personal development environment

Follow these steps to start and access your personal development environment.

  1. Go to the Workspaces page in the DataWorks console. In the top navigation bar, select a desired region. Find the desired workspace and choose Shortcuts > Data Studio in the Actions column.

  2. Click the image icon next to Personal Development Environment in the top navigation bar to check the status of your personal development environment instance and access it.

    • If the Instance Status is Running: Click the running personal development environment instance under Personal Development Environment to enter the environment.

    • If the instance has any other status: Click Management Environment in the pop-up window. On the Personal Development Environment Instances page, find your instance, and click Start in the Actions column. Wait for the Instance Status to change to Running, and then click the instance to enter the environment.

    Note

    An icon similar to image in the Personal Development Environment area indicates that you have successfully entered the personal development environment.

Step 2: Install Cline

After you enter the personal development environment, follow these steps to configure DataWorks Agent. This guide uses Cline as an example.

Important

If you selected the dataworks-mcp:py3.11-ubuntu22.04 image when you created your personal development environment instance, you do not need to upgrade the engine or install the Cline extension.

Upgrade the engine

On older personal development environments, you must upgrade the underlying engine to ensure compatibility with the extension's features. If you have already performed the upgrade, you can skip this step.

One-click upgrade: After you enter the personal development environment, if a pop-up window appears and prompts you to upgrade the underlying engine for compatibility, click the One-click Upgrade button to complete the upgrade.

Command-line upgrade: Click the image icon in the bottom-left corner of the toolbar to open the terminal. Run the following command in the terminal and press Enter to start the upgrade.

wget https://nodejs.org/dist/v20.19.0/node-v20.19.0-linux-x64.tar.xz
tar xf node-v20.19.0-linux-x64.tar.xz
mv /etc/dsw/node /etc/dsw/node14
mv node-v20.19.0-linux-x64 /etc/dsw/node

bash <(curl -s https://dataworks-notebook-${REGION}.oss-${REGION}.aliyuncs.com/public-datasets/aone-release/dwcode-server/scripts/update.sh)  0.2.169
Note

You do not need to manually replace ${REGION}. The system automatically detects and populates the current region. You can also run the echo ${REGION} command in the terminal to confirm the resolved region value.

After the upgrade is complete, click Reload in the pop-up window to apply the latest changes.

Install the Cline extension

Follow these steps to install the Cline extension in your personal development environment to serve as your Agent chat window.

  1. In the left-side navigation pane of the personal development environment page, click the image icon to go to the Extensions page.

  2. Enter Cline in the search box on the Extensions page.

  3. Find the Cline extension in the search results.

  4. Click Install in the lower-right corner of the Cline extension and wait for the installation to complete.

  5. After the installation is complete, on the Data Studio page, click the image icon in the upper-right corner to open Copilot Chat, and then click the image icon to switch to Cline.

  6. You can also right-click the image icon to Configure Keybindings or move the extension to your preferred location, such as the Move to > Primary Sidebar or Move to > Panel.

Step 3: Configure the LLM API key

After you install the Cline extension, follow these steps to configure your API Key. This example shows how to connect to the Model Studio API by using the OpenAI Compatible mode.

Note
  • To connect to other models, configure the relevant parameters according to the user interface.

  • Only the Use your own API key method is supported; Get Started for Free is not.

  1. On the Data Studio personal development environment page, click the image icon in the upper-right corner of the top navigation bar to open Copilot Chat, and then click the image icon to switch to Cline.

  2. On the Cline page, click Use your own API key and configure the parameters as described in the following table.

    Parameter

    Description

    API Provider

    The API service provider that you want to use. Select OpenAI Compatible. This indicates that you will use an OpenAI-compatible interface to connect to the Model Studio API.

    Base URL

    The base URL of the API service.

    For example, the OpenAI-compatible API endpoint provided by Model Studio is https://dashscope.aliyuncs.com/compatible-mode/v1.

    API Key

    The key that is used for authentication. You can obtain this API Key from the Alibaba Cloud Model Studio console.

    Model ID

    The specific model that you want to use. Different models have different functions and performance.

    Select qwen-coder-plus or qwen-plus:

    • qwen-coder-plus: suitable for code generation and programming tasks.

    • qwen-plus: suitable for general text generation and processing tasks.

  3. Click Let's go! to save the configuration.

Step 4: Configure the MCP Server

After you configure the API Key, follow these steps to connect to and configure the DataWorks MCP Server. For more information about the DataWorks MCP Server, see Appendix: DataWorks MCP Server.

  1. In the upper-right corner of the Cline page, click the image icon to go to the MCP Servers Marketplace tab.

  2. Switch to the Installed tab to view installed MCP servers.

  3. Click Configure MCP Servers to open the cline_mcp_settings.json configuration file. DataWorks provides a default configuration for alibabacloud-dataworks-mcp-server. The configuration is as follows:

    {
      "mcpServers": {
        "alibabacloud-dataworks-mcp-server": {
          "command": "npx",
          "args": [
            "alibabacloud-dataworks-mcp-server"
          ],
          "env": {
            "REGION": "cn-shanghai",
            "ALIBABA_CLOUD_CREDENTIALS_URI": "http://localhost:7002/api/v1/credentials/0",
            "TOOL_CATEGORIES": "SERVER_IDE_DEFAULT"
          },
          "disabled": false,
          "autoApprove": [],
          "timeout": 60
        }
      }
    }

    Parameter

    Description

    command

    npx, the command provided by dataworks-mcp-server.

    args

    alibabacloud-dataworks-mcp-server, the command argument for dataworks-mcp-server.

    env

    REGION

    The region where your DataWorks workspace is located, for example, cn-shanghai.

    ALIBABA_CLOUD_CREDENTIALS_URI

    The URI for the Alibaba Cloud credential.

    Important

    This parameter is valid only in the DataWorks personal development environment and is used to obtain Alibaba Cloud user authentication.

    TOOL_CATEGORIES

    An allowlist of Tool categories. Enter the OpenAPI categories, separated by commas.

    Example: "TOOL_CATEGORIES":"Data Source,Workspace Management,Resource Group Management,Data Map,Data Integration,Data Studio (new version),Operation Center,DataService,Open Platform,Data Quality,Label Management,Security Center,SERVER_IDE_DEFAULT".

    Note
    • SERVER_IDE_DEFAULT refers to the default Tools in the personal development environment. The other service categories can be found in the left-side directory tree on the DataWorks - OpenAPI Overview page.

    • To improve model loading performance and user experience, the default configuration sets TOOL_CATEGORIES to SERVER_IDE_DEFAULT. To enable all OpenAPI tools, you can remove this configuration item.

    TOOL_NAMES

    An allowlist of Tool names. Enter the OpenAPI names, separated by commas.

    Example: "TOOL_NAMES":"ListProjects,CreateNode,UpdateNode".

    Note

    You can find TOOL_NAMES on the DataWorks - OpenAPI Overview page.

  4. If a list of available Tools loads on the page after you save the configuration, alibabacloud-dataworks-mcp-server is installed and configured correctly. You can now use the DataWorks MCP Server features.

    Note

    If this information fails to load, make sure that you have upgraded the engine.

  5. You can extend the capabilities of DataWorks Agent by directly editing the cline_mcp_settings.json configuration file or by installing other MCP servers from the Marketplace. For example, to use Hologres-related functions in DataWorks Agent, you can connect to the Hologres MCP Server.

FAQ

  • Q: When I run a preset prompt on the MCP Server, an API request takes too long to respond. What could be the cause and how can I fix it?

    A: The request may time out due to compatibility issues with an outdated engine version. Upgrade the engine to resolve this.

  • Q: What can I do to improve the model's response speed?

    A: To improve response performance, try the following measures:

    • Disable unused MCP servers to reduce system overhead.

    • In the MCP Server's configuration file, use the env parameter to explicitly specify TOOL_CATEGORIES or TOOL_NAMES. This loads only the necessary toolsets and reduces the number of imported Tools.

Appendix: DataWorks MCP Server

MCP (Model Context Protocol) is a protocol that provides a standardized context for Large Language Models (LLMs). It standardizes how LLMs connect to various data sources and tools, enabling them to process information more effectively. An MCP client can call the capabilities of various MCP servers through the MCP protocol.

The DataWorks MCP Server, as a type of MCP server, encapsulates DataWorks OpenAPI and exposes the big data processing capabilities of DataWorks. You can integrate the DataWorks MCP Server into third-party products, programs, or agents to quickly call DataWorks capabilities.

Important

To use DataWorks Agent outside a personal development environment, you must configure ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET in the env parameter and remove the ALIBABA_CLOUD_CREDENTIALS_URI configuration. You can obtain the required keys here.

image
阿里云首页 大数据开发治理平台 DataWorks 相关技术圈