mcp-shell-server
0
The MCP Shell Server is a secure system that allows for executing shell commands remotely with the Model Context Protocol (MCP). It features secure execution, comprehensive output reporting, and implements measures to ensure the safe execution of commands, focusing on security and controlled environments.
MCP Shell Server
A secure server for executing shell commands that implements the Model Context Protocol (MCP). This server allows for the remote execution of authorized shell commands with support for stdin input.
Features
- Secure Command Execution: Only authorized commands can be executed.
- Standard Input Support: Pass input to commands via stdin.
- Comprehensive Output: Returns stdout, stderr, exit code, and execution time.
- Shell Operator Security: Validates commands after shell operators such as ;, &&, ||, |.
- Timeout Control: Sets maximum execution time for commands.
Security
The server implements several security measures:
- Command Whitelist: Only explicitly allowed commands can be executed.
- Shell Operator Validation: Commands after shell operators are validated against the whitelist.
- No Shell Injection: Commands are executed directly without shell interpretation.
Requirements
- Python 3.11 or higher
- mcp>=1.1.0