devops-mcp-server-extension 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +218 -0
  2. package/README.md +527 -0
  3. package/README.zh-cn.md +503 -0
  4. package/dist/common/errors.js +77 -0
  5. package/dist/common/modularTemplates.js +483 -0
  6. package/dist/common/pipelineTemplates.js +19 -0
  7. package/dist/common/toolsetManager.js +123 -0
  8. package/dist/common/toolsets.js +23 -0
  9. package/dist/common/types.js +60 -0
  10. package/dist/common/utils.js +381 -0
  11. package/dist/common/version.js +1 -0
  12. package/dist/index.js +225 -0
  13. package/dist/operations/appstack/appOrchestrations.js +260 -0
  14. package/dist/operations/appstack/appTags.js +168 -0
  15. package/dist/operations/appstack/appTemplates.js +72 -0
  16. package/dist/operations/appstack/applications.js +171 -0
  17. package/dist/operations/appstack/changeOrders.js +320 -0
  18. package/dist/operations/appstack/changeRequests.js +288 -0
  19. package/dist/operations/appstack/deploymentResources.js +286 -0
  20. package/dist/operations/appstack/globalVars.js +221 -0
  21. package/dist/operations/appstack/releaseWorkflows.js +695 -0
  22. package/dist/operations/appstack/variableGroups.js +245 -0
  23. package/dist/operations/codeup/branches.js +157 -0
  24. package/dist/operations/codeup/changeRequestComments.js +140 -0
  25. package/dist/operations/codeup/changeRequests.js +230 -0
  26. package/dist/operations/codeup/commits.js +121 -0
  27. package/dist/operations/codeup/compare.js +30 -0
  28. package/dist/operations/codeup/files.js +249 -0
  29. package/dist/operations/codeup/repositories.js +71 -0
  30. package/dist/operations/codeup/types.js +414 -0
  31. package/dist/operations/flow/hostGroup.js +52 -0
  32. package/dist/operations/flow/pipeline.js +609 -0
  33. package/dist/operations/flow/pipelineJob.js +126 -0
  34. package/dist/operations/flow/resourceMember.js +137 -0
  35. package/dist/operations/flow/serviceConnection.js +27 -0
  36. package/dist/operations/flow/tag.js +191 -0
  37. package/dist/operations/flow/types.js +523 -0
  38. package/dist/operations/flow/vmDeployOrder.js +171 -0
  39. package/dist/operations/organization/members.js +106 -0
  40. package/dist/operations/organization/organization.js +110 -0
  41. package/dist/operations/organization/types.js +111 -0
  42. package/dist/operations/packages/artifacts.js +71 -0
  43. package/dist/operations/packages/repositories.js +39 -0
  44. package/dist/operations/packages/types.js +56 -0
  45. package/dist/operations/projex/effort.js +122 -0
  46. package/dist/operations/projex/project.js +243 -0
  47. package/dist/operations/projex/sprint.js +103 -0
  48. package/dist/operations/projex/types.js +618 -0
  49. package/dist/operations/projex/workitem.js +826 -0
  50. package/dist/operations/testhub/testcases.js +240 -0
  51. package/dist/operations/testhub/testplans.js +128 -0
  52. package/dist/tool-handlers/appstack-app-release-workflows.js +103 -0
  53. package/dist/tool-handlers/appstack-change-orders.js +55 -0
  54. package/dist/tool-handlers/appstack-change-requests.js +49 -0
  55. package/dist/tool-handlers/appstack-deployment-resources.js +31 -0
  56. package/dist/tool-handlers/appstack-global-vars.js +37 -0
  57. package/dist/tool-handlers/appstack-orchestrations.js +49 -0
  58. package/dist/tool-handlers/appstack-release-workflows.js +37 -0
  59. package/dist/tool-handlers/appstack-tags.js +37 -0
  60. package/dist/tool-handlers/appstack-templates.js +19 -0
  61. package/dist/tool-handlers/appstack-variable-groups.js +55 -0
  62. package/dist/tool-handlers/appstack.js +37 -0
  63. package/dist/tool-handlers/base.js +25 -0
  64. package/dist/tool-handlers/code-management.js +150 -0
  65. package/dist/tool-handlers/commit.js +31 -0
  66. package/dist/tool-handlers/effort.js +103 -0
  67. package/dist/tool-handlers/index.js +119 -0
  68. package/dist/tool-handlers/organization.js +72 -0
  69. package/dist/tool-handlers/packages.js +32 -0
  70. package/dist/tool-handlers/pipeline.js +289 -0
  71. package/dist/tool-handlers/project-management.js +201 -0
  72. package/dist/tool-handlers/resourceMember.js +43 -0
  73. package/dist/tool-handlers/service-connections.js +16 -0
  74. package/dist/tool-handlers/tag.js +64 -0
  75. package/dist/tool-handlers/test-management.js +74 -0
  76. package/dist/tool-handlers/vmDeployOrder.js +50 -0
  77. package/dist/tool-registry/appstack-app-release-workflows.js +80 -0
  78. package/dist/tool-registry/appstack-change-orders.js +40 -0
  79. package/dist/tool-registry/appstack-change-requests.js +35 -0
  80. package/dist/tool-registry/appstack-deployment-resources.js +20 -0
  81. package/dist/tool-registry/appstack-global-vars.js +25 -0
  82. package/dist/tool-registry/appstack-orchestrations.js +35 -0
  83. package/dist/tool-registry/appstack-release-workflows.js +25 -0
  84. package/dist/tool-registry/appstack-tags.js +25 -0
  85. package/dist/tool-registry/appstack-templates.js +10 -0
  86. package/dist/tool-registry/appstack-variable-groups.js +40 -0
  87. package/dist/tool-registry/appstack.js +25 -0
  88. package/dist/tool-registry/base.js +19 -0
  89. package/dist/tool-registry/code-management.js +109 -0
  90. package/dist/tool-registry/commit.js +20 -0
  91. package/dist/tool-registry/effort.js +39 -0
  92. package/dist/tool-registry/index.js +7 -0
  93. package/dist/tool-registry/organization.js +65 -0
  94. package/dist/tool-registry/packages.js +21 -0
  95. package/dist/tool-registry/pipeline.js +190 -0
  96. package/dist/tool-registry/project-management.js +143 -0
  97. package/dist/tool-registry/resourceMember.js +29 -0
  98. package/dist/tool-registry/service-connections.js +10 -0
  99. package/dist/tool-registry/tag.js +44 -0
  100. package/dist/tool-registry/test-management.js +59 -0
  101. package/dist/tool-registry/vmDeployOrder.js +34 -0
  102. package/package.json +52 -0
package/README.md ADDED
@@ -0,0 +1,527 @@
1
+ <p align="center">English | <a href="README.zh-cn.md">中文</a><br></p>
2
+
3
+ # devops-mcp-server-extension
4
+
5
+ > **Fork of [alibabacloud-devops-mcp-server](https://github.com/aliyun/alibabacloud-devops-mcp-server)** - Enhanced MCP Server with additional tools and features.
6
+
7
+ [AlibabaCloud Devops](https://www.aliyun.com/product/yunxiao) MCP Server Extension provides AI assistants with the ability to interact with the Yunxiao platform, enabling them to read work item contents in projects, automatically write code after understanding requirements, and submit code merge requests. Enterprise development teams can use it to assist with code reviews, optimize task management, reduce repetitive operations, and thus focus on more important innovation and product delivery.
8
+
9
+ ## What's New 🆕
10
+
11
+ This extension includes additional tools not found in the original:
12
+ - `list_project_members`: Get project member list
13
+ - `list_workitem_activities`: Get work item activity list
14
+ - `list_workitem_attachments`: Get work item attachment list
15
+ - `get_workitem_file`: Get work item file information
16
+ - `list_workitem_relation_records`: Get work item relation record list
17
+ - `create_workitem_relation_record`: Create work item relation record
18
+ - `delete_workitem_relation_record`: Delete work item relation record
19
+
20
+ ## Features
21
+
22
+ alibabacloud-devops-mcp-server provides the following capabilities for AI assistants:
23
+
24
+ - `organization-management`: Organization management tools (organization list, organization details, department information, organizational roles, member information, etc.)
25
+ - `code-management`: Code repository management tools (repository management, branch management, merge request management, file tree, etc.)
26
+ - `project-management`: Project management tools (project management, work item management, work item fields, work item comments, time tracking, etc.)
27
+ - `pipeline-management`: Pipeline management tools (pipeline list, pipeline configuration, resource management, tag management, deployment management, etc.)
28
+ - `application-delivery`: Application delivery tools (deployment order management, application management, application tags, variable group management, etc.)
29
+ - `packages-management`: Artifact repository management tools (artifact repositories, artifact lists, etc.)
30
+ - `test-management`: Test management tools (test case management, test case directories, test plans, test results, etc.)
31
+
32
+ ## Tools
33
+
34
+ alibabacloud-devops-mcp-server integrates various tools, including:
35
+
36
+ ### Organization Management
37
+
38
+ - `get_current_organization_Info`: Get current user's organization information
39
+ - `get_user_organizations`: Get the list of organizations the current user has joined
40
+ - `get_organization_role`: Get information about an organization role
41
+ - `get_organization_departments`: Get the list of departments in an organization
42
+ - `get_organization_department_info`: Get information about a department in an organization
43
+ - `get_organization_department_ancestors`: Get the ancestors of a department in an organization
44
+ - `get_organization_members`: Get the list of members in an organization
45
+ - `get_organization_member_info`: Get information about a member in an organization
46
+ - `get_organization_member_info_by_user_id`: Get information about a member in an organization by user ID
47
+ - `search_organization_members`: Search for organization members
48
+ - `list_organization_roles`: List organization roles
49
+ - `get_organization_role`: Get information about an organization role
50
+
51
+ ### Code Management Tools
52
+
53
+ - `create_branch`: Create a branch
54
+ - `delete_branch`: Delete a branch
55
+ - `get_branch`: Get branch information
56
+ - `list_branches`: Get branch list
57
+ - `create_file`: Create a file
58
+ - `delete_file`: Delete a file
59
+ - `get_file_blobs`: Get file content
60
+ - `list_files`: Query file tree
61
+ - `update_file`: Update file content
62
+ - `create_change_request`: Create a merge request
63
+ - `create_change_request_comment`: Create a comment on a merge request
64
+ - `get_change_request`: Query merge request
65
+ - `list_change_request_patch_sets`: Query merge request version list
66
+ - `list_change_request`: Query merge request list
67
+ - `list_change_request_comments`: Query merge request comment list
68
+ - `get_compare`: Compare code
69
+ - `get_repository`: Get repository details
70
+ - `list_repositories`: Get repository list
71
+
72
+ ### Project Management Tools
73
+
74
+ - `get_project`: Get project details
75
+ - `search_projects`: Search projects
76
+ - `list_project_members`: 🆕 Get project member list
77
+ - `get_sprint`: Get sprint details
78
+ - `list_sprints`: List sprints in a project
79
+ - `get_work_item`: Get work item details
80
+ - `search_workitems`: Search work items
81
+ - `get_work_item_types`: get work item types
82
+ - `create_work_item`: create work item
83
+ - `list_all_work_item_types`: List all work item types in an organization
84
+ - `list_work_item_types`: List work item types in a project space
85
+ - `get_work_item_type`: Get details of a specific work item type
86
+ - `list_work_item_relation_work_item_types`: List work item types that can be related to a specific work item
87
+ - `get_work_item_type_field_config`: Get field configuration for a specific work item type
88
+ - `get_work_item_workflow`: Get workflow information for a specific work item type
89
+ - `list_work_item_comments`: List comments for a specific work item
90
+ - `create_work_item_comment`: Create a comment for a specific work item
91
+ - `list_workitem_activities`: 🆕 Get work item activity list
92
+ - `list_workitem_attachments`: 🆕 Get work item attachment list
93
+ - `get_workitem_file`: 🆕 Get work item file information
94
+ - `list_workitem_relation_records`: 🆕 Get work item relation record list
95
+ - `create_workitem_relation_record`: 🆕 Create work item relation record
96
+ - `delete_workitem_relation_record`: 🆕 Delete work item relation record
97
+ - `list_current_user_effort_records`: [Project Management] 获取用户的实际工时明细,结束时间和开始时间的间隔不能大于6个月
98
+ - `list_effort_records`: [Project Management] 获取实际工时明细
99
+ - `create_effort_record`: [Project Management] 登记实际工时
100
+ - `list_estimated_efforts`: [Project Management] 获取预计工时明细
101
+ - `create_estimated_effort`: [Project Management] 登记预计工时
102
+ - `update_effort_record`: [Project Management] 更新登记实际工时
103
+ - `update_estimated_effort`: [Project Management] 更新登记预计工时
104
+
105
+ ### Pipeline Management Tools
106
+
107
+ - `get_pipeline`: Get pipeline details
108
+ - `list_pipelines`: Get pipeline list
109
+ - `smart_list_pipelines`: Smart pipeline search with natural language time references
110
+ - `create_pipeline_run`: Create a pipeline run instance
111
+ - `get_latest_pipeline_run`: Get the latest pipeline run instance
112
+ - `get_pipeline_run`: Get pipeline run details
113
+ - `list_pipeline_runs`: Get pipeline run list
114
+ - `list_pipeline_jobs_by_category`: Get pipeline execution tasks by category
115
+ - `list_pipeline_job_historys`: Get the execution history of a pipeline task
116
+ - `execute_pipeline_job_run`: Manually run a pipeline task
117
+ - `get_pipeline_job_run_log`: Get the execution logs of a pipeline job
118
+ - `list_service_connections`: List service connections in organization
119
+ - `create_pipeline_from_description`: Automatically generates YAML configuration and creates pipeline
120
+ - `update_pipeline`: Update an existing pipeline in Yunxiao by pipelineId. Use this to update pipeline YAML, stages, jobs, etc.
121
+ - `create_resource_member`: Create a resource member
122
+ - `delete_resource_member`: Delete a resource member
123
+ - `list_resource_members`: Get a list of resource members
124
+ - `update_resource_member`: Update a resource member
125
+ - `update_resource_owner`: Transfer resource owner
126
+ - `create_tag`: Create a tag
127
+ - `create_tag_group`: Create a tag group
128
+ - `list_tag_groups`: Get a list of tag groups
129
+ - `delete_tag_group`: Delete a tag group
130
+ - `update_tag_group`: Update a tag group
131
+ - `get_tag_group`: Get a tag group
132
+ - `delete_tag`: Delete a tag
133
+ - `update_tag`: Update a tag
134
+ - `stop_vm_deploy_order`: Stop VM deploy order
135
+ - `skip_vm_deploy_machine`: Skip VM deploy machine
136
+ - `retry_vm_deploy_machine`: Retry VM deploy machine
137
+ - `resume_vm_deploy_order`: Resume VM deploy order
138
+ - `get_vm_deploy_order`: Get VM deploy order details
139
+ - `get_vm_deploy_machine_log`: Get VM deploy machine log
140
+
141
+ ### Application Delivery Tools
142
+
143
+ - `create_change_order`: [application delivery] 创建部署单
144
+ - `list_change_order_versions`: [application delivery] 查看部署单版本列表
145
+ - `get_change_order`: [application delivery] 读取部署单使用的物料和工单状态
146
+ - `list_change_order_job_logs`: [application delivery] 查询环境部署单日志
147
+ - `find_task_operation_log`: [application delivery] 查询部署任务执行日志,其中通常包含下游部署引擎的调度细节信息
148
+ - `execute_job_action`: [application delivery] 操作环境部署单
149
+ - `list_change_orders_by_origin`: [application delivery] 根据创建来源查询部署单
150
+ - `create_appstack_change_request`: [application delivery] 创建变更请求
151
+ - `get_appstack_change_request_audit_items`: [application delivery] 获取变更请求的审批项
152
+ - `list_appstack_change_request_executions`: [application delivery] 列出变更请求的执行记录
153
+ - `list_appstack_change_request_work_items`: [application delivery] 列出变更请求的工作项
154
+ - `cancel_appstack_change_request`: [application delivery] 取消变更请求
155
+ - `close_appstack_change_request`: [application delivery] 关闭变更请求
156
+ - `list_applications`: [application delivery] List applications in an organization with pagination
157
+ - `get_application`: [application delivery] Get application details by name
158
+ - `create_application`: [application delivery] Create a new application
159
+ - `update_application`: [application delivery] Update an existing application
160
+ - `get_latest_orchestration`: [application delivery] Get the latest orchestration for an environment
161
+ - `list_app_orchestration`: [application delivery] List application orchestrations
162
+ - `create_app_orchestration`: [application delivery] Create an application orchestration
163
+ - `delete_app_orchestration`: [application delivery] Delete an application orchestration
164
+ - `get_app_orchestration`: [application delivery] Get an application orchestration
165
+ - `update_app_orchestration`: [application delivery] Update an application orchestration
166
+ - `get_env_variable_groups`: [application delivery] Get variable groups for an environment
167
+ - `create_variable_group`: [application delivery] Create a variable group
168
+ - `delete_variable_group`: [application delivery] Delete a variable group
169
+ - `get_variable_group`: [application delivery] Get a variable group
170
+ - `update_variable_group`: [application delivery] Update a variable group
171
+ - `get_app_variable_groups`: [application delivery] Get variable groups for an application
172
+ - `get_app_variable_groups_revision`: [application delivery] Get the revision of variable groups for an application
173
+ - `search_app_templates`: [application delivery] Search application templates
174
+ - `create_app_tag`: [application delivery] Create an application tag
175
+ - `update_app_tag`: [application delivery] Update an application tag
176
+ - `search_app_tags`: [application delivery] Search application tags
177
+ - `update_app_tag_bind`: [application delivery] Update application tag bindings
178
+ - `create_global_var`: [application delivery] Create a global variable group
179
+ - `get_global_var`: [application delivery] Get a global variable group
180
+ - `update_global_var`: [application delivery] Update a global variable group
181
+ - `list_global_vars`: [application delivery] List global variable groups
182
+ - `get_machine_deploy_log`: [application delivery] Get machine deployment log
183
+ - `add_host_list_to_host_group`: [application delivery] Add host list to host group
184
+ - `add_host_list_to_deploy_group`: [application delivery] Add host list to deploy group
185
+ - `list_app_release_workflows`: [application delivery] List all release workflows for an application
186
+ - `list_app_release_workflow_briefs`: [application delivery] List release workflow briefs for an application
187
+ - `get_app_release_workflow_stage`: [application delivery] Get release workflow stage details
188
+ - `list_app_release_stage_briefs`: [application delivery] List release stage briefs
189
+ - `update_app_release_stage`: [application delivery] Update application release workflow stage
190
+ - `list_app_release_stage_runs`: [application delivery] List release stage execution records
191
+ - `execute_app_release_stage`: [application delivery] Execute release workflow stage for a change request
192
+ - `cancel_app_release_stage_execution`: [application delivery] Cancel release workflow stage execution
193
+ - `retry_app_release_stage_pipeline`: [application delivery] Retry release workflow stage pipeline
194
+ - `skip_app_release_stage_pipeline`: [application delivery] Skip release workflow stage pipeline
195
+ - `list_app_release_stage_metadata`: [application delivery] List integrated metadata for stage execution
196
+ - `get_app_release_stage_pipeline_run`: [application delivery] Get release stage pipeline run instance
197
+ - `pass_app_release_stage_validate`: [application delivery] Pass release workflow stage validation
198
+ - `get_app_release_stage_job_log`: [application delivery] Get pipeline job execution log
199
+ - `refuse_app_release_stage_validate`: [application delivery] Refuse release workflow stage validation
200
+
201
+ ### Packages Management Tools
202
+
203
+ - `list_package_repositories`: Get package repositories details list
204
+ - `list_artifacts`: Get artifacts details list
205
+ - `get_artifact`: Get single artifact details
206
+
207
+ ### Test Management Tools
208
+
209
+ - `list_testcase_directories`: [test management] Get test case directory list
210
+ - `create_testcase_directory`: [test management] Create a test case directory
211
+ - `get_testcase_field_config`: [test management] Get test case field configuration
212
+ - `create_testcase`: [test management] Create a test case
213
+ - `search_testcases`: [test management] Search test cases
214
+ - `get_testcase`: [test management] Get test case information
215
+ - `delete_testcase`: [test management] Delete a test case
216
+ - `list_test_plans`: [test management] Get test plan list
217
+ - `get_test_result_list`: [test management] Get test case list in a test plan
218
+ - `update_test_result`: [test management] Update test result
219
+
220
+ ## Usage
221
+
222
+ ### Region Edition Support
223
+
224
+ This tool supports both Yunxiao central station and Region edition deployment modes:
225
+
226
+ - **Central Station**: Uses `https://openapi-rdc.aliyuncs.com` as the API domain
227
+ - **Region Edition**: Uses organization-specific domains, such as `https://your-org.devops.aliyuncs.com`
228
+
229
+ #### Automatic Mode Detection
230
+
231
+ The tool automatically determines the deployment mode based on the configured API base URL:
232
+
233
+ - If the URL contains `openapi-rdc.aliyuncs.com`, it operates in central station mode
234
+ - Otherwise, it operates in region edition mode
235
+
236
+ #### Configuring Region Edition
237
+
238
+ When using a Region edition, set the `YUNXIAO_API_BASE_URL` environment variable:
239
+
240
+ ```json
241
+ {
242
+ "mcpServers": {
243
+ "yunxiao": {
244
+ "command": "npx",
245
+ "args": ["-y", "devops-mcp-server-extension"],
246
+ "env": {
247
+ "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>",
248
+ "YUNXIAO_API_BASE_URL": "https://your-org.devops.aliyuncs.com"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ ```
254
+
255
+ #### organizationId Parameter in Region Mode
256
+
257
+ In Region mode, the `organizationId` parameter becomes optional:
258
+
259
+ - **Central Station Mode**: `organizationId` is required and must be explicitly provided by the user
260
+ - **Region Mode**: `organizationId` can be omitted, and the system will automatically use the default value `"default"`
261
+
262
+ This means in Region mode, users don't need to worry about organization IDs - the tool handles it automatically.
263
+
264
+ ### Prerequisites
265
+ * node version >= 18.0.0
266
+ * [AlibabaCloud Devops](https://www.aliyun.com/product/yunxiao) Personal Access Token, [click here to obtain](https://help.aliyun.com/zh/yunxiao/developer-reference/obtain-personal-access-token). Grant read and write permissions to all APIs under organization management, project collaboration, code management, pipeline management, artifact repository management, application delivery and testing management.
267
+
268
+ ![The personal token authorization page](https://agent-install-beijing.oss-cn-beijing.aliyuncs.com/alibabacloud-devops-mcp-server/img_8.jpg)
269
+
270
+ ## Quick Start (Recommended: Using Stdio Mode)
271
+
272
+ **Stdio mode** is the simplest and most common way, suitable for most MCP clients (like Cursor, Claude Desktop, iFlow, etc.). No Docker installation required, just run via npx.
273
+
274
+ ### Option 1: Direct Use via NPX (Simplest)
275
+
276
+ Add the following configuration to your MCP client configuration file:
277
+
278
+ ```json
279
+ {
280
+ "mcpServers": {
281
+ "yunxiao": {
282
+ "command": "npx",
283
+ "args": [
284
+ "-y",
285
+ "devops-mcp-server-extension"
286
+ ],
287
+ "env": {
288
+ "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>",
289
+ "YUNXIAO_API_BASE_URL": "https://openapi-rdc.aliyuncs.com" // if you use region version, please replace to your instance domain, https://your-org.devops.aliyuncs.com etc.
290
+ }
291
+ }
292
+ }
293
+ }
294
+ ```
295
+
296
+ > **Note**:
297
+ > - Replace `<YOUR_TOKEN>` with your Yunxiao access token
298
+ > - The `-y` flag automatically confirms installation without manual confirmation
299
+ > - This method uses **stdio mode**, communicating with the MCP client via standard input/output
300
+
301
+ ### Option 2: Install via MCP Marketplace
302
+
303
+ The MCP market built into Lingma (AlibabaCloud Tongyi Lingma) has already provided the AlibabaCloud Devops MCP service. To install it, simply enter the MCP market in Lingma and search for "Yunxiao DevOps", then click install.
304
+
305
+ ---
306
+
307
+ ## Using Docker (Optional)
308
+
309
+ If you need to run the MCP server using Docker, you can choose **stdio mode** or **SSE mode**.
310
+
311
+ ### Docker with Stdio Mode
312
+
313
+ This method is similar to using npx directly, but runs through a Docker container.
314
+
315
+ #### 1. Get Docker Image
316
+
317
+ **Option 1: Use Official Image (Recommended)**
318
+
319
+ ```shell
320
+ docker pull build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alibabacloud-devops-mcp-server:v0.2.0
321
+ ```
322
+
323
+ **Option 2: Build Your Own Image**
324
+
325
+ ```shell
326
+ docker build -t alibabacloud/alibabacloud-devops-mcp-server .
327
+ ```
328
+
329
+ #### 2. Configure MCP Client
330
+
331
+ Add the following to your MCP client configuration file:
332
+
333
+ ```json
334
+ {
335
+ "mcpServers": {
336
+ "yunxiao": {
337
+ "command": "docker",
338
+ "args": [
339
+ "run",
340
+ "-i",
341
+ "--rm",
342
+ "-e",
343
+ "YUNXIAO_ACCESS_TOKEN",
344
+ "build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alibabacloud-devops-mcp-server:v0.2.0"
345
+ ],
346
+ "env": {
347
+ "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>"
348
+ }
349
+ }
350
+ }
351
+ }
352
+ ```
353
+
354
+ > **Note**:
355
+ > - If using a self-built image, replace the image name with `alibabacloud/alibabacloud-devops-mcp-server`
356
+ > - This method uses **stdio mode**, with the container communicating via standard input/output
357
+
358
+ ### Docker with SSE Mode
359
+
360
+ SSE mode provides service via HTTP, suitable for scenarios requiring independent service or multi-user support.
361
+
362
+ #### 1. Start SSE Service
363
+
364
+ **Using Official Image:**
365
+
366
+ ```shell
367
+ docker run -d --name yunxiao-mcp \
368
+ -p 3000:3000 \
369
+ -e YUNXIAO_ACCESS_TOKEN="your_token_here" \
370
+ -e PORT=3000 \
371
+ -e MCP_TRANSPORT=sse \
372
+ build-steps-public-registry.cn-beijing.cr.aliyuncs.com/build-steps/alibabacloud-devops-mcp-server:v0.2.0 \
373
+ node dist/index.js --sse
374
+ ```
375
+
376
+ **Using Self-Built Image:**
377
+
378
+ ```shell
379
+ docker run -d --name yunxiao-mcp \
380
+ -p 3000:3000 \
381
+ -e YUNXIAO_ACCESS_TOKEN="your_token_here" \
382
+ -e PORT=3000 \
383
+ -e MCP_TRANSPORT=sse \
384
+ alibabacloud/alibabacloud-devops-mcp-server \
385
+ node dist/index.js --sse
386
+ ```
387
+
388
+ #### 2. Configure MCP Client
389
+
390
+ Add the following to your MCP client configuration file:
391
+
392
+ ```json
393
+ {
394
+ "mcpServers": {
395
+ "yunxiao": {
396
+ "url": "http://localhost:3000/sse"
397
+ }
398
+ }
399
+ }
400
+ ```
401
+
402
+ If you need to pass your own token when connecting (instead of using the default token from server startup):
403
+
404
+ ```json
405
+ {
406
+ "mcpServers": {
407
+ "yunxiao": {
408
+ "url": "http://localhost:3000/sse?yunxiao_access_token=YOUR_TOKEN_HERE"
409
+ }
410
+ }
411
+ }
412
+ ```
413
+
414
+ #### 3. Manage SSE Service
415
+
416
+ View logs:
417
+ ```shell
418
+ docker logs -f yunxiao-mcp
419
+ ```
420
+
421
+ Stop service:
422
+ ```shell
423
+ docker stop yunxiao-mcp
424
+ ```
425
+
426
+ ### Run SSE Mode via Docker Compose
427
+
428
+ 1. **Environment Setup**
429
+ ```shell
430
+ cd alibabacloud-devops-mcp-server
431
+ cp .env.example .env
432
+ # Edit .env file and set YUNXIAO_ACCESS_TOKEN
433
+ ```
434
+
435
+ 2. **Start Service**
436
+ ```shell
437
+ docker compose up -d
438
+ ```
439
+
440
+ 3. **Configure MCP Client**
441
+ ```json
442
+ {
443
+ "mcpServers": {
444
+ "yunxiao": {
445
+ "url": "http://localhost:3000/sse"
446
+ }
447
+ }
448
+ }
449
+ ```
450
+
451
+ ---
452
+
453
+ ## Advanced SSE Mode Configuration
454
+
455
+ ### Using Custom Tokens
456
+
457
+ In SSE mode, each user can pass their own token in the following ways:
458
+
459
+ 1. **Via query parameter** (Recommended):
460
+ ```
461
+ http://localhost:3000/sse?yunxiao_access_token=USER_SPECIFIC_TOKEN
462
+ ```
463
+
464
+ 2. **Via request header**:
465
+ ```
466
+ x-yunxiao-token: USER_SPECIFIC_TOKEN
467
+ ```
468
+
469
+ This allows multiple users to share the same SSE service while using their own individual tokens for authentication.
470
+
471
+ ### Configure SSE Mode in Codex
472
+
473
+ If your Yunxiao MCP server is already running in SSE mode at `http://localhost:3000`, you can configure it in Codex as follows:
474
+
475
+ **Use default token (configured at server startup):**
476
+ ```json
477
+ {
478
+ "mcpServers": {
479
+ "yunxiao": {
480
+ "url": "http://localhost:3000/sse"
481
+ }
482
+ }
483
+ }
484
+ ```
485
+
486
+ **Pass token in URL:**
487
+ ```json
488
+ {
489
+ "mcpServers": {
490
+ "yunxiao": {
491
+ "url": "http://localhost:3000/sse?yunxiao_access_token=YOUR_TOKEN_HERE"
492
+ }
493
+ }
494
+ }
495
+ ```
496
+
497
+ ### Toolsets
498
+ The server now supports toolsets, allowing you to enable only the tools you need. This can reduce the number of tools presented to the AI assistant and improve performance.
499
+
500
+ Available toolsets:
501
+ - `organization-management`: Organization management tools (organization list, organization details, department information, organizational roles, member information, etc.)
502
+ - `code-management`: Code repository management tools (repository management, branch management, merge request management, file tree, etc.)
503
+ - `project-management`: Project management tools (project management, work item management, work item fields, work item comments, time tracking, etc.)
504
+ - `pipeline-management`: Pipeline management tools (pipeline list, pipeline configuration, resource management, tag management, deployment management, etc.)
505
+ - `packages-management`: Artifact repository management tools (artifact repositories, artifact lists, etc.)
506
+ - `application-delivery`: Application delivery tools (deployment order management, application management, application tags, variable group management, etc.)
507
+ - `test-management`: Test management tools (test case management, test case directories, test plans, test results, etc.)
508
+
509
+ To use toolsets, you can specify them via command line arguments or environment variables:
510
+
511
+ 1. Via command line argument:
512
+ ```bash
513
+ npx -y devops-mcp-server-extension --toolsets=code-management,project-management
514
+ ```
515
+
516
+ 2. Via environment variable:
517
+ ```bash
518
+ DEVOPS_TOOLSETS=code-management,project-management npx -y devops-mcp-server-extension
519
+ ```
520
+
521
+ If no toolsets are specified, all tools will be enabled by default.
522
+
523
+
524
+ ## Related Links
525
+ - [AlibabaCloud DevOps](https://www.aliyun.com/product/yunxiao)
526
+ - [MCP market](https://modelscope.cn/mcp/servers/@aliyun/alibabacloud-devops-mcp-server)
527
+ - [Example Use Cases](https://mp.weixin.qq.com/s/KQsN6dQlnNeCNATC-QD7pg)