Shell MCP Server

Shell command execution with whitelist-based safety and resource controls for LLMs.

Data last scanned 2 days ago · Reviewed 2 days ago

1820 dangerous tools20 tools7TypeScriptMIT

Overview

Shell MCP Server provides a bridge for LLMs to execute specific system commands, including file listing, disk usage monitoring, and process status reports. It is designed to integrate with MCP-compatible platforms like Claude, enabling automated environment inspection through defined tools.

Our verdict

With a high-risk security score of 18/100, this tool requires caution. The project is community-maintained with no editorial review and has not seen a commit in over 516 days. While it implements whitelisting and resource controls, the lack of recent maintenance and the single-contributor bus-factor risk make it better suited for sandbox testing rather than production environments.

  • Strict whitelisting of allowed shell commands and arguments
  • Built-in resource controls for memory, CPU, and execution timeouts
  • Configurable output size limits for safety
  • Minimal dependency footprint with only one direct dependency
  • High-risk security score due to lack of recent maintenance
  • Single-contributor project increases bus-factor risk
  • Inactive repository with no updates for over 500 days

Setup

Claude Desktop
{
  "mcpServers": {
    "shell-mcp": {
      "args": [
        "-y",
        "@kevinwatt/shell-mcp"
      ],
      "command": "npx"
    }
  }
}

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
shell_lsList directory contentshigh
shell_catConcatenate and display file contentshigh
shell_pwdShow current working directoryhigh
shell_dfShow disk usagehigh
shell_echoDisplay texthigh
shell_psShow process statushigh
shell_freeShow memory usagehigh
shell_uptimeShow system uptimehigh
shell_dateShow system date and timehigh
shell_grepSearch text patterns in fileshigh

Compatibility

ClientLocalDockerRemoteRead-only
ChatGPT
Claude Desktop
Cursor
VS Code
Windsurf

Frequently asked questions

What are the system requirements for running the Shell MCP server?

You must have Node.js version 18 or higher installed and an MCP-compatible LLM service to use the server.

How does the server ensure command execution safety?

The server restricts execution to a specific whitelist of commands and arguments, monitors memory and CPU usage, and enforces output size limits.

Can I prevent commands from running indefinitely?

Yes, you can specify a timeout in milliseconds as an input parameter for each command to trigger automatic termination of long-running processes.

Does the server support arbitrary shell commands?

No, it only supports a predefined list of commands such as ls, cat, df, and grep, each with specific allowed arguments.

Alternatives

Badge

Shell MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.