Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

shell-command-mcp

MCP.Pizza Chef: egoist

shell-command-mcp is an MCP server designed to execute shell commands securely within a controlled environment. It allows configuration of allowed commands via environment variables, ensuring safe command execution. This server integrates with MCP clients to provide real-time shell command execution capabilities, useful for automation, scripting, and system interaction workflows.

Use This MCP server To

Execute predefined shell commands from MCP clients securely Automate system tasks via shell commands in MCP workflows Run file system commands like ls and cat through MCP Integrate shell command execution into AI-driven automation Control allowed shell commands via environment variable settings

README

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.

shell-command-mcp FAQ

How do I restrict which shell commands can be executed?
Use the ALLOWED_COMMANDS environment variable to specify allowed commands, separated by commas.
Can I allow all shell commands to be executed?
Yes, by setting ALLOWED_COMMANDS to '*', but this is potentially dangerous and not recommended.
How do I start the shell-command-mcp server manually?
Run `npx -y shell-command-mcp` to start the server in stdio mode.
Is shell-command-mcp compatible with all MCP clients?
Yes, it follows the MCP server protocol and can integrate with any compliant MCP client.
What is the security model for executing shell commands?
Commands are restricted by the ALLOWED_COMMANDS environment variable to prevent unauthorized execution.
Can I customize the command and arguments used to start the server?
Yes, you can configure the command and args in the MCP JSON config under mcpServers.
What license governs shell-command-mcp?
It is licensed under the MIT license, allowing free use and modification.