服务器运行命令
MCP服务器在本地操作系统上运行命令
根据MCP官方指南编写的代码:
- https://modelcontextprotocol.io/quickstart
工具
- 运行命令
- 在本地操作系统上运行命令 - 输入: command (字符串) - 将进程退出代码和stdout传递回LLM
安装
git clone https://github.com/anton-107/server-run-commands.gitcd server-run-commandsnpm installnpm run build
使用Claude Desktop
将此添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"run-commands": {
"command": "
",
"args": [
"
/server-run-commands/build"
]
}
}
}