自定义模式编辑器服务

一个用于编辑Roo Code自定义模式文件的MCP服务器,提供列表、创建、获取和更新自定义模式的功能。

  • by raymondlowe
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 raymondlowe/roo-code-custom-mode-editor-mcp-server

使用说明

roo代码自定义模式编辑器mcp服务器

知道如何编辑Roo Code自定义模式文件的MCP服务器

避免了必须覆盖 .roomodes file使用file写入或编辑具有不可靠差异的json。

MCP服务器将工具暴露给:

  • 列出所有自定义模式
  • 创建新的自定义模式
  • 获取自定义模式的字段(“slug”、“name”、“roleDefinition”、“customInstructions”、“groups”)
  • 放置并覆盖自定义模式的任何一个或多个字段。

字段包括:

  • slug:短串
  • 名称:短字符串
  • 角色定义:长字符串
  • customInstructions:长字符串
  • groups:短字符串数组

用法

此服务器位于https://github.com/raymondlowe/roo-code-custom-mode-editor-mcp-server并且可以使用以下命令运行:

npx https://github.com/raymondlowe/roo-code-custom-mode-editor-mcp-server

MCP配置

要与Roo Code一起使用,请将服务器配置添加到MCP设置文件中:

{
  "mcpServers": {
    "roo-code-custom-mode-editor": {
      "command": "node",
      "args": [
        "/path/to/roo-code-custom-mode-editor-mcp-server/build/index.js"
      ],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于自动重建的开发:

npm run watch

调试

由于MCP服务器通过stdio进行通信,调试可能具有挑战性。我们建议使用 MCP检查员,可作为包脚本使用:

npm run inspector

检查器将提供一个URL,用于访问浏览器中的调试工具。

工具

list_custom_modes

列出中的所有自定义模式 .roomodes 文件。

create_custom_mode

使用指定字段创建新的自定义模式。

参数:

  • slug:字符串
  • 名称:字符串
  • 角色定义:字符串
  • customInstructions:字符串
  • 组:字符串[]

get_custom_mode_fields

获取自定义模式的字段。

参数:

  • slug:字符串

put_custom_mode_fields

更新自定义模式的一个或多个字段。

参数:

  • slug:字符串
  • fields:包含以下任何字段的对象:
    • 名称:字符串
    • 角色定义:字符串
    • customInstructions:字符串
    • 组:字符串[]