|
| 1 | + |
| 2 | +> 注:当前项目为 Serverless Devs 应用,由于应用中会存在需要初始化才可运行的变量(例如应用部署地区、函数名等等),所以**不推荐**直接 Clone 本仓库到本地进行部署或直接复制 s.yaml 使用,**强烈推荐**通过 `s init ${模版名称}` 的方法或应用中心进行初始化,详情可参考[部署 & 体验](#部署--体验) 。 |
| 3 | +
|
| 4 | +# aliyun-devops-mcp-server 帮助文档 |
| 5 | + |
| 6 | +<description> |
| 7 | + |
| 8 | +devops mcp server |
| 9 | + |
| 10 | +</description> |
| 11 | + |
| 12 | + |
| 13 | +## 资源准备 |
| 14 | + |
| 15 | +使用该项目,您需要有开通以下服务并拥有对应权限: |
| 16 | + |
| 17 | +<service> |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +| 服务/业务 | 权限 | 相关文档 | |
| 22 | +| --- | --- | --- | |
| 23 | +| 函数计算 | AliyunFCFullAccess | [帮助文档](https://help.aliyun.com/product/2508973.html) [计费文档](https://help.aliyun.com/document_detail/2512928.html) | |
| 24 | + |
| 25 | +</service> |
| 26 | + |
| 27 | +<remark> |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +</remark> |
| 32 | + |
| 33 | +<disclaimers> |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +</disclaimers> |
| 38 | + |
| 39 | +## 部署 & 体验 |
| 40 | + |
| 41 | +<appcenter> |
| 42 | + |
| 43 | +- :fire: 通过 [云原生应用开发平台 CAP](https://cap.console.aliyun.com/template-detail?template=aliyun-devops-mcp-server) ,[](https://cap.console.aliyun.com/template-detail?template=aliyun-devops-mcp-server) 该应用。 |
| 44 | + |
| 45 | +</appcenter> |
| 46 | +<deploy> |
| 47 | + |
| 48 | + |
| 49 | +</deploy> |
| 50 | + |
| 51 | +## 案例介绍 |
| 52 | + |
| 53 | +<appdetail id="flushContent"> |
| 54 | + |
| 55 | +## alibabacloud-devops-mcp-server |
| 56 | +[](https://smithery.ai/server/@aliyun/alibabacloud-devops-mcp-server) |
| 57 | + |
| 58 | +[AlibabaCloud Devops](https://www.aliyun.com/product/yunxiao) MCP Server 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. |
| 59 | + |
| 60 | +### Features |
| 61 | + |
| 62 | +alibabacloud-devops-mcp-server provides the following capabilities for AI assistants: |
| 63 | + |
| 64 | +* **Code Repository Management**: Query code repositories and their branches, create branches |
| 65 | +* **File Operations**: Create, update, delete, and retrieve code file content |
| 66 | +* **Code Review**: Create and manage code review processes |
| 67 | +* **Project Management**: Search projects, get project details |
| 68 | +* **Pipeline Management**: Get pipeline details, get pipeline list, create a pipeline run instance, get the latest pipeline run instance, get pipeline run details, get pipeline run list, Query / Run a pipeline deployment task |
| 69 | +* **Package Management**: Get package repository details list, Get artifacts details list, Get single artifact details |
| 70 | + |
| 71 | +### Tools |
| 72 | + |
| 73 | +alibabacloud-devops-mcp-server integrates various tools, including: |
| 74 | + |
| 75 | +#### Organization |
| 76 | +- `get_current_organization_Info`: Get current user's organization information |
| 77 | +- `get_user_organizations`: Get the list of organizations the current user has joined |
| 78 | + |
| 79 | +#### Code Management Tools |
| 80 | + |
| 81 | +- `create_branch`: Create a branch |
| 82 | +- `delete_branch`: Delete a branch |
| 83 | +- `get_branch`: Get branch information |
| 84 | +- `list_branches`: Get branch list |
| 85 | +- `create_file`: Create a file |
| 86 | +- `delete_file`: Delete a file |
| 87 | +- `get_file_blobs`: Get file content |
| 88 | +- `list_files`: Query file tree |
| 89 | +- `update_file`: Update file content |
| 90 | +- `create_change_request`: Create a merge request |
| 91 | +- `create_change_request_comment`: Create a comment on a merge request |
| 92 | +- `get_change_request`: Query merge request |
| 93 | +- `list_change_request_patch_sets`: Query merge request version list |
| 94 | +- `list_change_request`: Query merge request list |
| 95 | +- `list_change_request_comments`: Query merge request comment list |
| 96 | +- `get_compare`: Compare code |
| 97 | +- `get_repository`: Get repository details |
| 98 | +- `list_repositories`: Get repository list |
| 99 | + |
| 100 | +#### Project Management Tools |
| 101 | + |
| 102 | +- `get_project`: Get project details |
| 103 | +- `search_projects`: Search projects |
| 104 | +- `get_work_item`: Get work item details |
| 105 | +- `search_workitems`: Search work items |
| 106 | + |
| 107 | +#### Pipeline Management Tools |
| 108 | + |
| 109 | +- `get_pipeline`: Get pipeline details |
| 110 | +- `list_pipelines`: Get pipeline list |
| 111 | +- `smart_list_pipelines`: Smart pipeline search with natural language time references |
| 112 | +- `create_pipeline_run`: Create a pipeline run instance |
| 113 | +- `get_latest_pipeline_run`: Get the latest pipeline run instance |
| 114 | +- `get_pipeline_run`: Get pipeline run details |
| 115 | +- `list_pipeline_runs`: Get pipeline run list |
| 116 | +- `list_pipeline_jobs_by_category`: Get pipeline execution tasks by category |
| 117 | +- `list_pipeline_job_historys`: Get the execution history of a pipeline task |
| 118 | +- `execute_pipeline_job_run`: Manually run a pipeline task |
| 119 | +- `get_pipeline_job_run_log`: Get the execution logs of a pipeline job |
| 120 | +- `list_service_connections`: List service connections in organization |
| 121 | +- `generate_pipeline_yaml`: Automatically generates YAML configuration |
| 122 | +- `create_pipeline_from_description`: Automatically generates YAML configuration and creates pipeline |
| 123 | + |
| 124 | +#### Packages Management Tools |
| 125 | + |
| 126 | +- `list_package_repositories`: Get package repositories details list |
| 127 | +- `list_artifacts`: Get artifacts details list |
| 128 | +- `get_artifact`: Get single artifact details |
| 129 | + |
| 130 | +### Usage |
| 131 | + |
| 132 | +#### Prerequisites |
| 133 | +* node version >= 16.0.0 |
| 134 | +* [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. |
| 135 | + |
| 136 | +  |
| 137 | + |
| 138 | +#### Installing via Smithery |
| 139 | + |
| 140 | +To install [AlibabaCloud DevOps](https://www.aliyun.com/product/yunxiao) Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@aliyun/alibabacloud-devops-mcp-server): |
| 141 | + |
| 142 | +```bash |
| 143 | +npx -y @smithery/cli install @aliyun/alibabacloud-devops-mcp-server --client claude |
| 144 | +``` |
| 145 | + |
| 146 | +#### Install Yunxiao MCP server via MCP marketplace |
| 147 | +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. |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | +#### Run MCP Server via NPX |
| 152 | +```json |
| 153 | +{ |
| 154 | + "mcpServers": { |
| 155 | + "yunxiao": { |
| 156 | + "command": "npx", |
| 157 | + "args": [ |
| 158 | + "-y", |
| 159 | + "alibabacloud-devops-mcp-server" |
| 160 | + ], |
| 161 | + "env": { |
| 162 | + "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>" |
| 163 | + } |
| 164 | + } |
| 165 | + } |
| 166 | +} |
| 167 | +``` |
| 168 | + |
| 169 | +#### Run MCP Server via Docker Container |
| 170 | +1. Docker build |
| 171 | +```shell |
| 172 | +docker build -t alibabacloud/alibabacloud-devops-mcp-server . |
| 173 | +``` |
| 174 | +2. Configure MCP Server |
| 175 | +```json |
| 176 | +{ |
| 177 | + "mcpServers": { |
| 178 | + "yunxiao": { |
| 179 | + "command": "docker", |
| 180 | + "args": [ |
| 181 | + "run", |
| 182 | + "-i", |
| 183 | + "--rm", |
| 184 | + "-e", |
| 185 | + "YUNXIAO_ACCESS_TOKEN", |
| 186 | + "alibabacloud/alibabacloud-devops-mcp-server" |
| 187 | + ], |
| 188 | + "env": { |
| 189 | + "YUNXIAO_ACCESS_TOKEN": "<YOUR_TOKEN>" |
| 190 | + } |
| 191 | + } |
| 192 | + } |
| 193 | +} |
| 194 | +``` |
| 195 | + |
| 196 | +### Related Links |
| 197 | +- [AlibabaCloud DevOps](https://www.aliyun.com/product/yunxiao) |
| 198 | +- [MCP market](https://modelscope.cn/mcp/servers/@aliyun/alibabacloud-devops-mcp-server) |
| 199 | +- [Example Use Cases](https://mp.weixin.qq.com/s/KQsN6dQlnNeCNATC-QD7pg) |
| 200 | + |
| 201 | + |
| 202 | +</appdetail> |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | +## 使用流程 |
| 211 | + |
| 212 | +<usedetail id="flushContent"> |
| 213 | + |
| 214 | +### 步骤一 |
| 215 | +通过[FunctionAI MCP市场](https://cap.console.aliyun.com/mcp/274) 部署完成后,在集成向导中复制MCP Client的连接配置,准备好支持 SSE 的 MCP Client,通过 SSETransport 进行连接。 |
| 216 | + |
| 217 | +<img src="https://img.alicdn.com/imgextra/i4/O1CN01vbDOML1LI02jGV936_!!6000000001275-2-tps-1888-1446.png" alt="MCP Client" width="80%"> |
| 218 | + |
| 219 | + |
| 220 | +</usedetail> |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
0 commit comments