Shell MCP
Securely execute shell commands with whitelisting, resource limits, and timeout controls for LLMs.
shell-mcp
Shell command execution MCP server
An MCP server implementation that provides secure shell command execution capabilities for LLMs.
Features
- 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
Installation
npm install @kevinwatt/shell-mcp
Configuration with Dive Desktop
- Click "+ Add MCP Server" in Dive Desktop
- Copy and paste this configuration:
{
"mcpServers": {
"shell": {
"command": "npx",
"args": [
"-y",
"@kevinwatt/shell-mcp"
]
}
}
}
Tool Documentation
- shell_ls, shell_pwd, shell_df, etc.
- Execute whitelisted shell commands
- Inputs:
command(string, required): Command to executeargs(array, optional): Command argumentstimeout(number, optional): Execution timeout in ms
Usage Examples
Ask your LLM to:
"Show current directory using shell_pwd"
"List files using shell_ls with -l argument"
"Check disk usage using shell_df with -h argument"
Manual Start
If needed, start the server manually:
npx @kevinwatt/shell-mcp
Requirements
- Node.js 18+
- MCP-compatible LLM service
Development
# Install dependencies
npm install
# Watch mode
npm run watch
# Run tests
npm test
# Lint
npm run lint
License
MIT © Dewei Yen
Keywords
- mcp
- shell
- command
- claude
- llm
- automation
Available Commands
The following shell commands are available:
| Command | Description | Allowed Arguments |
|---|---|---|
| ls | List directory contents | -l, -a, -h, -R, --help, * |
| cat | Concatenate and display file contents | -n, -b, --help, * |
| pwd | Show current working directory | None |
| df | Show disk usage | -h, -T, --help |
| echo | Display text | Any text |
| ps | Show process status | -e, -f, -u, --help |
| free | Show memory usage | -h, -m, -g, --help |
| uptime | Show system uptime | None |
| date | Show system date and time | +%Y-%m-%d, +%H:%M:%S, --help |
| grep | Search text patterns in files | -i, -v, -n, -r, -l, --color, * |
| w | Show who is logged on and what they are doing | -h, -s, --no-header, --help |
| whois | Query WHOIS domain registration information | -H, * |
| find | Search for files in a directory hierarchy | -name, -type, -size, -mtime, * |
| netstat | Network connection information | -a, -n, -t, -u, -l, -p, --help |
| lspci | List PCI devices | -v, -k, -mm, -nn, --help |
| lsusb | List USB devices | -v, -t, -d, -s, --help |
| dig | DNS lookup utility | +short, +trace, +dnssec, @*, * |
| nslookup | Query DNS records | -type=, -query=, * |
| ip | Show network devices and interfaces | addr, link, route, neigh, -br, * |
| whereis | Locate binary, source and manual files | -b, -m, -s, * |
Related Servers
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
FluidMCP CLI
A command-line tool to run MCP servers from a single file, with support for automatic dependency resolution, environment setup, and package installation from local or S3 sources.
Rongda MCP Server
An MCP server for Rongda that supports authentication through environment variables.
KiCad MCP Server
An MCP server for KiCad providing project management, PCB design analysis, BOM management, and design rule checking.
ByteRover Team Memory
ByteRover Team Memory is a paid remote MCP endpoint for OpenAI Codex memory MCP. It exposes structured JSON tools, a public server card, token-based access, usage receipts, and audit-ready w
MCP Experiments
An experimental dotnet MCP server that returns the current time, based on Laurent Kempé's tutorial.
Squads MCP
A secure MCP implementation for Squads multisig management on the Solana blockchain.
Petclinic
Interacts with the Swagger Petstore API using Petclinic v3 APIs, exposing tools for OpenAI models.
Verilator MCP Server
An MCP server for Verilator providing RTL simulation, automatic testbench generation, and natural language query capabilities.
Vibe Check
The definitive Vibe Coder's sanity check MCP server: Prevents cascading errors by calling a "Vibe-check" agent to ensure alignment and prevent scope creep
Azure DevOps MCP
Integrates with Azure DevOps, allowing interaction with its services. Requires a Personal Access Token (PAT) for authentication.