Alibaba Cloud DevOps MCP Tool

更新时间:
复制 MD 格式

The Alibaba Cloud DevOps mcp-server tool (alibabacloud-devops-mcp-server) enables an AI assistant to interact with the Alibaba Cloud DevOps platform. This allows the AI assistant to read the content of work items in a project, understand the requirements, automatically write code, and submit merge requests. R&D teams can use this tool to assist with code reviews, optimize task management, and reduce repetitive operations, allowing them to focus on more important innovation and product delivery. The Alibaba Cloud DevOps mcp-server tool is an open-source project. The source code is available at: https://github.com/aliyun/alibabacloud-devops-mcp-server.

Features

alibabacloud-devops-mcp-server supports the following core module features:

  • Repository management: Query repositories and their branches, and create branches.

  • File operations: Create, update, delete, and retrieve file content.

  • Code review: Create and manage code reviews.

  • Project management: Search for projects and retrieve their details.

  • Pipeline management: Retrieve details for pipelines and pipeline runs, list and run pipelines, and query or execute deployment tasks.

  • Artifact repository management: Query for artifacts, and view repository and individual artifact details.

Tool list

alibabacloud-devops-mcp-server integrates several tools, including:

Tool

Description

Organization Management Tools

  • get_current_organization_Info: Retrieves information about the current user's organization.

  • get_user_organizations: Retrieves a list of organizations the current user has joined.

  • get_organization_role: Retrieves organization role information.

  • get_organization_departments: Gets a list of departments in the organization.

  • get_organization_department_info: Retrieves information about a specific department.

  • get_organization_department_ancestors: Retrieves the parent departments of a department.

  • get_organization_members: Gets a list of organization members.

  • get_organization_member_info: Gets information about an organization member.

  • get_organization_member_info_by_user_id: Gets organization member information by user ID.

  • search_organization_members: Searches for organization members.

  • list_organization_roles: Lists organization roles.

  • get_organization_role: Retrieves organization role information.

Project Management Tools

  • get_project: Retrieves project details.

  • search_projects: Searches for projects.

  • get_work_item: Retrieves work item details.

  • search_workitems: Searches for work items.

  • get_work_item_types: Gets work item types.

  • create_work_item: Creates a work item.

Code Management Tools

  • create_branch: Creates a branch.

  • delete_branch: Deletes a branch.

  • get_branch: Retrieves branch information.

  • list_branches: Lists branches.

  • create_file: Creates a file.

  • delete_file: Deletes a file.

  • get_file_blobs: Retrieves the content of a file.

  • list_files: Queries the file tree.

  • update_file: Updates the content of a file.

  • create_change_request: Creates a merge request.

  • create_change_request_comment: Creates a comment on a merge request.

  • get_change_request: Retrieves a merge request.

  • list_change_request_patch_sets: Retrieves a list of patch sets (versions) for a merge request.

  • list_change_request: Retrieves a list of merge requests.

  • list_change_request_comments: Retrieves a list of comments on a merge request.

  • get_compare: Compares code.

  • get_repository: Retrieves repository details.

  • list_repositories: Lists repositories.

Pipeline Tools

  • get_pipeline: Retrieves pipeline details.

  • list_pipelines: Lists pipelines.

  • smart_list_pipelines: Searches for pipelines by using natural language queries, including time-based phrases.

  • create_pipeline_run: Runs a pipeline.

  • get_latest_pipeline_run: Retrieves information about the latest pipeline run.

  • get_pipeline_run: Retrieves pipeline run details.

  • list_pipeline_runs: Retrieves the pipeline run history.

  • list_pipeline_jobs_by_category: Retrieves pipeline jobs by category.

  • list_pipeline_job_historys: Retrieves the job history for a pipeline.

  • execute_pipeline_job_run: Manually runs a pipeline job.

  • get_pipeline_job_run_log: Retrieves the logs for a pipeline job run.

  • list_service_connections: Lists service connections.

  • create_pipeline_from_description: Generates a pipeline YAML file and creates a pipeline from a natural language description.

  • update_pipeline: Updates the content of a pipeline YAML file.

Artifact Repository Tools

  • list_package_repositories: Retrieves information about artifact repositories.

  • list_artifacts: Retrieves a list of artifacts.

  • get_artifact: Retrieves information about a specific artifact.

Installation and usage

Prerequisites

  • Node.js version 16.0.0 or later.

  • Obtain a personal access token. You must grant the token read and write permissions for all APIs under Organization Management, Project Collaboration, Code Management, Pipeline, Artifact Repository, Application Delivery, and Test Management. Ensure you set a long-term expiration date for the token.

Installation methods

You can install and deploy the mcp-server in one of the following three ways:

MCP Marketplace

  1. The MCP Marketplace built into Qoder CN provides the Alibaba Cloud DevOps MCP service. In Qoder CN, go to the MCP Marketplace, find Alibaba Cloud DevOps, and click Install. For more information, see Model Context Protocol.

  2. Enter your personal access token in value and click Add Now. After you click Install, in the installation dialog box that appears, set the value of the YUNXIAO_ACCESS_TOKEN environment variable to your Alibaba Cloud DevOps access token (Personal Access Token), and then click Add Now.

  3. After installation, check My Services. A green icon image indicates the service is connected and ready. You can expand the details to view the list of tools provided by MCP.

NPX

Replace <YOUR_TOKEN> with your personal access token:

{
  "mcpServers": {
    "yunxiao": {
      "command": "npx",
      "args": [
        "-y",
        "alibabacloud-devops-mcp-server"
      ],
      "env": {
        "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

Docker

Download the source code from https://github.com/aliyun/alibabacloud-devops-mcp-server.

  1. Build the image. In the root directory of the repository, run the following command:

    docker build -t alibabacloud/alibabacloud-devops-mcp-server .
  2. Configure the MCP server. Replace <YOUR_TOKEN> with your personal access token:

    {
      "mcpServers": {
        "yunxiao": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "YUNXIAO_ACCESS_TOKEN",
            "alibabacloud/alibabacloud-devops-mcp-server"
          ],
          "env": {
            "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>"
          }
        }
      }
    }

Using the mcp-server

  1. In the intelligent session in Qoder CN, select Agent, and then choose qwen3.

    Project: mall-master [mall] E:\mall-master\mall-master
    ├── .idea
    ├── document
    ├── mall-admin
    ├── mall-common
    ├── mall-demo
    ├── mall-mbg
    ├── mall-portal
    ├── mall-search
    ├── mall-security
    ├── .gitignore
    ├── LICENSE
    ├── pom.xml
    └── README.md
    --- Tongyi Lingma ---
    Hi, I'm Tongyi Lingma, your intelligent coding assistant. You can ask me coding-related questions or submit code to help me improve.
    To learn more about my capabilities, updates, and enterprise-level information, see the help documentation.
    Providing more details and context (such as files, images, or commits) helps me better understand your requests and provide better solutions and code suggestions.
    In agent mode, I can use many tools to solve complex coding tasks. You can also add more MCP tools to fit your workflow.
  2. In the session window, you can issue commands to ask questions or develop features. For example, if you enter the command Get organization role information, Tongyi Lingma calls the yunxiao/get_current_organization_info tool and returns the organization ID (673416db230801f06d3d7ae6), user ID (66a6f60e368d88cff5a513fc), and username (test). If you then request to create a test branch in the Codeup-Demo repository and the yunxiao/create_branch tool fails with a 404 error, the agent suggests that the repository name may be incorrect or that the repository does not exist in the current organization. It provides the following troubleshooting steps: 1. Check for spelling or case sensitivity issues. 2. Confirm that the repository exists in the current organization.

If you have any feedback or suggestions, you can contact us through our DingTalk group: 134400004101