mcp-server
v0.6.7CNB MCP Server. A comprehensive MCP server that provides seamless integration to the CNB's API(https://cnb.cool), offering a wide range of tools for repository…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
cnb_list_groups
获取当前用户在CNB平台里拥有权限的顶层组织列表
| Parameter | Type | Description |
|---|---|---|
page | number | 第几页,从1开始 |
page_size | number | 每页多少条数据 |
role | string | 最小仓库权限 |
search | string | 仓库关键字 |
cnb_list_sub_groups
获取当前用户在CNB平台里指定组织下拥有权限的子组织列表
| Parameter | Type | Description |
|---|---|---|
group * | string | 组织名称 |
access | number | 权限等级 |
page | number | 第几页,从1开始 |
page_size | number | 每页多少条数据 |
cnb_get_group
获取CNB平台指定组织的信息
| Parameter | Type | Description |
|---|---|---|
group * | string | 组织路径 |
cnb_create_group
在CNB平台创建一个新组织
| Parameter | Type | Description |
|---|---|---|
path * | string | 组织路径 |
bind_domain | string | 根组织绑定的域名 |
description | string | 组织描述 |
remark | string | 仓库备注 |
cnb_list_repositories
获取当前用户在CNB平台里拥有权限的仓库列表
| Parameter | Type | Description |
|---|---|---|
remote_url * | string | 远程仓库URL,需要先执行`git remote get-url origin`命令获取,获取不到传空字符串 |
desc | boolean | 是否开启倒叙排序,默认值是false |
filter_type | string | 仓库类型,为空表示所有仓库类型,默认值为空 |
order_by | string | 排序类型,默认值是last_updated_at |
page | number | 第几页,从1开始,默认值是1 |
page_size | number | 每页多少条数据,默认值为10 |
role | string | 最小仓库权限,当用户未指定角色时,需要主动传入Reporter |
search | string | 查询关键字 |
cnb_list_group_repositories
获取当前用户在CNB平台里指定组织下拥有权限的仓库列表
| Parameter | Type | Description |
|---|---|---|
group * | string | 组织名称 |
desc | boolean | 是否开启倒叙排序,默认值是false |
descendant | string | 查全部、直接属于当前组织的仓库、子组织的仓库 |
filter_type | string | 仓库类型 |
order_by | string | 排序类型 |
page | number | 第几页,从1开始,默认值是1 |
page_size | number | 每页多少条数据,默认值为10 |
search | string | 仓库关键字 |
cnb_get_repository
获取CNB平台指定仓库的信息
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
cnb_create_repository
在CNB平台创建一个新仓库
| Parameter | Type | Description |
|---|---|---|
name * | string | 仓库名称 |
description | string | 仓库描述 |
group | string | 仓库所属分组 |
license | string | 仓库许可 |
visibility | string | 仓库可见性 |
cnb_get_current_repository
获取当前工作区对应的CNB平台仓库信息
| Parameter | Type | Description |
|---|---|---|
remote_url * | string | 远程仓库URL, 需要先执行`git remote get-url origin`命令获取 |
cnb_list_issues
获取CNB平台指定仓库的ISSUE列表
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
assignees | string | Issue 处理人,example: 张三,李四,-; - means assign to nobody |
authors | string | Issue 作者的名字, example: 张三,李四 |
keyword | string | Issue 关键字 |
labels | string | Issue 标签 |
order_by | string | Issue 排序顺序.example: created_at, -updated_at, reference_count。‘-’ prefix means descending order |
page | number | 第几页,从1开始 |
page_size | number | 每页多少条数据,默认是30 |
priority | string | Issue 优先级,example: p0,p1,p2,p3 |
state | string | Issue 状态 |
updated_time_begin | string | Issue 更新时间的范围,开始时间点,example: 2022-01-31 |
updated_time_end | string | Issue 更新时间的范围,结束时间点,example: 2022-01-31 |
cnb_get_issue
获取CNB平台指定ISSUE的信息
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
cnb_create_issue
在CNB平台指定的仓库创建一条新ISSUE。如需添加标签,另外调用cnb_add_issue_labels工具
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
title * | string | Issue 标题 |
assignees | array | 一个或多个 Issue 处理人的用户名 |
body | string | Issue 描述 |
end_date | string | Issue 截止时间,格式为 YYYY-MM-DD |
labels | array | 一个或多个 Issue 标签 |
priority | string | Issue 优先级 |
start_date | string | Issue 起始时间,格式为 YYYY-MM-DD |
cnb_update_issue
更新CNB平台指定ISSUE的信息。如需更新标签,另外调用cnb_set_issue_labels工具
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
body | string | Issue 描述 |
end_date | string | Issue 截止时间,格式为 YYYY-MM-DD |
priority | string | Issue 优先级 |
start_date | string | Issue 起始时间,格式为 YYYY-MM-DD |
state | string | Issue 状态 |
state_reason | string | Issue 状态原因 |
title | string | Issue 标题 |
cnb_list_issue_comments
获取CNB平台指定ISSUE的评论列表
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
page | number | 第几页,从1开始 |
page_size | number | 每页多少条数据,默认是30 |
cnb_create_issue_comment
在CNB平台指定的ISSUE创建一条新评论
| Parameter | Type | Description |
|---|---|---|
body * | string | 评论内容 |
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
cnb_update_issue_comment
更新CNB平台指定ISSUE评论的内容
| Parameter | Type | Description |
|---|---|---|
body * | string | 评论内容 |
commentId * | string | 评论 ID |
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
cnb_list_issue_labels
获取CNB平台指定ISSUE的标签列表
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
cnb_add_issue_labels
为CNB平台指定的ISSUE添加一个或多个标签
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
labels * | array | 要添加的标签列表,每个标签需要从仓库标签列表中选择 |
repo * | string | 仓库路径 |
cnb_set_issue_labels
变更CNB平台指定ISSUE的标签
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
labels * | array | 新的标签列表(将替换所有现有标签),每个标签需要从仓库标签列表中选择 |
repo * | string | 仓库路径 |
cnb_clear_issue_labels
清除CNB平台指定ISSUE的标签
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
repo * | string | 仓库路径 |
cnb_remove_issue_label
移除CNB平台指定ISSUE的指定标签
| Parameter | Type | Description |
|---|---|---|
issueId * | number | Issue ID |
labelName * | string | 要删除的标签名称 |
repo * | string | 仓库路径 |
cnb_list_workspaces
获取当前用户在CNB平台的云原生开发环境列表
| Parameter | Type | Description |
|---|---|---|
branch | string | 分支名,例如:main |
end | string | 查询开始时间,格式:YYYY-MM-DD HH:mm:ssZZ,例如:2024-12-01 00:00:00+0800 |
page | number | 分页页码,从 1 开始,默认为 1 |
page_size | number | 每页条数,默认为 20,最高 100 |
slug | string | 仓库路径,例如:groupname/reponame |
start | string | 查询结束时间,格式:YYYY-MM-DD HH:mm:ssZZ,例如:2024-12-01 00:00:00+0800 |
status | string | 开发环境状态,running: 开发环境已启动,closed:开发环境已关闭,默认为所有状态 |
cnb_delete_workspace
在CNB平台删除指定的云原生开发环境
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | 开发环境 ID |
cnb_start_workspace
在CNB平台启动指定仓库的云原生开发环境
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径,格式为 {group}/{repo} |
branch | string | 分支名或 tag 名,例如:main 或 v1.0.0 |
ref | string | Git ref,例如,refs/heads/main 或 refs/tags/v1.0.0。不传 ref 时默认基于分支启动 |
cnb_list_pulls
获取CNB平台指定仓库的合并请求列表
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径,格式为 {group}/{repo} |
direction | string | 排序方向 |
page | number | 页码 |
per_page | number | 每页数量 |
sort | string | 排序字段 |
state | string | Pull Request状态 |
cnb_get_pull
获取CNB平台指定合并请求的信息
| Parameter | Type | Description |
|---|---|---|
number * | number | Pull Request编号 |
repo * | string | 仓库路径,格式为 {group}/{repo} |
cnb_create_pull
在CNB平台指定的仓库创建一个新合并请求
| Parameter | Type | Description |
|---|---|---|
base * | string | 目标仓库目标分支 |
head * | string | 来源仓库分支 |
repo * | string | 目标仓库路径,格式为 {group}/{repo} |
title * | string | 标题 |
body | string | 描述 |
head_repo | string | 来源仓库路径,格式为 {group}/{repo},不填则为目标仓库 |
cnb_update_pull
更新CNB平台指定合并请求的信息
| Parameter | Type | Description |
|---|---|---|
number * | number | Pull Request编号 |
repo * | string | 仓库路径,格式为 {group}/{repo} |
body | string | 描述 |
state | string | 状态 |
title | string | 标题 |
cnb_merge_pull
合并CNB平台指定的合并请求
| Parameter | Type | Description |
|---|---|---|
commit_title * | string | 合并提交标题 |
number * | number | Pull Request编号 |
repo * | string | 仓库路径,格式为 {group}/{repo} |
commit_message | string | 合并提交信息 |
merge_style | string | 合并方式 |
cnb_list_pull_comments
获取CNB平台指定合并请求的评论列表
| Parameter | Type | Description |
|---|---|---|
number * | number | Pull Request编号 |
repo * | string | 仓库路径,格式为 {group}/{repo} |
page | number | 页码 |
per_page | number | 每页数量 |
cnb_create_pull_comment
在CNB平台指定的合并请求创建一条新评论
| Parameter | Type | Description |
|---|---|---|
body * | string | 评论内容 |
number * | number | Pull Request编号 |
repo * | string | 仓库路径,格式为 {group}/{repo} |
cnb_buildLogsDelete
删除流水线或云原生构建日志内容
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
sn * | string | 构建 ID |
cnb_buildRunnerDownloadLog
流水线或云原生构建runner日志下载
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | 流水线 ID |
repo * | string | 仓库路径 |
cnb_getBuildLogs
查询流水线或云原生构建构建列表
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
createTime | string | 构建开始时间,格式为 YYYY-MM-DD |
endTime | string | 构建结束时间,格式为 YYYY-MM-DD |
event | string | 触发事件 |
page | number | 页码 |
pagesize | number | 每页数据的条数 |
sha | string | Commit ID |
sn | string | 构建 ID |
sourceRef | string | 源分支名 |
status | string | 构建状态 |
targetRef | string | 目标分支名 |
userId | string | 用户 ID |
userName | string | 用户名 |
cnb_getBuildStage
查询流水线或云原生构建Stage详情
| Parameter | Type | Description |
|---|---|---|
pipelineId * | string | 流水线 ID,一个构建可以包含多条流水线。格式 {sn}-001, {sn}-002 等等,001 为起始,加一递增 |
repo * | string | 仓库路径 |
sn * | string | 构建序列号或 ID |
stageId * | string | 流水线阶段 ID,一条流水线可以包含多个阶段。格式 prepare, beforeEnd, end, stage-0, stage-1 等等,0 为起始,加一递增 |
cnb_getBuildStatus
查询流水线或云原生构建构建状态
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
sn * | string | 构建 ID |
cnb_startBuild
开始一个构建
| Parameter | Type | Description |
|---|---|---|
branch * | string | 分支名 |
event * | string | 触发事件 |
repo * | string | 仓库路径 |
config | string | 配置 |
env | object | 环境变量 |
sha | string | Commit ID |
sync | string | 同步模式,等待请求完成 |
tag | string | git tag |
cnb_stopBuild
停止一个构建
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
sn * | string | 构建 ID |
cnb_getKnowledgeBaseInfo
获取知识库信息
| Parameter | Type | Description |
|---|---|---|
repo * | string | 仓库路径 |
cnb_queryKnowledgeBase
查询知识库
| Parameter | Type | Description |
|---|---|---|
query * | string | 要查询的关键词或问题 |
repo * | string | 仓库路径 |
metadata_filtering_conditions | object | 元数据过滤条件 |
score_threshold | number | 匹配相关性分数阈值 |
top_k | number | 返回结果的最大数量 |