execute_commandLABSCO SUMMARY
The allowlist is the product.
Any server can run a command. What decides whether you would let an agent near it is what happens to the command it should not run — here, prefix validation against an explicit set, no shell execution, and an error that names what was permitted. Set ALLOWED_COMMANDS deliberately: the default includes npm and python, which are broad enough to run a lot of other things.
What it is
A single-tool command runner with an allowlist. Commands are checked by prefix against a configured set, and execution does not go through a shell, which removes the usual injection route.
What you get
- execute_command takes a command string and runs it if the allowlist permits
- The default allowlist is git, ls, mkdir, cd, npm, npx and python
- ALLOWED_COMMANDS replaces that list with your own, as a comma-separated string
- A rejected command returns an InvalidParams error naming the allowed commands, rather than failing silently
- Command output streams back, and a failed command returns its error as tool output rather than crashing the server
Requirements
Node.js, built from a checkout with npm install and npm run build; the client points at build/index.js. Communication is over stdio. The only configuration is ALLOWED_COMMANDS, and the default set is deliberately restrictive.
Setup effort
Build from source — git clone https://github.com/Sunwood-ai-labs/command-executor-mcp-server.git
USE CASES
Letting an agent check repository state
git is on the default list, so status and log work without opening the whole shell.
Restricting an agent to one toolchain
Replace the allowlist with exactly the commands that task needs.
Understanding a refusal
A blocked command returns the list of allowed commands rather than an opaque failure.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
Node.js and npm
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/Sunwood-ai-labs/command-executor-mcp-server.git
cd command-executor-mcp-server
npm install
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"command-executor": {
"command": "<YOUR_PATH_TO_COMMAND_EXECUTOR>/build/index.js"
}
}
}<YOUR_PATH_TO_COMMAND_EXECUTOR> is the absolute path to your clone (command-executor-mcp-server). The allowed commands default to git, ls, mkdir, cd, npm, npx and python; set ALLOWED_COMMANDS (comma-separated) in the server's environment to change them.