mcp-command-exec

mcp-command-exec

1

MCP Command Executor is a server implementation that safely executes system commands through the MCP protocol, using an allowlist to filter permissible actions. It features customizable environment settings and security measures to prevent unauthorized command execution.

MCP Command Executor

MCP Command Executor is a server designed for safe execution of system commands via the Model Context Protocol (MCP). Key features include:

  • Command execution through the MCP protocol with an allowlist.
  • Customizable command permissions using environment variables.
  • Supports both global and per-command environment variables.
  • Provides text output for command execution results.

Requirements

  • Go 1.24 or later
  • Required dependencies as listed in go.mod

Configuration

Configured using a YAML file (default: config.yml), with options to override via environment variables. Logging options and command-line parameters available to modify server behavior.

Security

To ensure security, the server only executes commands on an allowlist, avoids shell usage to prevent injection attacks, and supports environment variable control.