Secure command-line execution MCP server that lets Claude run allowlisted commands inside a configured directory with command and flag whitelists, path validation, shell-operator blocking, command-length limits, execution timeouts, and a tool for showing the active security rules.
CLI MCP Server executes local commands, so allowed commands can read, write, delete, transform, upload, or run code depending on what is whitelisted., Never set ALLOWED_COMMANDS=all, ALLOWED_FLAGS=all, or ALLOW_SHELL_OPERATORS=true unless the environment is disposable and strongly sandboxed., Keep ALLOWED_DIR narrow; do not point it at a home directory, repository root with secrets, cloud credential directory, SSH directory, or production data., The reviewed implementation blocks shell operators by default and enforces timeouts, but those controls do not replace OS permissions, backups, or process isolation., Ask the show_security_rules tool to confirm the effective policy before allowing run_command.
Privacy notes
Command output, file names, file contents, directory listings, environment-derived paths, error messages, and working-directory names can be sent to the MCP client and model., Whitelisted commands such as cat, grep, env, git, curl, package managers, or language runtimes can expose secrets or transmit data if enabled., Logs and transcripts can retain command output and local project context, so do not run against directories containing credentials, customer data, private keys, or unpublished source unless approved.
Author
Mladen
Submitted by
oktofeesh1
Claim status
unclaimed
Last verified
2026-06-06
Decision playbook
Review trust signals before you adopt
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
Compare context
Selected
0
Current score
63
Baseline
—
Delta
No baseline selected
No major trust-signal divergence detected in the current selection.
Source and provenance checks
Needs review
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Done
Source provenance statusRequired
Marked as source-backed.
Done
Metadata reviewed
No reviewed flag detected in metadata.
Pending
Safety and privacy checks
Complete
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Done
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Done
Trust level risk gateRequired
Trust level does not block evaluation.
Done
Package and install checks
Needs review
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Done
Package verification flag
No package verification flag provided.
Pending
Checksum metadata
No checksum provided for downloaded artifact.
Pending
Compare-driven decision checks
Needs review
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
5 safety and 3 privacy notes across 5 risk areas. Review closely: credentials & tokens, permissions & scopes, network access, third-party handling.
5 areas
SafetyNetwork accessCLI MCP Server executes local commands, so allowed commands can read, write, delete, transform, upload, or run code depending on what is whitelisted.
SafetyExecution & processesNever set ALLOWED_COMMANDS=all, ALLOWED_FLAGS=all, or ALLOW_SHELL_OPERATORS=true unless the environment is disposable and strongly sandboxed.
SafetyCredentials & tokensKeep ALLOWED_DIR narrow; do not point it at a home directory, repository root with secrets, cloud credential directory, SSH directory, or production data.
SafetyPermissions & scopesThe reviewed implementation blocks shell operators by default and enforces timeouts, but those controls do not replace OS permissions, backups, or process isolation.
SafetyExecution & processesAsk the show_security_rules tool to confirm the effective policy before allowing run_command.
PrivacyThird-party handlingCommand output, file names, file contents, directory listings, environment-derived paths, error messages, and working-directory names can be sent to the MCP client and model.
PrivacyCredentials & tokensWhitelisted commands such as cat, grep, env, git, curl, package managers, or language runtimes can expose secrets or transmit data if enabled.
PrivacyCredentials & tokensLogs and transcripts can retain command output and local project context, so do not run against directories containing credentials, customer data, private keys, or unpublished source unless approved.
Safety notes
CLI MCP Server executes local commands, so allowed commands can read, write, delete, transform, upload, or run code depending on what is whitelisted.
Never set ALLOWED_COMMANDS=all, ALLOWED_FLAGS=all, or ALLOW_SHELL_OPERATORS=true unless the environment is disposable and strongly sandboxed.
Keep ALLOWED_DIR narrow; do not point it at a home directory, repository root with secrets, cloud credential directory, SSH directory, or production data.
The reviewed implementation blocks shell operators by default and enforces timeouts, but those controls do not replace OS permissions, backups, or process isolation.
Ask the show_security_rules tool to confirm the effective policy before allowing run_command.
Privacy notes
Command output, file names, file contents, directory listings, environment-derived paths, error messages, and working-directory names can be sent to the MCP client and model.
Whitelisted commands such as cat, grep, env, git, curl, package managers, or language runtimes can expose secrets or transmit data if enabled.
Logs and transcripts can retain command output and local project context, so do not run against directories containing credentials, customer data, private keys, or unpublished source unless approved.
Prerequisites
Python 3.10 or newer and uvx, uv, pipx, or another supported Python runner.
A dedicated ALLOWED_DIR that contains only files Claude is approved to inspect or modify.
A minimal command allowlist and flag allowlist for the intended workflow.
External sandboxing, containerization, or a low-privilege OS user when running anything beyond read-only commands.
CLI MCP Server is a Python stdio MCP server for controlled command-line
execution. It exposes a run_command tool for executing validated commands
inside an allowed directory and a show_security_rules tool for inspecting the
active working directory, command allowlist, flag allowlist, maximum command
length, timeout, and shell-operator behavior.
The server is designed to provide limited CLI access to an AI assistant while
enforcing command whitelists, flag whitelists, path normalization, allowed
directory checks, command-length limits, execution timeouts, and default blocking
for shell operators such as pipes, redirects, semicolons, and boolean operators.
These sources were reviewed on 2026-06-06. Prefer the live repository,
README, PyPI metadata, package metadata, package entrypoint, server
implementation, registry metadata, and license file for current install commands,
environment variables, tool behavior, security controls, and licensing.
Features
Python package cli-mcp-server with a cli-mcp-server console command.
Stdio MCP server exposing run_command and show_security_rules.
Required ALLOWED_DIR base directory for command execution.
ALLOWED_COMMANDS and ALLOWED_FLAGS allowlists, with explicit all modes.
Shell operator blocking by default, with opt-in ALLOW_SHELL_OPERATORS.
Command length and timeout controls.
Path normalization and allowed-directory validation for path-like arguments.
After restart, call show_security_rules before running commands so the active
policy is visible in the conversation.
Use Cases
Let Claude list and inspect files in a disposable working directory.
Give an assistant narrow read-only access to generated logs or reports.
Run tightly scoped diagnostic commands during a guided support session.
Expose only safe project scripts or read commands inside a sandboxed folder.
Confirm command policy and allowed flags before a human approves execution.
Safety and Privacy
CLI MCP Server should be treated as local code execution. Its controls are useful
guardrails, but the actual risk depends on the commands, flags, directory, OS
permissions, and sandbox around the MCP process. Start with read-only commands,
keep shell operators disabled, and do not use all-mode allowlists on a machine or
directory that contains valuable data.
Use a disposable folder, temporary checkout, container, VM, or low-privilege user
for anything that can modify files or run scripts. Avoid allowing package
managers, interpreters, network clients, credential tools, destructive commands,
or broad filesystem commands unless the environment is intentionally isolated.
Command output can contain secrets, source code, customer data, local paths, or
environment details. Do not run this server against credential directories,
private keys, cloud config folders, production data, or unpublished source unless
that exposure has been approved.
Duplicate Check
Existing content includes product-specific CLI servers such as Microsoft 365
CLI MCP, but no MladenSU/cli-mcp-server, secure CLI execution MCP, or generic
allowlisted command execution MCP entry was found in content/mcp,
content/agents, content/guides, or content/skills. This entry is scoped to
the Python cli-mcp-server package and does not duplicate product-specific CLI
or infrastructure MCP entries.
Secure command-line execution MCP server that lets Claude run allowlisted commands inside a configured directory with command and flag whitelists, path validation, shell-operator blocking, command-length limits, execution timeouts, and a tool for showing the active security rules.
Local MCP server that gives AI assistants terminal control, process management, filesystem operations, search, diff editing, and document handling for desktop automation and development workflows.
✓CLI MCP Server executes local commands, so allowed commands can read, write, delete, transform, upload, or run code depending on what is whitelisted.
Never set ALLOWED_COMMANDS=all, ALLOWED_FLAGS=all, or ALLOW_SHELL_OPERATORS=true unless the environment is disposable and strongly sandboxed.
Keep ALLOWED_DIR narrow; do not point it at a home directory, repository root with secrets, cloud credential directory, SSH directory, or production data.
The reviewed implementation blocks shell operators by default and enforces timeouts, but those controls do not replace OS permissions, backups, or process isolation.
Ask the show_security_rules tool to confirm the effective policy before allowing run_command.
✓iTerm MCP gives Claude direct access to the active iTerm2 terminal session.
The README states that the server has no built-in command safety restrictions and does not evaluate command risk.
The write_to_terminal tool can run shell commands, paste multiline input, interact with REPLs, trigger builds, modify files, start network tools, or run destructive commands.
The send_control_character tool can send Control-C, Control-Z, Escape, telnet escape, and other control characters that interrupt or alter running processes.
The source uses AppleScript through osascript to write text to iTerm2, read the active session buffer, retrieve the TTY, and send control characters.
The model may not know whether a command succeeded until it reads terminal output, and the README expects the user to monitor and abort when needed.
✓Desktop Commander can run shell commands, stream process output, start and stop processes, read and write files, edit documents, search directories, and change local configuration.
The project's security policy describes built-in restrictions as guardrails rather than hardened security boundaries.
Directory restrictions and command blocklists may be bypassed through terminal access, symlinks, absolute paths, or command substitution.
Use Docker with selective folder mounts when stronger isolation is required.
Review file edits, command execution, process termination, and document rewrites before letting an agent act on important systems.
✓The unified server can discover and execute many ACI.dev managed functions, so restrict permissions before connecting it to an autonomous agent.
App-specific servers should be preferred when a workflow only needs a small set of integrations.
Connected apps may read, create, update, delete, or send data depending on the selected functions and linked account permissions.
Require human approval before email, calendar, CRM, ticketing, infrastructure, billing, deployment, or account-administration actions.
Privacy notes
✓Command output, file names, file contents, directory listings, environment-derived paths, error messages, and working-directory names can be sent to the MCP client and model.
Whitelisted commands such as cat, grep, env, git, curl, package managers, or language runtimes can expose secrets or transmit data if enabled.
Logs and transcripts can retain command output and local project context, so do not run against directories containing credentials, customer data, private keys, or unpublished source unless approved.
✓Terminal output can expose secrets, API keys, tokens, environment variables, shell history, prompts, hostnames, usernames, file paths, git remotes, logs, stack traces, credentials, and local project data.
Commands typed by Claude may be stored in shell history, terminal scrollback, logs, audit systems, or process histories.
Reading the active session buffer may reveal unrelated work already visible in iTerm2.
Do not use this server in terminals connected to production systems, customer data, privileged shells, or secret-bearing sessions unless that exposure is approved.
✓Local files, terminal output, environment-derived paths, process listings, command arguments, audit logs, spreadsheets, PDFs, DOCX files, and source code may be exposed to the MCP client and model.
Tool logs can contain secrets, customer data, credentials, private repository paths, database output, and internal documents.
If using remote AI clients or the project's remote MCP option, review where prompts, tool calls, and file content are transmitted and retained.
✓Tool names, function arguments, prompts, linked account identifiers, execution results, logs, and connected-service data may pass through ACI.dev, the selected third-party apps, the MCP client, and the model provider.
API keys and linked-account credentials must be protected in client config, environment files, logs, screenshots, and shared prompts.
Review ACI.dev account, tenant, retention, audit-log, and OAuth settings before routing production or customer data through the server.
Prerequisites
Python 3.10 or newer and uvx, uv, pipx, or another supported Python runner.
A dedicated ALLOWED_DIR that contains only files Claude is approved to inspect or modify.
A minimal command allowlist and flag allowlist for the intended workflow.
External sandboxing, containerization, or a low-privilege OS user when running anything beyond read-only commands.
macOS with iTerm2 running.
Node.js 18 or newer available to the MCP client runtime.
macOS Automation and accessibility permissions reviewed for controlling iTerm2.
Active iTerm2 tab selected intentionally before allowing Claude to use the server.
Node.js for the npx installation path, or Docker for the isolated installation path.
Claude Desktop or another MCP client that can launch local stdio servers.
Clear list of directories, commands, and long-running processes an assistant may access.
Backups or version control for files the agent may edit.
ACI.dev account, API key, and linked account owner ID.
Connected app credentials or linked accounts for the tools the agent should use.
MCP client that can launch Python package commands with environment variables.
Clear allowlist of apps, functions, and user accounts before exposing write-capable tools.