Feedback

Basic information

Runtime
Python
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
mladensu
Submitted by
Community
Quality
65
Stars
173

About CLI Secure MCP Server

Execute secure shell commands and manage scp command line Linux tasks with CLI Secure's strict security policies. Protect every operation.

CLI Secure is a MCP server in the Auth Security category listed in the AddMCP.net directory, published by mladensu. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 173 GitHub stars. Source code is hosted on github.com. Related topics: auth-security, community, developer-tools.

Setup

{
    "mcpServers": {
        "cli-mcp-server": {
            "command": "uvx",
            "args": [
                "cli-mcp-server"
            ],
            "env": {
                "ALLOWED_DIR": "</your/desired/dir>",
                "ALLOWED_COMMANDS": "ls,cat,pwd,echo",
                "ALLOWED_FLAGS": "-l,-a,--help,--version",
                "MAX_COMMAND_LENGTH": "1024",
                "COMMAND_TIMEOUT": "30",
                "ALLOW_SHELL_OPERATORS": "false"
            }
        }
    }
}

CLI Secure MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "cli-mcp-server": {
            "command": "uvx",
            "args": [
                "cli-mcp-server"
            ],
            "env": {
                "ALLOWED_DIR": "</your/desired/dir>",
                "ALLOWED_COMMANDS": "ls,cat,pwd,echo",
                "ALLOWED_FLAGS": "-l,-a,--help,--version",
                "MAX_COMMAND_LENGTH": "1024",
                "COMMAND_TIMEOUT": "30",
                "ALLOW_SHELL_OPERATORS": "false"
            }
        }
    }
}

CLI Secure MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is CLI Secure?

A secure Model Context Protocol (MCP) server that enables controlled command-line execution with robust security measures including command whitelisting, path validation, and execution controls. It is designed to provide safe CLI access for LLM applications while maintaining security.

How to use CLI Secure?

Install via Smithery (npx @smithery/cli install cli-mcp-server --client claude) or manually with uv/uvx. Configure required environment variable ALLOWED_DIR; optional variables set allowed commands/flags, timeouts, and shell operator behaviour. Add the server to Claude Desktop’s claude_desktop_config.json. The server exposes two tools: run_command and show_security_rules.

Key features of CLI Secure

  • Secure command execution with strict validation
  • Configurable command and flag whitelisting with 'all' option
  • Path traversal prevention and validation
  • Shell operator injection protection (opt‑in)
  • Execution timeouts and command length limits
  • Async operation support
  • Working directory restriction and validation

Use cases of CLI Secure

  • Provide controlled CLI access from AI assistant applications
  • Execute whitelisted system commands safely within a confined directory
  • Allow LLMs to run commands like ls, cat, pwd, echo without full shell access

Frequently asked questions

1 What tools does CLI MCP Server provide?

Two tools: run_command to execute whitelisted commands, and show_security_rules to display current security configuration and restrictions.

2 What configuration is required?

ALLOWED_DIR is required. Default values: ALLOWED_COMMANDS=ls,cat,pwd, ALLOWED_FLAGS=-l,-a,--help, MAX_COMMAND_LENGTH=1024, COMMAND_TIMEOUT=30, ALLOW_SHELL_OPERATORS=false.

3 How does command whitelisting work?

Set ALLOWED_COMMANDS and ALLOWED_FLAGS to a comma‑separated list of allowed commands/flags, or to 'all' to allow any command/flags.

4 What security measures are implemented?

Command whitelist enforcement, flag validation, path traversal prevention, shell operator blocking (can be enabled), command length limits, execution timeouts, working directory restrictions, and symlink resolution/validation.

5 How can I install CLI MCP Server for Claude Desktop?

Via Smithery: npx @smithery/cli install cli-mcp-server --client claude. Alternatively, manually add the server configuration with uv or uvx in claude_desktop_config.json.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬