MCP Hub
Back to servers

Shell Command

A secure Model Context Protocol server that executes system shell commands within a controlled environment using an explicit allowlist system.

Stars
47
Forks
6
Tools
1
Updated
Apr 7, 2025
Validated
Jan 9, 2026

shell-command-mcp

MCP server for executing shell commands.

This project is sponsored by ChatWise, an all-in-one LLM chatbot with first-class MCP support.

Usage

Configure manually

# stdio server
npx -y shell-command-mcp

JSON config

{
  "mcpServers": {
    "shell-command": {
      "command": "npx",
      "args": ["-y", "shell-command-mcp"],
      "env": {
        "ALLOWED_COMMANDS": "cat,ls,echo"
      }
    }
  }
}

Allowed commands

Use ALLOWED_COMMANDS environment variable to explictly allow the commands that this server can run, separate each command by ,. You can use * to allow any command, but this is potentially dangerous.

License

MIT.

Reviews

No reviews yet

Sign in to write a review

Shell Command — MCP Server | MCP Hub