Skip to main content
Glama

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

特征

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

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

  • 📝 全面的审计日志

  • 🔍 输入验证和清理

  • 🤖 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
-
license - not tested
-
quality - not tested

local-only server

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

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

  1. 快速入门
    1. 特征
      1. 文档
        1. 发展
          1. 设置
          2. 测试
          3. 贡献
        2. 执照

          Related MCP Servers

          • A
            security
            -
            license
            A
            quality
            A secure server for executing terminal commands within predefined paths, allowing safe interaction by Large Language Models with operating system environments.
            Last updated -
            1
            78
            11
            MIT License
            • Apple
            • Linux
          • A
            security
            -
            license
            A
            quality
            A secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.
            Last updated -
            20
            39
            4
            MIT License
          • -
            security
            -
            license
            -
            quality
            An extensible Message Communication Protocol server that provides secure code execution capabilities in isolated sandbox environments, compatible with Claude for Desktop and other MCP clients.
            Last updated -
            12
          • -
            security
            -
            license
            -
            quality
            A TypeScript application that allows Claude to safely execute bash commands with security safeguards including whitelisted commands, directories, and comprehensive logging.

          View all related MCP servers

          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