MCP命令服务器

MCP命令服务器

提供安全的远程命令执行接口,支持容器化部署和模式验证。

快速入门

安装

使用 Docker(推荐)

  1. 克隆仓库:git clone https://github.com/copyleftdev/mcp_command_server.git
  2. 启动服务:docker-compose up -d
  3. 服务将在 http://localhost:3030 可用。

从源码构建

  1. 确保安装了 Rust(1.74+ 推荐)。
  2. 克隆并构建项目:cargo build --release
  3. 运行服务:./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