Shell Command Executor MCP Server

Executes whitelisted shell commands remotely with standard input support.

Local serverstdioPython★ 182

What is the Shell Command Executor MCP Server?

Executes whitelisted shell commands remotely with standard input support.

The short version

A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.

  • Argv-based Command Execution — Allowed commands run via subprocess argv without shell-string interpretation
  • Standard Input Support — Pass input to commands via stdin
  • Comprehensive Output — Returns stdout, stderr, exit status, and execution time
  • Safe Pipeline Support — Pipelines preserve and validate argv segments instead of invoking a shell
  • Execution Limits — Server-side default timeout, maximum timeout, and output byte caps are enforced
  • Contained Redirection — <, >, and >> targets must stay inside the requested working directory

What it needs from you

  • Python 3.11 or higher * mcp>=1.1.0

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Configuration

  • Python 3.11 or higher * mcp>=1.1.0
VariableDescriptionRequired
ALLOW_COMMANDSConfiguration value read at startup.Optional
SECRET_TOKENCredential the server authenticates with.Yes
ACCESS_KEYCredential the server authenticates with.Yes
PRIVATE_KEYCredential the server authenticates with.Yes
MCP_SHELL_SAFE_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • “Use Shell Command Executor to Configuration.”

Frequently asked questions

The tool implements security measures like command whitelisting, shell operator validation, and direct command execution without shell interpretation to prevent shell injection attacks and ensure only authorized commands are executed.