blazickjp_shell-mcp-server
0
Shell MCP Server provides secure shell command execution capabilities for AI applications, supporting multiple shells and enforcing execution safety through directory and shell validation. This tool is built for the Model Context Protocol and offers cross-platform support, including specific configuration options to enhance security.
🖥️ Shell MCP Server
✨ Features
- Secure Execution: Commands run only in specified directories
- Multiple Shells: Support for bash, sh, cmd, powershell
- Timeout Control: Automatic termination of long-running commands
- Cross-Platform: Works on both Unix and Windows systems
- Safe by Default: Built-in directory and shell validation
🚀 Quick Start
Installation
- Using pip
- Using uv (recommended)
🎮 Usage Examples
- Basic File Operations
- Project Management
- System Information
- File Processing
- Windows-Specific Examples
⚙️ Configuration
Configure behavior with command-line arguments:
Argument | Description |
---|---|
directories | 📁 List of allowed directories |
--shell name path | 🐚 Shell specifications (name and path) |
Environment variables:
COMMAND_TIMEOUT
: Max execution time in seconds (default: 30)
🛡️ Security Features
- Directory Isolation: Commands can only execute in specified directories
- Shell Control: Only configured shells are allowed
- Timeout Protection: All commands have a configurable timeout
- Path Validation: Working directory validation prevents traversal attacks
- Permission Isolation: Commands run with the same permissions as the server process
🛠️ Development
Set up your development environment:
- Create and activate virtual environment
- Install development dependencies
- Run tests
- Run tests with coverage
🤝 Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
📜 License
MIT License - see LICENSE for details.