--- id: cli-mcp-server version: "0.2.5" license: unclear license_treatment: unclear maintenance: aging --- # cli-mcp-server — Command line interface for MCP clients with secure execution and customizable security policies License: unclear · Maintenance: aging · Downloads: 82.1K/mo ## What it is and what it does CLI MCP Server is a Python package that implements the Model Context Protocol (MCP) as a secure server for command-line execution. It bridges LLM applications (like Claude Desktop) and the shell by exposing two tools: run_command (to execute whitelisted CLI commands) and show_security_rules (to display current restrictions). The server enforces security through command and flag whitelisting, path validation to prevent traversal attacks, shell operator blocking, execution timeouts, and working directory restrictions—all configured via environment variables. You use it by installing the package, configuring it with allowed commands and a base directory, and registering it as an MCP server in your LLM client (typically Claude Desktop). Once running, the LLM can invoke commands only within the whitelist and the allowed directory, making it safe to grant controlled shell access to AI agents without exposing the full system. Use it for: - Give Claude Desktop controlled access to run file operations (ls, cat, pwd) on a specific project directory without exposing the entire filesystem. - Allow an LLM agent to execute build or test commands (e.g., pytest, make) within a sandbox directory as part of a development workflow. - Provide a secure interface for an AI application to query system information (e.g., echo, uname) without allowing arbitrary command execution. - Integrate with MCP-compatible LLM clients to enable auditable, whitelisted CLI automation while maintaining security boundaries. - Debug and test MCP server behavior using the MCP Inspector for local development and integration testing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a secure Model Context Protocol (MCP) server that allows LLM applications to execute whitelisted command-line operations with configurable security policies, command validation, and execution controls. Yes, with conditions. Install if you need to safely expose CLI access to an LLM application and are comfortable configuring environment variables and managing a whitelist. The low install friction and clear security model make it straightforward to set up. However, verify the actual license in the repository first (metadata is unclear), and be aware that maintenance is aging—last release was 406 days ago. No known vulnerabilities are recorded, but the security features (injection protection, path validation) should be reviewed for your threat model before use in production. ## Install pip install cli-mcp-server uv add cli-mcp-server poetry add cli-mcp-server ## Installing cli-mcp-server Before you install: Low install friction with a single runtime dependency (mcp). Maintenance status is aging—last release was 406 days ago, though the repository remains active with 177 stars and no archived status. Suitable for projects that can tolerate infrequent updates. License in practice: License treatment is unclear: no SPDX identifier or raw license string is recorded in the package metadata, despite the description mentioning MIT licensing. Verify the actual license terms in the repository before use in proprietary or restricted contexts. Quickstart: pip install cli-mcp-server # Add to Claude Desktop config (~/Library/Application\ Support/Claude/claude_desktop_config.json): # { # "mcpServers": { # "cli-mcp-server": { # "command": "uvx", # "args": ["cli-mcp-server"], # "env": { # "ALLOWED_DIR": "/your/safe/dir", # "ALLOWED_COMMANDS": "ls,cat,pwd" # } # } # } # } Requires Python 3.10 or later. Requires mcp runtime dependency. Must set ALLOWED_DIR environment variable before the server will start. Verify before relying: - Whether the MIT license mentioned in the description is actually applied to the package on PyPI, given the unclear metadata. - Current maintenance cadence and whether 406 days since last release indicates active development or dormancy. - Whether shell operator injection protection and path traversal prevention have been independently audited for security. ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 82.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mcp server command execution, secure cli for llm, command whitelist validation, mcp protocol implementation, controlled shell access, claude desktop integration, command security sandbox, mcp-protocol, llm-integration, security-sandbox [View on SkillFed](https://skillfed.io/packages/cli-mcp-server) · [View on PyPI](https://pypi.org/project/cli-mcp-server/)