MCP命令服务器
提供安全的远程命令执行接口,支持容器化部署和模式验证。
快速入门
安装
使用 Docker(推荐)
- 克隆仓库:
git clone https://github.com/copyleftdev/mcp_command_server.git
- 启动服务:
docker-compose up -d
- 服务将在
http://localhost:3030
可用。
从源码构建
- 确保安装了 Rust(1.74+ 推荐)。
- 克隆并构建项目:
cargo build --release
- 运行服务:
./target/release/mcp_command_server
使用
- 执行命令: curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","id": 1,"method": "command/get","params": {"command": "echo "Hello World""}}' http://localhost:3030/
- 查看文档:
curl http://localhost:3030/context