Operations 8 min read

Automate Code Generation and Merge Requests with Cloud DevOps MCP and Lingma

This guide walks you through integrating Alibaba Cloud DevOps MCP service with the Lingma code generation tool to automatically create code, branches, and merge requests from work item descriptions, covering prerequisites, token setup, service addition, and execution steps.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Automate Code Generation and Merge Requests with Cloud DevOps MCP and Lingma

By integrating the Cloud DevOps MCP service with the Lingma code generation tool, development teams can automate the entire workflow from parsing work item content to generating code, creating branches, committing changes, and opening merge requests.

Prerequisites

Standard organization created in Cloud DevOps.

Lingma plugin installed in your IDE.

SSH key configured to enable push/pull operations on the Codeup-Demo repository.

Step 1: Create a Code Requirement in Projex

Open the Projex project collaboration platform and click the Agile Development Sample Project .

Navigate to Requirements and click New to open the new requirement dialog.

Enter the following details:

Title: Add QuickSortUtils sorting utility class.

Content: Create a QuickSortUtils class that implements array sorting.

Save the requirement and copy its ID (e.g., DEMO-38).

Step 2: Create a Personal Access Token

In Cloud DevOps, click your avatar in the top‑right corner and select Personal Settings .

Open Personal Access Tokens and click New Token .

Configure the token:

Name: any descriptive name.

Expiration: default 7 days (or longer as needed).

Permissions: grant read/write for Organization Management , Project Collaboration , and Code Management .

Create the token, copy it immediately, and store it securely for later use in MCP service installation.

Step 3: Add the Cloud DevOps MCP Service

In IntelliJ IDEA, click the Lingma icon in the sidebar to open Intelligent Conversation .

Enter the MCP service page either via the welcome message link or through Personal Settings → MCP Service .

Click Install and, when prompted, paste the personal access token created in Step 2, then confirm Add Now .

After installation, verify the service appears under My Services with a green check indicating a successful connection.

Step 4: Generate Code and Submit a Merge Request

Clone the Codeup-Demo repository to your local machine and open it in IntelliJ IDEA.

In the Lingma Intelligent Conversation panel, switch to Agent mode and input the following prompts:

请展示工作项内容:DEMO-38。
请查找一下 Codeup-Demo 这个代码库,并查看一下分支。

After confirming the prompts, issue the final command: <code>请在 Codeup-Demo 代码库上创建一个分支,然后根据工作项编写代码,工作项 ID:DEMO-38,完成后推送代码到远程 Codeup 仓库,并在 Codeup 仓库创建一个合并请求。</code> The MCP tool will guide you through each sub‑step, requiring confirmation before proceeding. When the process finishes, check the Codeup‑Demo repository to see the new branch and its associated merge request.

Notes and Troubleshooting

The host running the IDE must have Node.js installed; otherwise you may encounter the error "failed to create MCP client for yunxiao: exec: \"npx\" not found in %PATH%". Install Node.js to resolve.

Refer to the MCP FAQ for common issues such as missing npx command.

Reference Documentation

Creating a standard organization: https://help.aliyun.com/zh/yunxiao/user-guide/new-standard-enterprise

Installing Lingma plugin: https://help.aliyun.com/zh/lingma/user-guide/download-the-installation-guide

Configuring SSH key: https://help.aliyun.com/zh/yunxiao/user-guide/configure-ssh-key

Creating a requirement: https://help.aliyun.com/zh/yunxiao/user-guide/new-demand

MCP service page: https://devops.aliyun.com/workbench?orgId=65a535280cab697efe135a1c

Codeup‑Demo repository: https://codeup.aliyun.com/

MCP FAQ: https://help.aliyun.com/zh/lingma/support/faq-mcp

code generationMCPDevOpsIntelliJ IDEALingma
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.