本地命令执行服务

MCP服务器用于在本地操作系统上运行命令,并将执行结果返回给LLM。

  • by anton-107
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 anton-107/server-run-commands

使用说明

服务器运行命令

MCP服务器在本地操作系统上运行命令

根据MCP官方指南编写的代码:

  • https://modelcontextprotocol.io/quickstart

工具

  • 运行命令
    • 在本地操作系统上运行命令
    • 输入: command (字符串)
    • 将进程退出代码和stdout传递回LLM

安装

  • git clone https://github.com/anton-107/server-run-commands.git
  • cd server-run-commands
  • npm install
  • npm run build

使用Claude Desktop

将此添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "run-commands": {
      "command": "<PATH TO LOCAL NODE>",
      "args": [
        "<PATH TO GIT CLONE FOLDER>/server-run-commands/build"
      ]
    }
  }
}