MCP Command Server
A secure server for executing pre-approved system commands via an environment variable.
MCP Command Server
A secure Model Context Protocol (MCP) server for executing system commands through LLM applications like Claude.
Quick Start
- Install the package:
uv pip install mcp-command-server
- Configure allowed commands:
export ALLOWED_COMMANDS="ls,pwd,echo"
- Add to Claude Desktop configuration:
{
"mcpServers": {
"command-server": {
"command": "uv",
"args": ["run", "python", "-m", "mcp_command_server"],
"env": {
"ALLOWED_COMMANDS": "ls,pwd,echo"
}
}
}
}
Features
- 🔒 Secure command execution with whitelist
- ✅ User confirmation for all commands
- 📝 Comprehensive audit logging
- 🔍 Input validation and sanitization
- 🤖 Claude Desktop integration
Documentation
For complete documentation, see the docs/ directory:
Development
Setup
# 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]"
Testing
# Run all tests
pytest
# Run specific test file
pytest tests/unit/security/test_validator.py
# Run with coverage
pytest --cov=mcp_command_server
Contributing
- Fork the repository
- Create your feature branch
- Run tests and linting
- Submit a pull request
License
MIT License - see LICENSE for details.
相關伺服器
Alpha Vantage MCP Server
贊助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Feishu OAuth MCP Server
An MCP server with built-in Feishu OAuth authentication, deployable on Cloudflare Workers.
Photon
A TypeScript framework that turns a single class into an MCP server, CLI tool, and web dashboard with a marketplace of 35 ready-made photons.
NeuroDev MCP Server
A powerful Model Context Protocol (MCP) server that supercharges your Python development workflow with AI-powered code review, intelligent test generation, and comprehensive test execution.
nUR MCP Server
An intelligent robot control middleware for natural language interaction with industrial robots, powered by LLMs. It integrates with Universal Robots and supports real-time, multi-robot control.
Locust MCP Server
An MCP server for running Locust load tests. Configure test parameters like host, users, and spawn rate via environment variables.
CLI MCP Server
A secure MCP server for executing controlled command-line operations with comprehensive security features.
Remote MCP Server (Authless)
A remote MCP server deployable on Cloudflare Workers without authentication.
Zen MCP
Orchestrates multiple AI models like Claude and Gemini for enhanced code analysis, problem-solving, and collaborative development.
npm Registry MCP
Search packages, check versions, audit vulnerabilities and compare libraries directly from the npm registry (no API key required)
Alpaca MCP Server
Interact with Alpaca's Trading API for stocks, options, portfolios, and real-time market data using LLMs.