可配置命令行工具

一个可动态配置命令行工具的多功能控制面板,支持通过YAML文件定义工具和参数模板。

  • by jordyv
  • Go
  • 本地部署
  • 更新于
在 GitHub 查看 jordyv/configurable-mcp

使用说明

可配置的MCP(微控制器产品/模块/组件等,具体含义根据上下文确定)

安装

go install github.com/jordyv/configurable-mcp/cmd/configurable-mcp@latest

配置

工具

你可以在(系统/界面中)动态地为MCP定义工具 config.yaml 文件。 例如:

tools:
  - name: get_my_username
    description: Get the username of the current logged in user
    command: whoami

  - name: read_file
    description: Read the content of a file in a folder
    command: cat
    arguments: [ "{{.file}}" ]
    properties:
      folder:
        type: string
      file:
        type: string
    required_properties: [ folder, file ]

参数支持Golang的模板语法,并且模板变量会被属性的值所替换。 所以 {{.file}} 在上面的例子中,将被替换为 file 模型传递给工具的参数。