CLI MCP Server

Author:@MCP-Mirror
View on GitHub

Overview

CLI MCP Server is a secure server for the Model Context Protocol (MCP). Its purpose is to execute command-line operations safely, with built-in security controls.

To use it, install via Smithery for Claude Desktop. Configure the server using environment variables. It will only run commands from a pre-approved whitelist and within specified allowed directories.

Key features include secure command execution with strict validation, configurable lists of allowed commands and flags, and protection against path traversal and shell injection. It also enforces execution timeouts and command length limits, provides detailed error reporting, supports async operations, and restricts commands to validated working directories.

Primary use cases are providing controlled command-line access to LLM applications, running commands in a secured environment, and enforcing command and flag restrictions for safety.

Frequently asked questions: You cannot execute any command; only whitelisted ones are permitted unless the configuration specifies all. Attempting a disallowed command returns a security violation error. Yes, there is a limit on execution time, which can be set in the configuration.