MCP Command Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

MCP 命令服务器

一个安全的模型上下文协议 (MCP) 服务器,用于通过 Claude 等 LLM 应用程序执行系统命令。

快速入门

  1. 安装软件包:
uv pip install mcp-command-server
  1. 配置允许的命令:
export ALLOWED_COMMANDS="ls,pwd,echo"
  1. 添加到 Claude Desktop 配置:
{ "mcpServers": { "command-server": { "command": "uv", "args": ["run", "python", "-m", "mcp_command_server"], "env": { "ALLOWED_COMMANDS": "ls,pwd,echo" } } } }

特征

  • 🔒 使用白名单确保命令执行安全
  • ✅ 所有命令均由用户确认
  • 📝 全面的审计日志
  • 🔍 输入验证和清理
  • 🤖 Claude 桌面集成

文档

有关完整文档,请参阅docs/目录:

发展

设置

# Clone repository git clone https://github.com/yourusername/mcp-command-server.git cd mcp-command-server # Create virtual environment uv venv source .venv/bin/activate # On Unix/macOS .venv\Scripts\activate # On Windows # Install development dependencies uv pip install -e ".[dev]"

测试

# Run all tests pytest # Run specific test file pytest tests/unit/security/test_validator.py # Run with coverage pytest --cov=mcp_command_server

贡献

  1. 分叉存储库
  2. 创建你的功能分支
  3. 运行测试和 linting
  4. 提交拉取请求

执照

MIT 许可证 - 详情请参阅许可证

-
security - not tested
F
license - not found
-
quality - not tested

安全服务器允许 Claude 等 LLM 应用程序执行具有用户确认和全面安全功能的白名单系统命令。

  1. Quick Start
    1. Features
      1. Documentation
        1. Development
          1. Setup
          2. Testing
          3. Contributing
        2. License
          ID: q5rkxotu8n