Skip to content

Commit 488a82a

Browse files
authored
Merge pull request #37 from devsapp/add-devops
fix: add aliyun-devops mcp servers
2 parents 481eb94 + c3456ab commit 488a82a

40 files changed

+9899
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
async function preInit(inputObj) {
2+
3+
}
4+
5+
async function postInit(inputObj) {
6+
7+
}
8+
9+
module.exports = {
10+
postInit,
11+
preInit
12+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Edition: 3.0.0
2+
Type: Project
3+
Name: aliyun-devops-mcp-server
4+
Version: 0.0.1
5+
Provider:
6+
- 阿里云 # 取值内容参考:https://api.devsapp.cn/v3/common/args.html
7+
Description: 阿里云云效 MCP 服务
8+
HomePage: https://github.com/devsapp/fcai-mcp-servers/tree/main/start-mcp-aliyun-devops
9+
Tags: #标签详情
10+
- MCP
11+
- Node.js
12+
- AliyunMCP
13+
Category: MCP服务 # 取值内容参考:https://api.devsapp.cn/v3/common/args.html
14+
Service: # 使用的服务
15+
函数计算: # 取值内容参考:https://api.devsapp.cn/v3/common/args.html
16+
Authorities: #权限描述
17+
- AliyunFCFullAccess # 所需要的权限,例如AliyunFCFullAccess
18+
Organization: 阿里云函数计算(FC) # 所属组织
19+
Effective: Public # 是否公开,取值:Public,Private,Organization
20+
Parameters:
21+
type: object
22+
additionalProperties: false # 不允许增加其他属性
23+
required: # 必填项
24+
- region
25+
- serviceRole
26+
properties:
27+
region:
28+
title: 地域
29+
type: string
30+
default: cn-hangzhou
31+
description: 创建应用所在的地区
32+
enum:
33+
- cn-beijing
34+
- cn-hangzhou
35+
- cn-shanghai
36+
- cn-shenzhen
37+
- ap-southeast-1
38+

start-mcp-aliyun-devops/readme.md

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
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)[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](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+
[![smithery badge](https://smithery.ai/badge/@aliyun/alibabacloud-devops-mcp-server)](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+
![The personal token authorization page](https://agent-install-beijing.oss-cn-beijing.aliyuncs.com/alibabacloud-devops-mcp-server/img_8.jpg)
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+
![Install AlibabaCloud Devops MCP Service from the MCP Market](https://agent-install-beijing.oss-cn-beijing.aliyuncs.com/alibabacloud-devops-mcp-server/img_9.png)
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+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
aliyun-devops-mcp-server:
2+
default:
3+
rootPath: ./code
4+
languages:
5+
- nodejs20
6+
cache:
7+
paths:
8+
- "~/.npm"
9+
steps:
10+
- run: npm install
11+
- run: npm run build
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
*.log
4+
.env
5+
.idea
6+
.vscode
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2+
FROM node:22.12-alpine AS builder
3+
4+
# 复制项目文件
5+
COPY . /app
6+
COPY tsconfig.json /tsconfig.json
7+
8+
WORKDIR /app
9+
10+
# 安装依赖并构建
11+
RUN --mount=type=cache,target=/root/.npm npm install
12+
13+
# 添加构建步骤以生成 dist 目录
14+
RUN npm run build
15+
16+
FROM node:22.12-alpine AS release
17+
18+
# 从构建阶段复制必要文件
19+
COPY --from=builder /app/dist /app/dist
20+
COPY --from=builder /app/package.json /app/package.json
21+
COPY --from=builder /app/package-lock.json /app/package-lock.json
22+
23+
ENV NODE_ENV=production
24+
25+
WORKDIR /app
26+
27+
# 安装生产依赖
28+
RUN npm ci --ignore-scripts --omit=dev
29+
30+
ENTRYPOINT ["node", "dist/index.js"]

0 commit comments

Comments
 (0)