Shell Command

by egoist

28 stars
231 downloads
Not rated
GitHub Website

About

Secure shell command execution server that allows running system commands in a controlled environment through an allowlist system, returning results in YAML format.

Details

Author
egoist
Repository
egoist/shell-command-mcp
GitHub stars
28
Downloads
231
Categories
AI, Design, Developer Tools, File Management, Security, Infrastructure, Knowledge Base

- Executes shell commands via an MCP server.
- Restricts commands using the ALLOWED_COMMANDS environment variable.
- Supports wildcard * to allow any command (potentially dangerous).
- Sponsored by ChatWise.
- Simple stdio-based transport.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Shell Command
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 shell-command-mcp
    Environment
    • ALLOWED_COMMANDS cat,ls,echo

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the server via JSON using the command npx -y shell-command-mcp. Use the ALLOWED_COMMANDS environment variable to explicitly allow commands (comma-separated) or * to allow any command.

execute_command

Execute a shell command

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

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

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.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.