Skip to main content
mcpSource-backed

CLI MCP Server

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.

by Mladen · submitted by oktofeesh1·added 2026-06-06·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://github.com/MladenSU/cli-mcp-server/blob/main/README.md, https://github.com/MladenSU/cli-mcp-server
Brand
CLI MCP Server
Brand domain
github.com
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.
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.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

10 minutes

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

4 prerequisites to line up before setup. Includes a review or approval gate.

0/4 ready
Install & runtime1Permissions & scopes1Network & hosting1Review & approval110 minutes

Safety & privacy surface

Safety & privacy surface

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.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
10 minutes
Difficulty
advanced
Tool listing metadata
Full copyable content
{
  "mcpServers": {
    "cli-mcp-server": {
      "command": "uvx",
      "args": ["cli-mcp-server"],
      "env": {
        "ALLOWED_DIR": "<approved-working-directory>",
        "ALLOWED_COMMANDS": "ls,cat,pwd",
        "ALLOWED_FLAGS": "-l,-a,--help",
        "ALLOW_SHELL_OPERATORS": "false"
      }
    }
  }
}

About this resource

Content

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.

Source Review

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.
  • MIT license.

Installation

Run the package with uvx:

uvx cli-mcp-server

Configure a narrow command policy:

{
  "mcpServers": {
    "cli-mcp-server": {
      "command": "uvx",
      "args": ["cli-mcp-server"],
      "env": {
        "ALLOWED_DIR": "<approved-working-directory>",
        "ALLOWED_COMMANDS": "ls,cat,pwd",
        "ALLOWED_FLAGS": "-l,-a,--help",
        "MAX_COMMAND_LENGTH": "1024",
        "COMMAND_TIMEOUT": "30",
        "ALLOW_SHELL_OPERATORS": "false"
      }
    }
  }
}

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.

Source citations

Add this badge to your README

Show that CLI MCP Server is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/cli-mcp-server.svg)](https://heyclau.de/entry/mcp/cli-mcp-server)

How it compares

CLI MCP Server side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

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.

Open dossier

MCP server that gives Claude access to the active iTerm2 session for writing terminal input, reading terminal output, and sending control characters.

Open dossier

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.

Open dossier

Open-source MCP servers for accessing ACI.dev managed functions through app-specific tools or a unified search-and-execute interface.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
Submitteroktofeesh1oktofeesh1oktofeesh1oktofeesh1
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
BrandDesktop Commander logoDesktop CommanderACI.dev logoACI.dev
Categorymcpmcpmcpmcp
SourceSource-backedSource-backedSource-backedSource-backed
AuthorMladenFerris Lucaswonderwhy-erAipolabs
Added2026-06-062026-06-062026-06-052026-06-05
Platforms
Harness
Source repo
Safety notesCLI 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 notesCommand 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.
Install
uvx cli-mcp-server
npx -y iterm-mcp
npx @wonderwhy-er/desktop-commander@latest setup
uvx aci-mcp unified-server --linked-account-owner-id YOUR_LINKED_ACCOUNT_OWNER_ID
Config
{
  "mcpServers": {
    "cli-mcp-server": {
      "command": "uvx",
      "args": ["cli-mcp-server"],
      "env": {
        "ALLOWED_DIR": "<approved-working-directory>",
        "ALLOWED_COMMANDS": "ls,cat,pwd,echo",
        "ALLOWED_FLAGS": "-l,-a,--help,--version",
        "MAX_COMMAND_LENGTH": "1024",
        "COMMAND_TIMEOUT": "30",
        "ALLOW_SHELL_OPERATORS": "false"
      }
    }
  }
}
{
  "mcpServers": {
    "iterm-mcp": {
      "command": "npx",
      "args": ["-y", "iterm-mcp"]
    }
  }
}
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
    }
  }
}
{
  "mcpServers": {
    "aci": {
      "command": "uvx",
      "args": [
        "aci-mcp",
        "unified-server",
        "--linked-account-owner-id",
        "YOUR_LINKED_ACCOUNT_OWNER_ID"
      ],
      "env": {
        "ACI_API_KEY": "YOUR_ACI_API_KEY"
      }
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.