Command Executor
About
Enables secure remote command execution with robust security controls like command allowlisting, direct command invocation without shell access, and strict environment management for controlled system interactions.
Details
- Author
- cnosuke
- Repository
- cnosuke/mcp-command-exec
- GitHub stars
- 1
- Categories
- Design, Developer Tools, Security, Frontend, API
- Tags
- #mobile
Jump to
- Command execution via MCP protocol
- Command filtering using an allowlist
- Customizable allowed commands via environment variables
- Environment variable support for command execution
- Global environment variables in configuration file
- Per-command environment variables
- Command execution result as text output
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:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Command ExecutorCommand (node, npx, python, etc.)./bin/mcp-command-execArguments-
Argument 1
server
Environment-
DEBUG
false -
LOG_PATH
mcp-command-exec.log -
ALLOWED_COMMANDS
git,ls,cat,echo,find
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
The server is configured via a YAML file (default: config.yml). For example:
```yaml
command_exec
Executes a system command. Parameters: command (string), working_dir (optional string), env (optional object with environment variables)
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"command executor": {
"env": {
"DEBUG": "false",
"LOG_PATH": "mcp-command-exec.log",
"ALLOWED_COMMANDS": "git,ls,cat,echo,find"
},
"args": [
"server"
],
"command": "./bin/mcp-command-exec"
}
}
}
Linux
{
"env": {
"DEBUG": "false",
"LOG_PATH": "mcp-command-exec.log",
"ALLOWED_COMMANDS": "git,ls,cat,echo,find"
},
"args": [
"server"
],
"command": "./bin/mcp-command-exec"
}
Macos
{
"env": {
"DEBUG": "false",
"LOG_PATH": "mcp-command-exec.log",
"ALLOWED_COMMANDS": "git,ls,cat,echo,find"
},
"args": [
"server"
],
"command": "./bin/mcp-command-exec"
}
Windows
{
"env": {
"DEBUG": "false",
"LOG_PATH": "mcp-command-exec.log",
"ALLOWED_COMMANDS": "git,ls,cat,echo,find"
},
"args": [
"server"
],
"command": "./bin/mcp-command-exec"
}
MCP Command Executor
MCP Command Executor is a server implementation that allows safe execution of system commands via the MCP protocol. This server ensures security by only executing commands that are registered in an allowlist.
Features
- Command execution via MCP protocol
- Command filtering using an allowlist
- Customizable allowed commands via environment variables
- Environment variable support for command execution
- Global environment variables in configuration file
- Per-command environment variables
- Command execution result as text output
Requirements
- Go 1.24 or later
- github.com/metoro-io/mcp-golang
- Other dependencies listed in go.mod
Installation
go install github.com/cnosuke/mcp-command-exec
Or clone the repository and build manually:
git clone https://github.com/cnosuke/mcp-command-exec.git
cd mcp-command-exec
make build
Configuration
The server is configured via a YAML file (default: config.yml). For example:
```yaml
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





