mcp-kubevela
v0.6.0MCP Server for KubeVela application delivery platform (VelaUX REST API)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
vela_list_applications
列出 KubeVela 应用,支持按项目/环境/交付目标/关键字过滤。 对应 API:GET /api/v1/applications
| Parameter | Type | Description |
|---|---|---|
env | 按环境过滤 | |
project_name | 按项目过滤 | |
query | 按名称/别名/描述模糊过滤 | |
response_format | 输出格式:markdown 或 json | |
target_name | 按交付目标过滤 |
vela_get_application
查看应用详情(基础信息、策略、环境绑定、资源统计)。 对应 API:GET /api/v1/applications/{appName}
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
response_format |
vela_get_app_status
查看应用运行状态(全部环境概览或指定环境详情)。 对应 API:GET /api/v1/applications/{app}/status GET /api/v1/applications/{app}/envs/{env}/status
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
env | 环境名。不填返回所有环境的状态概览 | |
response_format |
vela_list_components
查看应用的组件列表;指定 component 时返回组件详情(properties、traits、definition)。 对应 API:GET /api/v1/applications/{app}/components[/{comp}]
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
component | 组件名。填写后返回该组件详情(含 properties 与 traits) | |
env | 环境名(仅列表时生效) | |
response_format |
vela_list_revisions
查看应用版本(revision)历史,可用于回滚前确认目标版本。 对应 API:GET /api/v1/applications/{app}/revisions
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
env | 按环境过滤 | |
page | integer | 页码(从 0 开始) |
page_size | integer | 分页大小 |
response_format | ||
status | 按状态过滤,如 complete/failed/terminated |
vela_list_deploy_records
查看应用在指定环境的部署记录。 对应 API:GET /api/v1/applications/{app}/envs/{env}/records
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
env * | string | 环境名 |
page | integer | |
page_size | integer | |
response_format |
vela_list_workflow_records
三合一查询:不填 workflow_name 列出工作流;填 workflow_name 列出执行记录; 再填 record 返回该次执行详情(含各步骤状态,可据此取日志)。 对应 API:GET /api/v1/applications/{app}/workflows[/{wf}/records[/{record}]]
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
page | integer | |
page_size | integer | |
record | 记录名。填写后返回该次执行的详情(含步骤状态) | |
response_format | ||
workflow_name | 工作流名(形如 workflow-<env>)。不填则返回该应用的工作流列表 |
vela_get_workflow_logs
查看工作流执行记录中某个步骤的日志(step 必填,步骤名可先查记录详情获取)。 对应 API:GET .../workflows/{wf}/records/{record}/logs?step=
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
record * | string | 工作流执行记录名 |
step * | string | 步骤名(必填,来自记录详情中的步骤列表) |
workflow_name * | string | 工作流名 |
vela_list_envs
列出环境(env)及其关联的交付目标。 对应 API:GET /api/v1/envs
| Parameter | Type | Description |
|---|---|---|
page | integer | |
page_size | integer | |
project_name | 按项目过滤 | |
response_format |
vela_list_targets
列出交付目标(target,即集群+命名空间组合)。 对应 API:GET /api/v1/targets
| Parameter | Type | Description |
|---|---|---|
page | integer | |
page_size | integer | |
project_name | 按项目过滤 | |
response_format |
vela_list_clusters
列出纳管集群;指定 cluster_name 时返回集群详情(含资源信息)。 对应 API:GET /api/v1/clusters[/{clusterName}]
| Parameter | Type | Description |
|---|---|---|
cluster_name | 集群名。填写后返回该集群详情 | |
page | integer | |
page_size | integer | |
query | 按名称模糊过滤(仅列表时生效) | |
response_format |
vela_list_addons
查看插件(addon)市场列表 / 已启用插件 / 单个插件详情与状态。 对应 API:GET /api/v1/addons[...]、GET /api/v1/enabled_addon
| Parameter | Type | Description |
|---|---|---|
addon_name | 插件名。填写后返回该插件详情与启用状态 | |
enabled_only | boolean | 仅列出已启用的插件 |
query | 按名称模糊过滤 | |
registry | 按插件仓库过滤 | |
response_format |
vela_list_definitions
查看组件/运维特征/策略/工作流步骤定义;指定 definition_name 返回参数 schema。 对应 API:GET /api/v1/definitions[/{name}]?type=
| Parameter | Type | Description |
|---|---|---|
def_type * | 定义类型:component / trait / policy / workflowstep | |
definition_name | 定义名。填写后返回详情(含参数 schema) | |
query_all | boolean | 是否包含隐藏定义(默认只列常用定义) |
response_format |
vela_velaql_query
执行 VelaQL 查询(Pod 列表、容器日志、资源拓扑等运行时数据)。 对应 API:GET /api/v1/query?velaql= 使用 view 枚举 + 结构化 params (见各 view 的 ParamSchema 描述), 由服务器拼装 velaql 字符串。错误以结构化文本返回, LLM 可直接 parse 修复后重试。
| Parameter | Type | Description |
|---|---|---|
params * | object | 视图参数 (JSON 对象)。键名见 view 描述: service-endpoints-view / application-resource-tree-view / service-applied-resources-view / component-pod-view -> {appNs, appName}; component-service… |
view * | 视图。必须是受支持 view 之一。 | |
cluster | 多集群覆盖; 应用层 view 忽略此参数 (应用通过 target 决定集群), pod-view / collect-logs 此参数为必填 (在 params 之外, 此处供未来 cluster 路由优化) | |
response_format |
vela_system_info
查看 VelaUX 平台系统信息:KubeVela 版本、登录方式、集群/应用统计、已启用插件等。 适合作为接入新环境后的连通性与版本自检。 对应 API:GET /api/v1/system_info
| Parameter | Type | Description |
|---|---|---|
response_format |
vela_compare_application
对比应用配置差异(诊断配置漂移)。三种模式: - 仅传 env:最新配置 vs 该环境集群运行态 - 传 revision + compare_with=running:指定版本 vs 集群运行态 - 传 revision + compare_with=latest:指定版本 vs 最新配置 对应 API:POST /api/v1/applications/{app}/compare
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
compare_with | string | revision 的对比对象:running(集群运行态)或 latest(最新配置) |
env | 环境名。不传 revision 时必填:对比最新配置与该环境集群运行态 | |
response_format | ||
revision | 版本号。传入后以该版本为基准做对比 |
vela_get_application_manifest
导出应用的 Application CR YAML 清单(GitOps 迁移 / 备份 / 审计用)。 source=latest 导出最新渲染配置;source=running 导出集群中实际运行的 CR。 基于 compare 接口的 YAML 字段实现。 对应 API:POST /api/v1/applications/{app}/compare
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
env * | string | 环境名 |
source | string | 导出来源:latest(最新渲染配置)或 running(集群运行态 CR) |
vela_list_triggers
列出应用的 webhook 触发器(含 token,可拼接触发地址)。 对应 API:GET /api/v1/applications/{app}/triggers
| Parameter | Type | Description |
|---|---|---|
app_name * | string | 应用名称 |
response_format |
vela_list_projects
列出平台中的项目(project),创建应用前用于确认可选项目。 对应 API:GET /api/v1/projects
| Parameter | Type | Description |
|---|---|---|
page | integer | 页码(从 0 开始) |
page_size | integer | 分页大小 |
response_format | 输出格式:markdown 或 json |
vela_list_project_targets
列出指定项目可用的交付目标(target),部署前确认目标合法性。 对应 API:GET /api/v1/projects/{projectName}/targets
| Parameter | Type | Description |
|---|---|---|
project_name * | string | 项目名称 |
response_format | 输出格式:markdown 或 json |
vela_list_project_users
列出指定项目的成员及其角色,用于排查权限(403)类问题。 对应 API:GET /api/v1/projects/{projectName}/users
| Parameter | Type | Description |
|---|---|---|
project_name * | string | 项目名称 |
response_format |