By integrating the MCP Server with Qoder CN, development teams can automate the end-to-end workflow, from parsing work item content to generating code. This topic explains how to use the Apsara DevOps MCP Server to generate code based on a work item, create a branch, commit the code, and submit a merge request. For more information about how the Apsara DevOps MCP Server works with other Large Language Models (LLMs), see https://github.com/aliyun/alibabacloud-devops-mcp-server.
Prerequisites
-
You have created a Standard Edition organization.
-
You have installed Qoder CN in your IDE.
-
You have configured an SSH key to ensure that your local host can run push and pull operations on the Codeup-Demo sample repository.
Codeup-Demo is created by default for your Apsara DevOps organization.
Video demo
Step 1: Create a code requirement in Projex
-
Go to Projex and click Agile Development Sample Project.
Agile Development Sample Project is created by default for your Apsara DevOps organization. You can also choose another project.
-
In the Agile Development Sample Project, click Requirements in the navigation pane on the left. Click New in the upper-right corner. Then, on the New Requirement page, enter the following information:
-
Title: Add QuickSortUtils sorting utility class.
-
Content: Create a QuickSortUtils sorting utility class to sort arrays.
-
-
Click New. Then, copy the requirement ID, for example,
DEMO-38.
Step 2: Create a personal access token
-
On the Apsara DevOps homepage, click your profile picture in the upper-right corner and select Personal Settings.
-
In the navigation pane on the left, click Personal Access Tokens and then click New Token. On the New Access Token page, configure the following items.

-
Token name: Enter a name for the token.
-
Expired At: The default validity period is 7 days. You can select a longer period.
-
Select permissions: Grant either read-only or read and write permission to each subkey under Organization Management, Project Collaboration, and Code Management.
-
-
After the token is created, copy and save it immediately. You will need this token when you install the MCP Server.
Step 3: Add Apsara Devops service
-
Click the Qianwen Qoder CN icon in the IntelliJ IDEA sidebar to open the Smart Session.
This topic uses IntelliJ IDEA as an example. The location of the Qoder CN icon may vary in other IDEs. For more information about opening a smart session, see the installation guide.
-
On the Smart Session page, you can access the MCP Service page in two ways:
-
Method 1: Click the MCP Tool link in the welcome message to open the MCP Service page.
-
Method 2: Click your profile picture in the upper-right corner, select Personal Settings from the drop-down menu, and then click MCP Service on the Personal Settings page.

-
-
Click the MCP Plaza tab. Search for Apsara DevOps and click Install.

-
In the dialog box that appears, enter the personal access token that you created in Step 2 and click Add Now. After the installation is complete, go to the My Services tab to verify the connection. If the status icon is
, the connection is successful and the service is ready to use. Expand the service details to view the list of tools that are provided by the MCP Server.Your IDE host must have Node.js installed. Otherwise, you may see the following error: “failed to create MCP client for yunxiao: failed to start command: exec: "npx": executable file not found in %PATH%”. For a solution, see MCP FAQ: Missing npx environment.

Step 4: Generate code and submit a merge request
-
Pull the Codeup-Demo sample repository to your local host. Open the project in IntelliJ IDEA.
-
Go to the Tongyi Qoder CN Intelligent Session page, switch to the Agent mode, and then enter the following two prompts for testing.
Show the content of work item DEMO-38.Find the Codeup-Demo repository and list its branches.
-
After the test is successful, enter the production prompt:
Create a branch in the Codeup-Demo repository. Write code based on work item DEMO-38. Push the code to the remote Codeup repository. Then create a merge request in the Codeup repository.
-
This prompt includes multiple steps: reading the requirement, writing code, uploading code, and creating a merge request. When the MCP tools are invoked, the system pauses and asks for your confirmation before it proceeds to the next step.

-
After the interaction is complete, go to the Codeup-Demo sample repository to view the new branch and its associated merge request.

References
Apsara DevOps MCP Server DingTalk group: 134400004101




