Skip to main content
Glama

Shell-MCP

by kevinwatt

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

  1. Click "+ Add MCP Server" in Dive Desktop
  2. 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 execute
      • args (array, optional): Command arguments
      • timeout (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:

CommandDescriptionAllowed Arguments
lsList directory contents-l, -a, -h, -R, --help, *
catConcatenate and display file contents-n, -b, --help, *
pwdShow current working directoryNone
dfShow disk usage-h, -T, --help
echoDisplay textAny text
psShow process status-e, -f, -u, --help
freeShow memory usage-h, -m, -g, --help
uptimeShow system uptimeNone
dateShow system date and time+%Y-%m-%d, +%H:%M:%S, --help
grepSearch text patterns in files-i, -v, -n, -r, -l, --color, *
wShow who is logged on and what they are doing-h, -s, --no-header, --help
whoisQuery WHOIS domain registration information-H, *
findSearch for files in a directory hierarchy-name, -type, -size, -mtime, *
netstatNetwork connection information-a, -n, -t, -u, -l, -p, --help
lspciList PCI devices-v, -k, -mm, -nn, --help
lsusbList USB devices-v, -t, -d, -s, --help
digDNS lookup utility+short, +trace, +dnssec, @*, *
nslookupQuery DNS records-type=, -query=, *
ipShow network devices and interfacesaddr, link, route, neigh, -br, *
whereisLocate binary, source and manual files-b, -m, -s, *
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

A secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.

  1. Features
    1. Installation
      1. Configuration with Dive Desktop
        1. Tool Documentation
          1. Usage Examples
            1. Manual Start
              1. Requirements
                1. Development
                  1. License
                    1. Keywords
                      1. Available Commands

                        Related MCP Servers

                        • A
                          security
                          A
                          license
                          A
                          quality
                          A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
                          Last updated 3 months ago
                          1
                          113
                          Python
                          MIT License
                          • Apple
                        • -
                          security
                          F
                          license
                          -
                          quality
                          A secure server that allows LLM applications like Claude to execute whitelisted system commands with user confirmation and comprehensive security features.
                          Last updated 6 months ago
                          Python
                          • Linux
                          • Apple
                        • A
                          security
                          A
                          license
                          A
                          quality
                          An MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.
                          Last updated 20 days ago
                          9
                          346
                          6
                          JavaScript
                          MIT License
                          • Linux
                          • Apple
                        • -
                          security
                          F
                          license
                          -
                          quality
                          A secure MCP server that provides controlled ShellJS access for LLMs, enabling AI systems to safely execute shell commands and interact with the filesystem within a configurable security sandbox.
                          Last updated 4 months ago
                          JavaScript

                        View all related MCP servers

                        MCP directory API

                        We provide all the information about MCP servers via our MCP API.

                        curl -X GET 'https://glama.ai/api/mcp/v1/servers/kevinwatt/shell-mcp'

                        If you have feedback or need assistance with the MCP directory API, please join our Discord server