Shell command execution MCP server
An MCP server implementation that provides secure shell command execution capabilities for LLMs.
- Secure Execution: Whitelisted commands and arguments only
- Resource Control: Memory and CPU usage monitoring
- Timeout Control: Automatic termination of long-running commands
- Size Limits: Output size restrictions for safety
- MCP Integration: Works with Claude and other MCP-compatible LLMs
npm install @kevinwatt/shell-mcpConfiguration with Dive Desktop
- Click "+ Add MCP Server" in Dive Desktop
- Copy and paste this configuration:
{
"mcpServers": {
"shell": {
"command": "npx",
"args": [
"-y",
"@kevinwatt/shell-mcp"
]
}
}
}- execute_command
- Execute whitelisted shell commands
- Inputs:
command(string, required): Command to executeargs(array, optional): Command argumentstimeout(number, optional): Execution timeout in ms
Ask your LLM to:
"Show current directory: pwd"
"List files: ls -l"
"Check disk usage: df -h"
If needed, start the server manually:
npx @kevinwatt/shell-mcp- Node.js 18+
- MCP-compatible LLM service
# Install dependencies
npm install
# Watch mode
npm run watch
# Run tests
npm test
# Lint
npm run lintMIT © Kevin Watt
- mcp
- shell
- command
- claude
- llm
- automation