Claude桌面命令执行工具
为Claude桌面提供安全的本地Shell命令执行服务。
快速入门
概述
Command Execution MCP服务器允许Claude安全地在本地系统上执行Shell命令。
安装
- 确保安装了Node.js(v16+)、Claude桌面和npm。
- 克隆仓库并安装依赖: cd /path/to/command-execution-tool npm install @modelcontextprotocol/sdk
- 配置Claude桌面,在配置文件中添加以下内容: { "mcpServers": { "command-execution": { "command": "node", "args": ["/full/path/to/command-execution-tool.js"] } } }
使用
- 示例:通过Claude执行
ls -la
命令: execute-command with command="ls -la" and workingDirectory="/Users/username"
注意事项
- 不支持交互式命令。
- 最长运行时间为30秒,输出限制为1MB。
- 避免运行危险命令如
rm -rf
。