article
README
🚀 运行命令服务器
运行命令服务器是一个 MCP 服务器,可在本地操作系统上运行命令。该服务器的代码依据官方 MCP 指南编写,相关指南可参考:MCP 快速开始。
✨ 主要特性
运行命令工具
- 能够在本地操作系统上运行指定命令。
- 输入为
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": "<本地 NODE 路径>",
"args": [
"<GIT 克隆文件夹路径>/server-run-commands/build"
]
}
}
}
微信扫一扫