mcp-shell-server
A secure shell command execution server that allows remote execution of whitelisted shell commands.
The MCP Shell Server implements the Model Context Protocol (MCP) to provide a secure environment for executing shell commands remotely. It ensures that only predefined commands can be executed, enhancing security by preventing unauthorized command execution. Users can pass input to commands via standard input and receive comprehensive output, including standard output, error messages, exit status, and execution time. In addition to its secure command execution capabilities, the server validates commands after shell operators to prevent injection attacks. It also allows users to set a maximum execution time for commands, ensuring that long-running processes do not hang indefinitely. This makes it a robust solution for developers and system administrators who need to execute shell commands safely and efficiently.
Compatible with
Install
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-shell-server": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-shell-server"
]
}
}
}Config File Location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Some servers require additional setup - check the GitHub README for specific instructions.
Permissions