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-serverMCP配置
要与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:字符串 - 组:字符串\[\]
