Skip to content

MCP / Skill / Plugin 命令

MCP 管理

MCP(Model Context Protocol)服务为 Agent 提供外部工具和数据源能力。

mcp:list

列出所有 MCP 服务。

参数:

参数类型必填说明
pagenumber页码
pageSizenumber每页条数
querystring搜索关键词
enabledboolean按启用状态筛选

请求示例:

bash
workova mcp:list

返回示例:

json
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "mcp_abc",
        "name": "github-tools",
        "transport": "stdio",
        "enabled": true
      },
      {
        "id": "mcp_def",
        "name": "search-api",
        "transport": "streamable_http",
        "enabled": false
      }
    ]
  }
}

mcp:get

获取 MCP 服务详情。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:get --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "server": {
      "id": "mcp_abc",
      "name": "github-tools",
      "transport": "stdio",
      "command": "npx @mcp/github-tools",
      "url": null,
      "enabled": true
    }
  }
}

mcp:create

创建 MCP 服务。

参数:

参数类型必填说明
namestring服务名称
transportstring传输方式,可选 stdio / streamable_http
commandstring启动命令,transport 为 stdio 时必填
argsstring[]命令参数列表
urlstring服务 URL,transport 为 streamable_http 时必填
headersobjectHTTP 请求头
envobject环境变量
enabledboolean是否启用,默认 true
tagsstring[]标签列表

请求示例:

bash
workova mcp:create --input '{"name": "github-tools", "transport": "stdio", "command": "npx @mcp/github-tools"}'

返回示例:

json
{
  "success": true,
  "data": {
    "server": {
      "id": "mcp_abc",
      "name": "github-tools",
      "transport": "stdio",
      "command": "npx @mcp/github-tools",
      "enabled": true
    }
  }
}

mcp:update

更新 MCP 服务。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID
namestring服务名称
transportstring传输方式
commandstring启动命令
urlstring服务 URL
enabledboolean是否启用

请求示例:

bash
workova mcp:update --input '{"serverId": "mcp_abc", "name": "github-tools-v2"}'

返回示例:

json
{
  "success": true,
  "data": {
    "server": {
      "id": "mcp_abc",
      "name": "github-tools-v2",
      "transport": "stdio",
      "enabled": true
    }
  }
}

mcp:delete

删除 MCP 服务。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:delete --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "serverId": "mcp_abc",
    "deleted": true
  }
}

mcp:test

测试 MCP 服务连通性。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:test --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "serverId": "mcp_abc",
    "ok": true,
    "message": null
  }
}

mcp:connect

连接 MCP 服务(启动进程)。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:connect --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "serverId": "mcp_abc",
    "connected": true
  }
}

TIP

mcp:connect 通过 bridge 在桌面端 runtime 中启动 MCP 进程。bridge 不可用时此命令不可执行。

mcp:disconnect

断开 MCP 服务。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:disconnect --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "serverId": "mcp_abc",
    "disconnected": true
  }
}

mcp:tools:list

列出 MCP 提供的工具。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID

请求示例:

bash
workova mcp:tools:list --input '{"serverId": "mcp_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "items": [
      {
        "name": "search_repos",
        "description": "Search GitHub repositories",
        "inputSchema": {
          "type": "object",
          "properties": { "query": { "type": "string" } }
        }
      },
      {
        "name": "get_file",
        "description": "Get file content from a repo",
        "inputSchema": {
          "type": "object",
          "properties": {
            "repo": { "type": "string" },
            "path": { "type": "string" }
          }
        }
      }
    ]
  }
}

mcp:tools:call

调用 MCP 工具。

参数:

参数类型必填说明
serverIdstringMCP 服务 ID
toolNamestring工具名称
argumentsobject工具调用参数

请求示例:

bash
workova mcp:tools:call --input '{"serverId": "mcp_abc", "toolName": "search_repos", "arguments": {"query": "workova"}}'

返回示例:

json
{
  "success": true,
  "data": {
    "result": {
      "repos": [{ "name": "workova/core", "stars": 1200 }]
    }
  }
}

Skill 管理

Skill 是可复用的能力单元,可绑定到 Agent 以增强其功能。

skill:list

列出所有 Skill。

参数:

参数类型必填说明
pagenumber页码
pageSizenumber每页条数
querystring搜索关键词
sourcestring来源筛选,可选 local-path / bundle / marketplace / builtin
enabledboolean按启用状态筛选

请求示例:

bash
workova skill:list

返回示例:

json
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "skill_abc",
        "name": "web-scraper",
        "source": "registry",
        "enabled": true
      },
      {
        "id": "skill_def",
        "name": "code-analyzer",
        "source": "local",
        "enabled": true
      }
    ]
  }
}

skill:get

获取 Skill 详情。

参数:

参数类型必填说明
skillIdstringSkill ID

请求示例:

bash
workova skill:get --input '{"skillId": "skill_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "skill": {
      "id": "skill_abc",
      "name": "web-scraper",
      "source": "registry",
      "enabled": true
    }
  }
}

skill:validate

校验 Skill 定义是否合法。

参数:

参数类型必填说明
sourcePathstringSkill 定义文件路径
strictboolean是否严格模式,默认 true

请求示例:

bash
workova skill:validate --input '{"sourcePath": "./my-skill.json"}'

返回示例:

json
{
  "success": true,
  "data": {
    "valid": true,
    "issues": [],
    "warnings": []
  }
}

skill:install

从注册表安装 Skill。

参数:

参数类型必填说明
skillSourcestringSkill 来源标识(如 web-scraper@1.0.0

请求示例:

bash
workova skill:install --input '{"skillSource": "web-scraper@1.0.0"}'

返回示例:

json
{
  "success": true,
  "data": {
    "skill": {
      "id": "skill_abc",
      "name": "web-scraper",
      "source": "registry",
      "enabled": true
    }
  }
}

skill:create

创建自定义 Skill。

参数:

参数类型必填说明
namestringSkill 名称
descriptionstringSkill 描述
contentstringSkill 内容

请求示例:

bash
workova skill:create --input '{"name": "custom-linter", "description": "Custom linting rules", "content": "..."}'

返回示例:

json
{
  "success": true,
  "data": {
    "skill": {
      "id": "skill_ghi",
      "name": "custom-linter",
      "source": "local",
      "enabled": true
    }
  }
}

skill:update

更新 Skill。

参数:

参数类型必填说明
skillIdstringSkill ID
namestringSkill 名称
descriptionstringSkill 描述
versionstring版本号
enabledboolean是否启用
tagsstring[]标签列表

请求示例:

bash
workova skill:update --input '{"skillId": "skill_abc", "description": "Updated description"}'

返回示例:

json
{
  "success": true,
  "data": {
    "skill": {
      "id": "skill_abc",
      "name": "web-scraper",
      "source": "registry",
      "enabled": true
    }
  }
}

skill:delete

删除 Skill。

参数:

参数类型必填说明
skillIdstringSkill ID
purgeboolean是否彻底清除,默认 false

请求示例:

bash
workova skill:delete --input '{"skillId": "skill_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "skillId": "skill_abc",
    "deleted": true
  }
}

Plugin 管理

Plugin 是扩展 CLI 和桌面端功能的模块,可提供额外命令和能力。

plugin:list

列出已安装的 Plugin。

参数:

参数类型必填说明
kindstring类型筛选,可选 tool / channel / skill
sourcestring来源筛选,可选 workspace / global
searchstring搜索关键词

请求示例:

bash
workova plugin:list --input '{"kind": "tool"}'

返回示例:

json
{
  "success": true,
  "data": {
    "plugins": [
      {
        "pluginId": "plugin_abc",
        "name": "github-integration",
        "kind": "tool",
        "enabled": true
      },
      {
        "pluginId": "plugin_def",
        "name": "slack-notifier",
        "kind": "tool",
        "enabled": false
      }
    ],
    "count": 2
  }
}

plugin:info

查看 Plugin 详情。

参数:

参数类型必填说明
pluginIdstringPlugin ID

请求示例:

bash
workova plugin:info --input '{"pluginId": "plugin_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "plugin": {
      "manifest": {
        "name": "github-integration",
        "version": "1.2.0",
        "description": "GitHub integration for Workova"
      },
      "commands": ["gh:pr-list", "gh:issue-create"]
    }
  }
}

plugin:install

安装 Plugin。

参数:

参数类型必填说明
sourcestring来源,目录路径或 manifest 路径
targetstring安装目标,可选 workspace / global,默认 workspace
enabledboolean是否启用,默认 true

请求示例:

bash
workova plugin:install --input '{"source": "github-integration", "target": "workspace"}'

返回示例:

json
{
  "success": true,
  "data": {
    "plugin": {
      "pluginId": "plugin_abc",
      "name": "github-integration",
      "kind": "tool",
      "enabled": true
    }
  }
}

plugin:uninstall

卸载 Plugin。

参数:

参数类型必填说明
pluginIdstringPlugin ID

请求示例:

bash
workova plugin:uninstall --input '{"pluginId": "plugin_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "pluginId": "plugin_abc",
    "removed": true
  }
}

plugin:enable

启用 Plugin。

参数:

参数类型必填说明
pluginIdstringPlugin ID

请求示例:

bash
workova plugin:enable --input '{"pluginId": "plugin_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "plugin": {
      "pluginId": "plugin_abc",
      "name": "github-integration",
      "enabled": true
    }
  }
}

plugin:disable

禁用 Plugin。

参数:

参数类型必填说明
pluginIdstringPlugin ID

请求示例:

bash
workova plugin:disable --input '{"pluginId": "plugin_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "plugin": {
      "pluginId": "plugin_abc",
      "name": "github-integration",
      "enabled": false
    }
  }
}

plugin:commands

查看 Plugin 提供的命令。

参数:

参数类型必填说明
pluginIdstringPlugin ID

请求示例:

bash
workova plugin:commands --input '{"pluginId": "plugin_abc"}'

返回示例:

json
{
  "success": true,
  "data": {
    "commands": ["gh:pr-list", "gh:issue-create", "gh:repo-search"],
    "count": 3
  }
}

plugin:validate

校验 Plugin manifest 完整性。

参数:

参数类型必填说明
manifestPathstringmanifest 文件路径

请求示例:

bash
workova plugin:validate --input '{"manifestPath": "./plugin-manifest.json"}'

返回示例:

json
{
  "success": true,
  "data": {
    "valid": true,
    "manifest": {
      "name": "github-integration",
      "version": "1.2.0"
    }
  }
}

WARNING

Plugin 的安装和启用需要重启 CLI 或桌面端才能生效。

Workova 官方文档