Skip to main content
Glama
Andrew-Beniash

MCP Command Server

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" } } } }

Related MCP server: Shell-MCP

特征

  • 🔒 使用白名单确保命令执行安全

  • ✅ 所有命令均由用户确认

  • 📝 全面的审计日志

  • 🔍 输入验证和清理

  • 🤖 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Andrew-Beniash/mcp-command-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server