CLI MCP Server
About This Server
A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with comprehensive security features.
Server Information
This webpage is the GitHub repository for cli-mcp-server, a command-line interface (CLI) for Model Context Protocol (MCP) clients. It provides secure command execution and customizable security policies. The server enables controlled command-line operations with comprehensive security features, making it suitable for providing controlled CLI access to Large Language Model (LLM) applications while maintaining security. The repository is public and contains the source code, license, and documentation for the project.
ā Key Points:
* Provides secure command-line execution.
* Supports customizable security policies for MCP clients.
* Suitable for controlled CLI access for LLM applications.
* Includes documentation for configuration, installation, and usage.
* Offers tools for running commands and displaying security rules.
* Available for integration with Claude Desktop.
* Open-source project licensed under the MIT License.
š Main Findings:
* The cli-mcp-server project focuses on secure command-line execution with configurable security.
* It uses environment variables for configuration.
* It is compatible with the Model Context Protocol (MCP).
* The software can be installed automatically with Smithery.
* Security measures such as command whitelisting, flag validation, and path traversal prevention are implemented.
* Detailed error messages are provided.
* MCP Inspector is recommended for debugging.
š Details:
* Configuration: The server is configured using environment variables such as ALLOWEDDIR, ALLOWEDCOMMANDS, ALLOWEDFLAGS, MAXCOMMANDLENGTH, and COMMANDTIMEOUT.
* Installation: The recommended installation method is via Smithery: `npx @smithery/cli install cli-mcp-server --client claude`.
* Available Tools: The server provides tools such as `runcommand` for executing commands, and `showsecurity_rules` for displaying the current security configuration.
* Security Features: Include command whitelisting, flag validation, path traversal prevention, shell operator blocking, command length limits, execution timeouts, working directory restrictions, and symlink resolution.
* Error Handling: Detailed error messages are provided for various security and execution-related issues.
šÆ Conclusion:
The cli-mcp-server project offers a secure and configurable command-line interface for MCP clients, focusing on providing controlled access and robust security features. It can be easily integrated with platforms like Claude Desktop. The use of environment variables for configuration and detailed error handling contribute to its usability and security.
Server Features
Secure Command Execution
Secure command execution with strict validation
Configurable Whitelisting
Configurable command and flag whitelisting with 'all' option
Path Traversal Prevention
Path traversal prevention and validation
Shell Operator Protection
Shell operator injection protection
Execution Limits
Execution timeouts and length limits
Detailed Error Reporting
Detailed error reporting
Async Operation Support
Async operation support
Working Directory Restriction
Working directory restriction and validation
Provider Information
Mladensu
cloud Provider