无人机ci-mcp
一个固执己见的mcp服务器,暴露 drone.io ci构建信息和日志作为MCP。将仅支持只读功能。
> [!警告]
> 仍在积极开发中,使用风险自负
用法
启动运输```
npx -y drone-ci-mcp --access-token= --server-url=
### 克劳德设置```json
{
"mcpServers": {
"drone-ci-mcp": {
"command": "npx",
"args": [
"-y"
"drone-ci-mcp",
"--access-token=",
"--server-url="
]
}
}
}
MCP检查员```shell
npx @modelcontextprotocol/inspector npx -y drone-ci-mcp --access-token= --server-url=
```
工具
drone_build_info
只读工具,用于查找构建信息并将输出作为YAML返回。
输入:
- repoSlug-无人机中存储库的蛞蝓。所有者/组织和以“/”分隔的存储库名称的组合,即所有者/仓库
- buildNumber-无人机CI构建号
输出:
答复来自https://docs.drone.io/api/builds/build_info/作为马尔敦+YAML````markdown
Build 1 in ****
yaml
id: 1
repo_id: 5
trigger:
number: 1
status: success
event: custom
action: ''
link: >-
https://github.com/
timestamp: 0
message:
before: dbde12a8600cb6591f4c84085acb95d08b5505e6
after: dbde12a8600cb6591f4c84085acb95d08b5505e6
ref: refs/heads/main
source_repo: ''
source: main
target: main
author_login:
author_name:
author_email:
author_avatar:
sender: madappa-sharath
started: 1745806907
finished: 1745806908
created: 1745806904
updated: 1745806907
stages:
- id: 1
repo_id: 5
build_id: 1
number: 1
name: hello-world
kind: pipeline
type: docker
status: success
errignore: false
exit_code: 0
machine: drone-runner-65d8dd8798-rf8xr
os: linux
arch: arm64
started: 1745806907
stopped: 1745806908
created: 1745806904
updated: 1745806908
on_success: true
on_failure: false
steps:
- id: 1
step_id: 1
number: 1
name: clone
status: success
exit_code: 0
started: 1745806907
stopped: 1745806908
image: drone/git:latest
.....
### drone_build_info
查找步骤日志的只读工具。
输入:
1. repoSlug-无人机中存储库的蛞蝓。所有者/组织和以“/”分隔的存储库名称的组合,即所有者/仓库
1. buildNumber-无人机CI构建号
1. stageNumber-构建阶段编号。由舞台上的“数字”字段表示
1. stepId-构建步骤id。由步骤上的字段“step_id”表示
输出:
答复来自https://docs.drone.io/api/builds/build_logs/作为马尔敦````markdown
# Logs for step 2 in stage **1** of **1** build in **** repository
```shell
+ echo 'hello-world'
,hello-world```
