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.
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Jupyter Notebook MCP Server
Interact with Jupyter notebooks, allowing for code execution, cell manipulation, and notebook management.
MCP Shell
Execute secure shell commands from AI assistants and other MCP clients, with configurable security settings.
Genetic Algorithm MCP
A server that uses a Genetic Algorithm to solve maximization problems.
Postman API
An MCP server for interacting with the Postman API, requiring an API key.
Remote MCP Server on Cloudflare
A template for deploying a remote MCP server on Cloudflare Workers, allowing for custom tool integration.
MCP迭代管理工具
An iteration management tool to automate the collection and submission of iteration information to a CodeReview system.
MCP Neurolora
An intelligent server for code analysis, collection, and documentation generation using the OpenAI API.
MCP Tools
Provides file system and command execution tools for LLM clients like Claude Desktop.
scan-mcp
Minimal MCP server for scanner capture (ADF/duplex/page-size), batching, and multipage assembly
Frank Bria MCP Server
A remote MCP server deployable on Cloudflare Workers without authentication.