mcpField
S
shell-command-mcp

shell-command-mcp

Local
github.com/egoistDeveloper Tools66Updated 81w ago

About shell-command-mcp

shell-command-mcp is an MCP server for executing shell commands, launched with npx. It uses an environment variable to restrict which commands can run, making it suitable for letting an assistant run local commands under controlled limits.

Key features

  1. 01stdio server launched with npx
  2. 02ALLOWED_COMMANDS variable controls permitted commands
  3. 03Wildcard option to allow any command

Use cases

  1. 01Letting Claude run a restricted set of shell commands
  2. 02Setting an allowlist of read-only commands such as cat, ls and echo

MCP support

This is an MCP server that exposes shell command execution to MCP clients, with the allowed commands set through configuration.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"shell-command": {
"command": "npx",
"args": [
"-y",
"shell-command-mcp"
]
}
}
}
Run commandnpx -y shell-command-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmshell-command-mcp

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
commandstringYesThe shell command to execute

Details

From the project 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.